texts: Create area buffers that are limited by a coastline

texts:
I'm trying to use ArcGIS 10.2 to create a buffer of points based on a pre-defined area (e.g 400 sq km). Further to that, the buffers of some of the points are close to the coastline that requires the buffers to be clipped at the coastline and still have the same area as the ones that are inland (400 sq km).

Does anyone know how this could be done with either Model Builder or Arcpy?

I have limited skills with Arcpy and R but would be happy to work on some scripting to get a solution for this.

Please see image below showing a graphical representation of what I am trying to achieve


texts:
I have ArcGIS Desktop 10.2 with Advanced license and access to Spatial Analyst.
I do not have access to the Business Analyst Desktop extension, and Business Analyst Online does not have this capability.

This is a shame, as the Customer Derived Trade Areas tool (with a nice wizard interface) is exactly what I need.

Was wondering if anyone has an alternative way of achieving this with perhaps a nice model in modelbuilder or a python script?


texts: Looking for complicated representations of an urban areas

texts:
I would like to display some features of an urban area using a map, showing something like telecomunications, roads, or parks, etc. Also, is it possible to get an understanding of how to show more complicated representations of an urban area as I would like to move towards making a more complicated kind of map.

I asked a previous question about this here.


texts: Is there an equivalent of filterBounds() function for images in google earth engine (other than clip images)?

texts: I wanted to restrict my raster to an ROI. clip() function gives pixels outside the ROI masked with zero pixel value. Is there any way to do the same thing that filterbounds() does on an image?


texts: Overlay layer not displayed above Base layer for custom panels of Leaflet.groupedlayercontrol plugin

texts:
I created simple web map (example http://jsfiddle.net/q77wk17z/1/) with one Overlay and several Base layers using Leaflet.groupedlayercontrol plugin. Overlay and Base layers divide on separate layer controls. When I turn on Overlay layer and select another Base layer - Overlay layer displayed under Base layer. Where am I wrong? May be another way create separated Overlay and Base layer controls...
Code Example http://jsfiddle.net/q77wk17z/1/


texts: Performing Spline interpolation on GPS Track

texts:
I'm looking for a way to apply spline interpolation to a gps track (GPX format). I am a regular QGIS user and also have GDAL libraries installed on my Mac if that helps.
Basically trail and ride information on MTB Project has a small set of points and actual paths are expanded via spline interpolation to reduce file sizes. I can download the tracks in gpx format, but they only contain a small set of points, giving me a track which resembles a jagged line which represents the small amount of points before interpolation. I want to apply a similar transformation to re-create the curved lines that are on the website, in a somewhat repeatable process that doesn't have me manually re-tracing each point with the spline drawing tool in QGIS.

Does anyone know of a way that I can easily apply spline interpolation to my gps track data to reproduce the splined track from MTB Project using free tools? Preferably on OSX?


texts: I want to export my project with qgis2web. In the Export-Dialogue, the layers that should be visible are activated, but not shown in the preview screen, just the zoom-in and zoom-out sign. Also after exporting the map is shown, but has no content. Any hints?


texts: How to merge multiple rasters to multiple rasters with ArcMap model builder?

texts:
I have two folders with parts of rasters that I want to merge each, using the modeler:

Folder 1

area1_part_1
area2_part_1
area3_part_1
...

Folder 2

area1_part_2
area2_part_2
area3_part_2
...

(output) Folder 3

area1_part1+part2
area2_part1+part2
area3_part1+part2
...

This is my model right now:

Since you can't use two iterators, I made a sub-model. However when I run everything, Input 1 iterates correctly but it always merges with the last file from Input 2. How do I prevent this?


texts:
I have installed GeoServer 2.1.4 on a Win 2008 64bit server that uses IIS as its default web server but there is no obvious documentation for getting it published via IIS.

Does anyone know of a good documented procedure for getting a vanilla install of GeoServer accessible through IIS7?

I don't really want to have to install Tomcat/Apache as I know my production server Overlords will not be happy about having it on the production machine.

If I find the solution I will certainly be writing it up!

Thanks people...


texts: QGIS 3.8 label disappearance during XYZ Tiles generation

texts:
I make my own basemap with QGIS 3.8. On the map there are labels with X,Y coordinates. When I create XYZ export with QGIS processing tool, on the result some labels disappear.

What is the reason for that?


texts:
I have updated a program because readShapePoly has been replaced by st_read.
Changing from:

unzip(paste(mdir, "AU_Vic_POA_2011.zip", sep = ""))
boundary.shp <- readShapePoly("AU_Vic_Melbourne_POA_2011_boundary-wgs84")
# Create an owin:
boundary.w <- as(as(boundary.shp, "SpatialPolygons"), "owin")

To:

unzip(paste(mdir, "AU_Vic_POA_2011.zip", sep = ""))
boundary.shp <- st_read("AU_Vic_Melbourne_POA_2011_boundary-wgs84.shp")
# Create an owin:
boundary.w <- as(as(boundary.shp, "SpatialPolygons"), "owin")

I now get the error message:

Error in as(boundary.shp, "SpatialPolygons") :
  no method or default for coercing “sf” to “SpatialPolygons”.

How do I fix this?


texts:
I am attempting to input 4-band CIR imagery into ENVI's Vegetation Index Calculator and keep running into the same error: "Wavelengths must be defined to calculate vegetation indices".

I have attempted the following troubleshooting based on this thread with no success:

File > Edit ENVI Header > Edit Attributes > Wavelengths... > Wavelength/FWHM Units: Wavenumber

Unfortunately ENVI's help section does not provide good support for this problem.  Any advice on how to correctly input these images would be greatly appreciated.

Edit:
An example of the 2010 NAIP 1M NC/CIR DOQQ input imagery can be found here.  Please note that I converted the base DOQQs from .jp2 to 8 bit unsigned geoTIFFs.


texts: Obtaining small images that intersect with shapefile on Google Earth Engine

texts:
I am new to Google Earth Engine and am trying to obtain small images that intersect with my shapefile. My shapefile contains 1250 squares of size ~2.5km x ~2.5km.
I am trying to find a way to iterate over my shapefile and obtain not a mosaic of images, but 1250 GeoTiff images that correspond to these 1250 squares.
Is there a way to do so?
When I run the code, my EarthEngine crashes. I would like to obtain a resolution of 10m/pixel (S-2's maximum resolution) and upload them to Google Drive. Also, I do not need all the possible images but just the median/a combined image that best represents the satellite image in RGB.
var batch = require('users/fitoprincipe/geetools:batch')

// my shapefile that contains the squares are here:
var survey = ee.FeatureCollection('users/danielboeyks/surveyfile');
var geom_country = survey.geometry().dissolve().bounds();
Map.addLayer(survey);

function maskS2clouds(image) {
  var qa = image.select('QA60');

  // Bits 10 and 11 are clouds and cirrus, respectively.
  var cloudBitMask = 1 << 10;
  var cirrusBitMask = 1 << 11;

  // Both flags should be set to zero, indicating clear conditions.
  var mask = qa.bitwiseAnd(cloudBitMask).eq(0)
      .and(qa.bitwiseAnd(cirrusBitMask).eq(0));

  return image.updateMask(mask).divide(10000);
}

var collection = ee.ImageCollection('COPERNICUS/S2') // searches all sentinel 2 imagery pixels...
  .filter(ee.Filter.lt("CLOUDY_PIXEL_PERCENTAGE", 20)) // ...filters on the metadata for pixels less than 10% cloud
  .filterDate('2017-01-01' ,'2017-12-31') //... chooses only pixels between the dates you define here
  .filterBounds(geom_country) // ... that are within your aoi
  .map(maskS2clouds)

var medianpixelsclipped = collection.median() // This finds the median value of all the pixels which meet the criteria.

// Now visualise the mosaic as a natural colour image.
Map.addLayer(medianpixelsclipped, {bands: ['B4', 'B3', 'B2'], min: 0, max: 1, gamma: 1.5}, 'Sentinel_2 mosaic')

// Export the image, specifying scale and region.
batch.Download.ImageCollection.toDrive(medianpixelsclipped, 'satellite-poverty-mapping',{
  description: 'ph_grid',
  scale: 1000,
  maxPixels: 1e13,
  region: geom_country
});

//codecreds: https://www.youtube.com/watch?v=YYFv3j2tE5U&ab_channel=EAMENAProject
//


texts: How to show the entire number of records in the attribute table?

texts: How do I show the entire number of records in an attribute table?  The number should be around 100k records, but it only loads 2k at a time.


texts: How to georeference an image in ArcMap, using coordinates from a KML file

texts:
My starting point is KML file containing a PNG image, which displays correctly in Google Earth:

From Google Earth I choose > Save Place As > KML, which gives me the unprojected PNG file, plus the KML file telling Google Earth how to display the image. This includes the coordinates in the LatLonbox section:

<GroundOverlay>
  <drawOrder>1</drawOrder>
  <Icon>
    <href>image.png</href>
  </Icon>
  <LatLonBox>
    <north>-43.35635491009509900</north>
    <south>-43.74776058465478500</south>
    <east>172.75212961661239000</east>
    <west>172.35586651444777000</west>
  </LatLonBox>
</GroundOverlay>

The PNG file is 399px x 544px in size:

... so I input the coordinates manually in the ArcMap Georeferencing toolbar, specifying 0,0 for the top left of the image, and 399,-544 for the lower right of the image, matching these with the north/west and south/east coordinates from the KML file. The data frame is set to WGS84, which is apparently the CRS used by Google Earth.

The resulting geocoded image does not correctly match real-world coordinates (the image should be slightly offset as shown by the red arrow - and possibly rotated so the coastline matches):

The image correctly displays in Google Earth, so the coordinate reference must be correct - presumably my logic of using that bounding box with the image bounding box is flawed.

Any ideas what I'm doing wrong here? Thanks


texts: Displaying ESRI REST services in MapBox?

texts:
I'm working on a web site that displays a couple of maps, with generic base layers, over which we display a number of customer-configurable overlays.

We've built it using MapBox - currently version 2.1.5.

Our landbases are MapBox projects, configured on their website. What we've currently built for our overlays are WMS layers, L.tileLayer.wms().

Now we've got a rush job to configure things for a new, big, client, and it turns out their map data is only available through ESRI's REST services, and not through WMS.

Any ideas on what kind of support there is for ESRI's REST services, in MapBox?

A quick browse around found esri-leaflet, which seems to be a JS library that ESRI put out. Has anyone worked with this?


texts: Ice, snow, glacial data for ArcGIS Online

texts: I'm quite new to this field, so forgive the amateur question, but are there any WMS or WTS that can provide a historical representation of ice melt in the Artic/Greenland area? I'm using ArcGIS Online as map builder and I'm having a difficult time finding any time-based presentation images or graphics.


texts: Is there an equivalent of "Not " in symbology categories with unique values, many fields

texts:
I would like to symbolise based on 2 date fields (d1,d2) in a layer. I would like to be able to have 3 different symbols:

d2 is NOT null
d1 is null AND d2 is null
dl is NOT null AND d2 is null

Is this possible at the symbology definition level? Is there a way of specifying a value <not null> or <any other values> on a per field basis as you can for <null>?


texts: What is the term for creating a network from scratch?

texts:
As part of my PhD, I developed a simple way of creating a road network splitting up collected coordinates based on where they cross. I know the standard method is to use a shapefile (or similar) as the network, and match coordinates to it. However, I was not interested in all junctions, simply the junctions where the recorded vehicles went more than one way.

What would be the term for creating a new network?

I have tried looking it up multiple times, but always get directed towards ready-made networks and their analysis.


texts: USA Contiguous Albers Equal Area Conic to miles

texts: My data is in USA Contiguous Albers Equal Area Conic projection. How can I convert the USA Contiguous Albers Equal Area Conic projection to miles?


texts: Anaconda UnsatisfiableError installing QGIS

texts:
If I run conda install -c conda-forge qgis=2.18.2 from my Ubuntu bash environment, I obtain the following error:

UnsatisfiableError: The following specifications were found to be in conflict:
  - geotiff
  - qgis 2.18.2* -> libspatialite -> proj4 4.9.3
Use "conda info <package>" to see the dependencies for each package.

The issue is apparently a result of geotiff having a dependency on proj4 4.9.2, whereas QGIS has a dependency on 4.9.3.

If I want to install QGIS in my Anaconda environment, is there any way to achieve this without removing geotiff? I would like to keep its functionality.


texts:
I'm new on qgis, when I open a shapefile this error appear:

File "C:/PROGRA~1/QGIS2~1.18/apps/qgis/./python/plugins\processing\gui\GeometryPredicateSelectionPanel.py", line 81, in onRightLayerChange
                self.updatePredicates()
              File "C:/PROGRA~1/QGIS2~1.18/apps/qgis/./python/plugins\processing\gui\GeometryPredicateSelectionPanel.py", line 88, in updatePredicates
                unusablePredicates = self.unusablePredicates[leftType][rightType]
            KeyError: 3

What means?


texts: Do you have a step by step guide on how to upload/download points/wayponts and polylines/routes from a gps?


texts: osgeo.gdal.Translate - How to set compression on GDAL GTiff driver

texts:
How do I force the use of compression on the GTiff driver when called from osgeo.gdal in Python?

Example on the workflow, which currently reads LZW tiffs and dumps them to uncompressed tiffs.

from osgeo import gdal,gdalconst,osr
translateoptions = gdal.TranslateOptions(rgbExpand='RGB', format='GTiff')
outFile = gdal.Translate(gdaloutput, gdalinput, options=translateoptions)

Would be nice to do this without the use of subprocess.

Environment:

Python 3.6.6 |Anaconda custom (64-bit)| (default, Jun 28 2018, 11:27:44)  [MSC v.1900 64 bit (AMD64)] on win32
gdal-2.2.2
libgdal-2.2.2


texts: What is the difference between the calculation for tiles generated with different projection?

texts:
I found that the tiles are generated under the Mercator projection in openstreetmap(here).

And in the wiki page,they provide the Derivation of tile names which is used to Calculate the covered tiles name at a certain point(lng,lat).

So I wonder if there is any difference if the tiles are generated in another projection like EPSG:4490?


texts: Maintaining specific spacing between features during editing using ArcGIS Pro

texts:
I need to maintain a specific spacing/distance between features during editing.
How can I do it with ArcGIS Pro?
I am looking for an equivalent tool/setting to ArcMap 10.x's "sketch halo" in the "Production Mapping" toolbar, so that I could also approximately understand buildings's area (in a satellite image) during editing
(here an example: https://desktop.arcgis.com/en/arcmap/latest/extensions/production-mapping/editing-with-a-sketch-halo.htm).


texts: are there UML models of the OGC standards available online (native files not pdfs)

texts:
Last time I checked, there were only PDFs with class diagrams available on the net (downloadable for at least 140 swiss francs a piece) , but not the UML models in a native format of a database modeling tool.

These PDFs are a pain in the neck to work with.

In the appendix of some standards documents there were xml printouts. For GML there are xsd files available but they are very complex. For geographic metadata there are some xsds defined in this PDF.

Luckily, parts of this document is available here, for instance. it says at the top of each xsd file:

           This file was generated from ISO
  TC/211 UML class diagrams == 01-26-2005 12:40:02

Are these UML models of the OGC standards available online somewhere?
Maybe someone has converted these ##### xsds to a more usable format?


texts: Restriction attribute doesn't work with "0" parameter value?

texts: In my network dataset I´ve set the restriction attribute - if the value in the field X (integer) is higher than the parameter value (integer), travel on the edge is prohibited. It works well with positive and negative values...but "0" parameter value doesn´t work. It solves the route as if no restriction was there. Do you know why "0" is not a valid value?


texts: I've enabled Processing plugin and provided compiled i8n file but somehow there is a error which causes GUI to create two separate buttons. One of them is translated and one is not. Does anybody know what may cause this problem ?


texts:
I'm trying to count the number of points within a polygon of a fixed size in R. I'm planning to do it a few times so that I can eventually calculate average density of points with some measure of error. The way I'm going about it is:

Create a 1 ha box
Have the box appear randomly within my study site
Count and save the number of points within the box
Rinse and repeat a few (hundred? thousand?) times
Calculate average density

My Google search turns up functions that generate random points within a polygon (e.g. st_sample, spsample), which isn't what I want. The closest I think I got was quadratresample but I couldn't figure out how to convert my SpatialPointsDataFrame to a ppp object. Even if I managed to do that, I'm not sure if I'm barking up the right tree with that function.
Is there a function that can count points from a polygon of a fixed size?
EDIT: I've posted and deleted another question about whether this process was the best way forward (after being advised that the post should be split into two separate questions). Jeffrey Evans has since killed two birds with one stone by offering a better route by way of PPA, as well as answering the specific question I had.


texts: Why does this NOT LIKE query find too many features from FileGDB and PostGIS vs a Shapefile?

texts:
I can't understand why the following NOT LIKE query removes not just the ones that end in '% Lake' but blank records too for certain data formats within both PostgreSQL with PostGIS and QGIS. This happens to the original FileGDB and my converted PostGIS table but works when the dataset is converted to Shapefile format.

I first noticed this when trying to run the query on the PostGIS table from pgAdmin4 and psql but also tried the from DBManager (in QGIS)

SELECT * FROM fwa.fwa_assessment_watersheds_poly
WHERE "gnis_name_1" NOT LIKE '% Lake'

So I tested in QGIS as a definition query.

# FileGDB
# 11252 records returned (incorrect)
"GNIS_NAME_1" NOT LIKE '% Lake'

# PostGIS
# 11252 records returned (incorrect)
"gnis_name_1" NOT LIKE '% Lake'

# Shapefile
# 19358 records returned (correct!)
"GNIS_NAME_" NOT LIKE '% Lake'

You can see in the QGIS image below that the PostGIS dataset in orange removes additional blank records when on top of the Shapefile in light brown.

The source dataset is available at ftp://ftp.geobc.gov.bc.ca/sections/outgoing/bmgs/FWA_Public/FWA_BC.gdb.zip - 2.3 GB

I've uploaded some additional test data for testing at a smaller size - the first two are the entire datasets and the last two are subsets:
fwa_assessment_watersheds_poly.gdb.zip - 116.13 MB
fwa_assessment_watersheds_full.shp.zip - 95.47 MB
fwa_assessment_watersheds_selection.shp.zip - 2.38 MB
fwa_assessment_watersheds_selection.gdb.zip - 3.24 MB

System info:
Windows 10 64-bit
PostgreSQL 9.6.1
PostGIS 2.3.1
QGIS 2.18.1

Tried from ArchLinux with same software versions as above.


texts: Can not finish to create new polygon by right click in QGIS

texts:
I am using QGIS 3.8.1 on Mac and trying to create new Polygon in this step. However it does not work.

Menu,  Layer, Create Layer, New Create Temporary Scratch Layer
click toggle editing icon
click Add polygon feature
create Polygon at map

right click and then Polygon disappear, there is no attribute windows pop up


texts: How do you convert the radius decimals of a circle in Openlayers to Kilometers

texts:
Possible Duplicate:
  Unproject Radius with Openlayers with CRS:84 Projection

I allow a user to draw a circle in Openlayers.

I created an alert to show the radius of the circle.

I now need to convert the radius to kilometers.

For example 0.001788057579325097 (How many kilometers is this)

How do I change this to kilometers? I think its just the decimals that is the problem.

      // The Drag function is now made and called
         // Add Drag
     drag = new OpenLayers.Control.DragFeature(polygonLayer, {
     autoActivate: true,
     onComplete: displayRadius
     });

 function displayRadius(circle) {
     var area = circle.geometry.getArea();
     var radius = 0.565352 * Math.sqrt(area);
     alert(radius);
      }


texts: Does QGIS support geographical filter in WMS GetMap request?

texts:
I have a layer in QGIS SERVER which I need to filter by adding a BBOX geographical filter. I know that QGIS Server supports a kind of CQL filter, as GEOServer does, as explained here: https://docs.qgis.org/3.16/en/docs/server_manual/services.html?highlight=wms%20filter%20getmap#wms-filter
But I cannot find the right way to apply a geographical filter.


texts: How to include and format multiple rows in inforview from cartoDB

texts:
I have seen similar questions answered but I have not managed to find anything suitable.

I have some buildings and when I click on a building I want the name and website of the companies in it. I have thus a query that merges information from my buildings table and my companies table and this query often returns more than one row with multiple columns (at least company name and website).

I am trying to use the Custom HTML editor but when I use the Mustache tag to call the result, I only get the first row. How can I access the information in the next rows?

Note that I have also tried to use the aggregated strings as suggested somewhere else, but this is not good enough since I want also other columns and to decide the order and formatting... unless I can apply some string handling functions to it from the HTML, is this possible?

I have also seen some CartoDB.js, however this is used on the website that will display the map, but I do not have access to it. I will provide the cartoDB link so that the map is embedded in another website.


texts: Is it good practice to manage all JTS spatial objects as abstract Geometry instances?

texts:
I'm new to all this GIS business, and am developing a Java web app using the JTS library. I'm trying to get my head around the JTS classes and how they're supposed to be used.

I have some existing code in which every spatial property is stored as a Geometry object, whether it's a Point or a Polygon. I understand that abstraction is generally nice, but if something is definitely a point (like Building.centerPoint), then surely it should be a Point type property? I'm further confused by the fact that the WKTReader returns a Geometry object no matter what type of WKT string you feed it (POINT or POLYGON), and that there does not appear to be any obvious way to convert such a Geometry object to a Point object without an ugly downcast or presumptive geomFactory.createPoint(geom.getCoordinate()), which is basically an implicit downcast anyway (it's probably not what you want if geom is a Polygon).

So my question is: is it good practice to manage all spatial objects as abstract Geometry instances? As motivational corollaries:

If not, what is the canonical way to convert a String to a Point?
If so, how should one determine the specific type of Geometry? For instance, if I want to validate that the user provided a Point rather than a Polygon?

I realise that functionally the distinction may not be of great importance; a Point may just have an area of zero, for instance, or perhaps a Polygon with a single coordinate should just be treated the same as a Point. However I'm primarily concerned with data storage and conversion, since I'm working with Spring Roo and I don't want any information getting lost or confused along the way.


texts: How to design a flood with water elevation on a specific point?

texts:
Actually I have to know the flooding area caused by a rise of the water level due to the implementation of a dam.
So I would like to know if there is an extension or any tool in QGIS or GRASS which can allow me to have the representation of this flooding area according to the water level (a variable I need to change often)?


texts:
I try to apply the apply the function of raster to vector from "Raster -> Conversion -> Polygonize", but it appears like follows:
An error has occurred while executing Python code:
UnicodeDecodeError: 'ascii' codec can't decode byte 0xb2 in position 19: ordinal not in range(128)

Traceback (most recent call last):
  File "C:/PROGRA~1/QGIS 2.18/apps/qgis-ltr/./python/plugins\GdalTools\tools\widgetPluginBase.py", line 88, in onFinished
    self.base.onFinished(exitCode, status)
  File "C:/PROGRA~1/QGIS 2.18/apps/qgis-ltr/./python/plugins\GdalTools\tools\dialogBase.py", line 208, in onFinished
    msg = unicode(self.process.readAllStandardError())
UnicodeDecodeError: 'ascii' codec can't decode byte 0xb2 in position 19: ordinal not in range(128)

Python version: 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:25:58) [MSC v.1500 64 bit (AMD64)]

QGIS version: 2.18.24 Las Palmas, ff5bd09ab3

And it asks for add more algorithms to the toolbox,enable additional providers...
What can I do?


texts: Is it possible to access the Python source code of the processing tools in QGIS 3.x (for example the Package layer tool) or is there a central code repository available?


texts: Creating GeoJSON from GRIB2 format using Python?

texts:
My ultimate goal is to create geoJSON from GRIB2 format using Python in order to display it at the Leaflet-open-street map.

I have the following data extracted from GRIBs:

Multi-dimensional array of x's (lon)

[[  0.     1.25   2.5  ... 356.25 357.5  358.75]
 ...
 [  0.     1.25   2.5  ... 356.25 357.5  358.75]]

Multi-dimensional array of y's (lat)

[[-90.   -90.   -90.   ... -90.   -90.   -90.  ]
...
[ 90.    90.    90.   ...  90.    90.    90.  ]]

Multi-dimensional array of values

[[5076. 5076. 5076. ... 5076. 5076. 5076.]
...
[5138. 5138. 5138. ... 5138. 5138. 5138.]]

As these arrays are related one-to-one to each other, number of elements in each is 42048.

How do I create geoJSON from them?

In order to draw it chloropleth-like  in Leaflet (here is more info on chloropleth-Leaflet if needed)

If I understand correctly, array of [x, y, val] will represent a Point and to draw the chloropleth (showing in colors values on the map) map I guess I need Polygons.


texts: Good Things To Highlight About GIS on a Company Website?

texts:
I'm in the process for creating the GIS content for our new company website. So far, I am having some serious issues. GIS is a complicated subject. First off, most people coming to our website won't have any idea of what GIS is. Conveying this information is a task in itself. So far I've got a few ideas:

A geographic information system (GIS) lets us visualize, question, analyze, and interpret data to understand relationships, patterns, and trends. GIS is becoming essential to understanding what is happening and what will happen in any given geographic space.  Once we understand, we can prescribe action.
A Geographic Information System (GIS) is a computerized tool for mapping and performing analysis. GIS has changed the way we view the geographic world in which we live and the way information is transmitted.
GIS (Geographical Information System) is a computer system capable of capturing, storing, analyzing, and displaying geographically referenced information; that is, data identified according to its location. Our GIS helps us with many natural resource-based management projects, such as watershed studies, constraint mapping, and forest management plans.
GIS (Geographical Information System) is the way to understand the natural world around us in the present and future. GIS is the new form of cartography, taking it to a whole new level. With GIS you can predict floods, identify natural areas in danger, find the best habitat for endangered species, plan cities into the future and communicate all of this information in a way that everyone can understand.

Next I work on relating it to our company, but that part is a little easier. Our company is a conservation authority in Ontario. Our main goals in the GIS department are to support our municipalities, manage flooding risks, protect the environment (animals and habitat) and help land owners with stewardship.

Basically I need some help from the GIS Pros on here to help me convey a good way to communicate what GIS is (in one paragraph) to a the non GIS population. I'll take links, edits, fresh ideas anything you guys have.


texts: How to join and display .shp lines with values in .dbf

texts:
I've got a shapefile lines with ID attribute and .dbf with values which corresponds do ID. Every value in dbf is in different record.

I want to style lines and display label using these values from dbf. I tried to use Join tool in layer's properties in QGIS but it joined only a few of values.

I shown you just a simplified example...

My "real life" problem is a little bit different. I've got a shapefile with geometry of roads. Every link of the roads has a unique ID attribute. On the other hand I've got a dbf file with information about road restriction.

Structure of dbf is: road_linkID - type - value

road_link1 - max_height - 2
road_link1 - speed limit - 50
road_link1 - max_weight - 3,5
road_link2 - speedlimit - 60
road_link3 - max_weight - 3,5
road_link3 - speedlimit - 60
road_link3 - max_height - 4

When I'm using layer\properties\join to my road.shp adds one column with only one parameter:

road_link1 - max_height - 2
road_link2 - speedlimit - 60
road_link3 - max_weight - 3,5


texts: Creating minimum number of polygons that surround multiple points in ArcGIS Desktop?

texts:
I have around 300 points randomly distributed (some near to each other, some far from each other) on a map.

I want to create a layer that contains multiple circle polygons of 800 metres diameter such that these polygons are able to encompass all the above 300 points. And that the number of such polygons are as minimal as possible in achieving the above.

Initially, I tried using the buffer tool but realized this is not the correct one. I am using ArcGIS 10.3 Desktop version


texts:
I have imported a PostGIS layer as the only object into my project and set the project and layer CRS to EPSG:32615 (UTM Zone 15N).  My layer appears just fine in the work area.  When I try to create a print composer, I cannot get the map to appear in the print composer, even though I click the Set to map canvas extent button in the composer.  The print composer only shows a blank, white area.  If I set the project CRS to EPSG:4326 I can add the map to the print composer.

Is there a setting I need to change to adjust to CRS of the print composer?

EDIT
Following some advice, I created a layer and manually added a polygon.  I noticed the issue pops up when I try to place the polygon near the origin. If the polygon is hundreds of thousands of meters from the origin, when I add the map to the print composer, things work fine.  If I place the polygon around the origin (positive and negative x and y values), the print composer seems not to like it.  With the linked file, I noticed that if I changed the scale of Print Composer 3 to 32 or less a zoomed in version of the polygon appears.  Anything higher than 32 gives me a blank page.

Test File: https://drive.google.com/folderview?id=0B-SpdXvKI1JgX1lGbnFDMWFxRHM&usp=sharing

This makes me think I've configured something incorrectly. Can anyone spot it?

Sample WKT:

"MULTIPOLYGON Z (((11.0959798314622 6.46039688549521 0,11.885913117052 5.85981372972084 0,11.6611675157088 5.56421098165167 0,10.8708850668735 6.16452289633918 0,11.0959798314622 6.46039688549521 0)))"
"MULTIPOLYGON Z (((11.885913117052 5.85981372972084 0,11.0959798314622 6.46039688549521 0,11.3224760481292 6.75811300197837 0,12.1123181897999 6.15759914256564 0,11.885913117052 5.85981372972084 0)))"
"MULTIPOLYGON Z (((11.5466005766636 7.05271167221563 0,12.3363525288016 6.45226638354819 0,12.1123181897999 6.15759914256564 0,11.3224760481292 6.75811300197837 0,11.5466005766636 7.05271167221563 0)))"
"MULTIPOLYGON Z (((12.3363525288016 6.45226638354819 0,11.5466005766636 7.05271167221563 0,11.7764387175175 7.35482055386346 0,12.5660981809189 6.75444558401706 0,12.3363525288016 6.45226638354819 0)))"
"MULTIPOLYGON Z (((12.0073425546073 7.65833023129213 0,12.7984300880318 7.06002642651748 0,12.5660981809189 6.75444558401706 0,11.7764387175175 7.35482055386346 0,12.0073425546073 7.65833023129213 0)))"
"MULTIPOLYGON Z (((12.7984300880318 7.06002642651748 0,12.0073425546073 7.65833023129213 0,12.232087222072 7.95374403812074 0,13.0236497939066 7.35625275343114 0,12.7984300880318 7.06002642651748 0)))"
"MULTIPOLYGON Z (((12.4618565878502 8.25576251892767 0,13.2512402335275 7.65559725220707 0,13.0236497939066 7.35625275343114 0,12.232087222072 7.95374403812074 0,12.4618565878502 8.25576251892767 0)))"
"MULTIPOLYGON Z (((13.2512402335275 7.65559725220707 0,12.4618565878502 8.25576251892767 0,12.6819923681615 8.54511821138774 0,13.470326977221 7.94375703426402 0,13.2512402335275 7.65559725220707 0)))"
"MULTIPOLYGON Z (((12.9075850363348 8.84164744281931 0,13.6967905731785 8.24161942134774 0,13.470326977221 7.94375703426402 0,12.6819923681615 8.54511821138774 0,12.9075850363348 8.84164744281931 0)))"
"MULTIPOLYGON Z (((14.157865342396 8.84806051755353 0,13.9250314628096 8.5418194421421 0,13.1383077374417 9.14491982213477 0,13.3700411704104 9.44952075323603 0,14.157865342396 8.84806051755353 0)))"

Project CRS:

Layer CRS:


texts: I am having a hard time implementing a UI tooltip in a CartoDB.js viz. Could someone demonstrate how to implement using this fiddle on the variable {{NAME}}?


texts: Setting single output location for multiple files in ModelBuilder?

texts:
I have created a model in ModelBuilder. The first step is for the user to specify the location of the File Geodatabase that all the outputs will be saved in. What I want is for all the outputs (from the different tools within the model) to be saved in that FGDB; however, it could be called anything and located anywhere.

So how do I cause the output to be saved in the location that is specified in the first step?


texts: Accessing raster values to create histogram using ArcPy?

texts:
Using native Python and arcpy function what method is best to create a histogram of raster dataset? I know it's possible to use raterio and GDAL functions, but I would like to keep it a arcpy and native Python.

Specifically I am working on a script to delineate watersheds and I would like to create a raster based on the values in a flow accumulation raster dataset. From the calculated raster I would then convert to vector stream layers. The ultimate goal is to be able to create separate stream order layers.


texts: How to connect QGIS to a WMS-C with python?

texts:
I would like to connect my QGis to a WMS-C server when my python plugin load.
How can I do that ?

BTW, the method:
    addRasterLayer
do not seams to handle WMS-C layer...


texts:
I am using Qgis 2.16 version .I have some basemap data but when I load it in the text layer (I can’t remember what its called but you should be able to see road names, house numbers etc) has an “orientation” field however I if I apply that field as an angle setting for the text it doesn’t align to roads, house orientation etc.

I guess because these are orientation values rather than angle values from 1-360 degrees?
the crs used is EPSG 27700 .

Can anyone help me to do anything with it to get it to render correctly?

What i need is not the alignment. i need to rotate the label according to the orientation. when i am using the orienation field for rotation. The label is not properly rendered. I am attaching the screen shot for your reference

I am attaching the screenshot of my attribute data for your reference. Im unable to attach the screenshot in comments that is y i am attaching here. please check and help me to sort out


texts: Automatic extraction of buildings geometry from a shapefile

texts:
I have a shapefile of Montreal which includes the geometry of buildings and some attributes like the year of construction. I also have the building's geometrical data from another source. So I know the latitude and longitude (also x y z coordinates) of each vertex of a building.

I want to extract building's features from this shapefile with latitude and longitude of the corresponding vertices. By this way, I can combine the data from both sources by geometrical data.

I imported the shapefile into QGIS and opened the attribute table. The attribute table only shows the building's features, not the coordinates.

I want to know how I can automatically extract features coordinates by QGIS or any other tool from this shapefile?

I tried the  field calculator but the new column does not show any number


texts: Need to enhance a function for creating quadrants within polygons

texts:
I wrote a function that creates arbitrary quadrants within a polygon

SELECT (quadrant(20,0.0,90)).*

The first parameter is the polygon ID, the second one is the start angle and with the third one the quadrant is finally spanned.

First the TYPE

CREATE TYPE quadrant AS (id smallint,geom geometry(polygon,31468))

Here is the function

CREATE OR REPLACE FUNCTION quadrant(id integer,start double precision, stop integer) RETURNS SETOF quadrant AS $$
WITH centroid AS
(SELECT
    accumulation.partnumber,
    (ST_Centroid(accumulation.geom)) AS vertex
FROM accumulation
    WHERE partnumber=$1
),
newline AS
(SELECT
ST_SetSRID(ST_Translate(
                ST_Rotate(
                    ST_MakeLine(
                          ST_MakePoint(0.0,2000.0),
                          ST_MakePoint(0.0,0.0)),
                radians(($2+s.a)*-1)),
          ST_X(vertex), ST_Y(vertex)),
ST_SRID(vertex)) AS geom
FROM centroid, generate_series(0,$3,$3) AS s(a)
),
span AS
(SELECT
    centroid.partnumber,
    ST_LineMerge(ST_Union(newline.geom)) AS geom
FROM newline, centroid
    GROUP BY partnumber),
multiobject AS
(SELECT
    span.partnumber,
    ST_Split(accumulation.geom,span.geom) AS geom,
    generate_series(1,100) AS n
FROM span, accumulation
    WHERE accumulation.partnumber=$1),
objects AS
(SELECT
    n,
    ST_GeometryN(multiobject.geom,n) AS geom
FROM multiobject
    WHERE n <= ST_NumGeometries(multiobject.geom))

SELECT
    partnumber AS id,
    objects.geom
FROM objects, multiobject
    WHERE multiobject.n <= ST_NumGeometries(multiobject.geom)
        ORDER BY LEAST(ST_Area(ST_GeometryN(objects.geom,multiobject.n)))
            LIMIT 1
$$ LANGUAGE 'sql';

I applied this function for 300 polygons and I noticed a problem.
My last query results the smallest piece from the split. But in some cases, when the first newline (see subquery newline) crosses the polygon more than one time, there is a smaller piece that represents the quadrant (see the most right object in the picture below).

The query doesn't calculate the right quadrant for the left object in the picture. In this case the smaller area of the split is not the quadrant, because the polygon is plumped to the northeast direction.

So my question is, how I can enhance my query to avoid these incorrect quadrants. Maybe I have to overthink the function generally.


texts: How to define the name of the table in shp2pgsql

texts:
I use shp2pgsql to append a shapefile to an existing table.

How can I define the table where I want to append the shapefile in PostGIS?

This is the command I execute with Python:

command = "shp2pgsql -s 4326 -a shape_file.shp | psql -h localhost -p 5432 -d gis_exercise -U postgres"

But this commands generates a table with the name of the shapefile.


texts:
Is there a simple webpage that I can paste a geometry field from POSTGIS (OSM data - sRID 900913) and it will show on the map?

Something like this http://www.darrinward.com/lat-long/ but with geometry data

I know there are a toon of apps that will do this, but this is just for quick checks.


texts: Displaying Buffer overlap in ArcGIS Pro with Intersect?

texts:
I have created some buffers around some points in ArcGIS Pro, and I am wanting to recognize the area of the buffers that overlap with another buffer within the same layer with a different color. How can I do this?

This is what I am dealing with pictured below.

I am looking to take the overlaps that exist (hard to see but the green is below the purple with about 2 meters of overlap) and make them separate colors. I realize that symbology won't do this alone without there being some recognizable indicator that the areas are overlaps, and the intersect tool came close, but the new polygon was not accurate of the buffer sizes (it looked about what I was looking for except the intersect looked as if the buffers were 30% larger than they actually are, maybe that is the focus of the problem).

Any ideas as to where some sources of error could come from with using the intersect tool? Or do you know of any other ways to do this?

A 2D solution can be changed to 3D as well.


texts: PDAL : Changing Dimension name when converting LAS file to PLY file

texts:
I am using a PDAL pipeline to translate LAS file to PLY.
But I would like the header of the PLY file to have the name of the dimension Classification set to class.
So in the header of the file PLY file there
[
    {
        "type":"readers.las",
        "filename":"dalle_foret.las"
    },
    {
        "type":"writers.ply",
        "storage_mode":"little endian",
        "filename":"dalle_foret-bin.ply",
        "dims":"X=float32,Y=float32,Z=float32,Classification=int32"
    }
]

This is the current header :
ply
format binary_little_endian 1.0
comment Generated by PDAL
element vertex 6202697
property float64 x
property float64 y
property float64 z
property uint8 classification
end_header

I want the line property uint8 classification to be like property uint8 class
Is there a parameter to do that ? other than to modifying manually the file after PDAL translate ?


texts: Which weather on my road? Looking for a spatial weather forecast web service

texts:
My friend Bob goes from A to B leaving tomorrow morning at 6:00. There are many direction services that indicates him short, fast and/or cheap routes. Bob does not like to drive under the rain and wants to know which weather is forecast along different routes.

To help him, I would like to develop a web service that enriches existing direction web services and provides him with the "weather profile" of his trip from A to B. Such weather profile could be represented like on the following image (taken from the excellent Norwegian website www.yr.no), except the X axis would be the travel time (or distance):

Do you know if such service (or comparable) already exist?

Do you know some useful weather forecast web services to develop such thing? The requirement would be a service that provides for any location (lon,lat) a forecast (temperature, rain, etc.) for a given date/time.


texts: How to use a DTM (Geotiff) as web based basemap?

texts: I created a DTM as geotiff and I want to use it at basemap in web based virtual globe Cesium. How can I carry out this task? Cesium has a terrain provider and it requeries an URL for basemap. How can I turn my geotiff image (DTM) to an URL?


texts:
I would like to create small walking paper maps of Chinese cities parts and thought to use QGIS(print pdf + via plotting). With QuickMapServices plugin I added the map and of course the street names are in Chinese. Using the info OSM plugin I've seen that the data are partially available in English.
I therefore ask whether it is possible to display street names in English or other Western characters.


texts: Weird behaviour of ST_Project with PostGIS2

texts:
somehow I can't understand the results of ST_Project, but maybe this problem is just me being stupid (again):

Note:

I use geography-type here, but the results are the same for geometry.
I use a rather long distance, because I need, at least in one direction, for my application a large distance. Because of this I found the problem in the first place.

So I just want to project a point towards North, East, South and West.
With the direction north, everything is as I expect it:

SELECT ST_AsText(ST_Project('POINT(-30 -0.5)'::geography, 1e7, radians(0)));
      st_astext
-----------------------------
POINT(-30 89.4874128664049)

But in the other directions, here for example East, I get this:

SELECT ST_AsText(ST_Project('POINT(-30 -0.5)'::geography, 1e7, radians(90)));
              st_astext
---------------------------------------------
POINT(59.8315233716443 0.00116689648502556)

Shouldn't this be POINT(59.8315233716443 -0.5) ?

This behaviour occurs in all directions save north.

I'm new to the whole earth coordinate system-stuff so maybe I missed something, but I thought that when one walks directly west (or south) one would, by definition, not leave the current longitude (or latitude)-line but only change the other.

Any help would be appreciated!
Thank you.


texts: Anyone try generating C# classes from http://schemas.opengis.net?

texts: I'd like to generate gml/wfs/wms classes from the OGC schemas.  Using xsd2code I receive numerous errors, one of them being "Invalid particle derivation by restriction".  I'm curious is anyone has successfully generated .NET classes from the OGC schemas and if so, how?


texts:
According to http://www.gdal.org/drv_mssqlspatial.html I should be able to add a SCHEMA to my connection string to override the default "dbo" schema:

  SCHEMA: Set name of schema for new table. If this parameter is not
  supported the default schema "dbo" is used.

But it does not seem to have any effect and I cannot find an example of how it should be done:

call ogr2ogr -overwrite -skipfailures -f MSSQLSpatial "MSSQL:server=myserver;database=mydb;trusted_connection=yes;SCHEMA=geoserver;" "C:\temp\MapVegas860\Buildings.shp"

How to import the shapefile into a 'geoserver' schema?


texts:
I'm using OpenLayers to make warehouse map.
How to prevent drawing lines (paths) over some vector objects already on the map?


texts: Creating square buffers around points using shapely?

texts:
I am trying to create square buffers around given points, I am able to create circular buffers but how do I create square ones?

from shapely.ops import transform
from shapely.geometry import Point
    local_azimuthal_projection = "+proj=aeqd +R=6371000 +units=m +lat_0={} +lon_0={}".format(lat, lon)
                    wgs84_to_aeqd = partial(
                        pyproj.transform,
                        pyproj.Proj('+proj=longlat +datum=WGS84 +no_defs'),
                        pyproj.Proj(local_azimuthal_projection),
                    )
                    aeqd_to_wgs84 = partial(
                        pyproj.transform,
                        pyproj.Proj(local_azimuthal_projection),
                        pyproj.Proj('+proj=longlat +datum=WGS84 +no_defs'),
                    )

                    point_transformed = transform(wgs84_to_aeqd, Point(float(lon), float(lat)))
                    buffer = point_transformed.buffer(0.5*1000)
                    buffered_geom = transform(aeqd_to_wgs84, buffer).exterior.coords[:]


texts: Statistically comparing positions from two track datasets?

texts:
I have two datasets with positions that I need to compare. One would be the "observed" positions (someone took the GPS positions manually) and the other one was calculated using a software. To use statistical terms, I will call the latter one the "estimated" positions. These two dataset mostly overlap, but plotting both datasets is not enough, I need to conduct some kind of statistical analysis to show the results.
Can anyone suggest a tool in ArcMap that I could use for this purpose?
From what I have seen so far, most Spatial Statistics tools only work with densities, but they don´t seem to be applicable for track datasets.


texts: ArcGIS 10 restricted WEIGHTED Flow Accumulation

texts:
I have a question very similar to one asked by wxfox4god on 12th June 2013 ("Arcmap 10 restrict Flow Accumulation") that was answered by whuber. (I have had to post it as a new question as I do not have the reputation to post a comment.)

The original question was about performing a version of the ArcGIS flow accumulation tool that is restricted to only accumulating cells from within a given distance. So for every cell in the raster the process finds how many cells within a certain distance would flow into that cell. whuber suggested a clever workaround using focal statistics iteratively.

However, my problem differs in that I need to find the weighted flow accumulation for every cell in the raster based on cells only within a certain distance. So for every cell in the raster I need to know the sum of all of the values from the cells that flow into that raster from within a specified distance.


texts: Points equally spaced in polygon, allowing for slope using ArcGIS Desktop?

texts:
I need to create a grid of points within a given area so that each point is 75m across the ground from any other point. The fish net tool would create the desired outcome on flat land but I need to take slope into account. I'm using this to allocate positions for a trap network for pest animal control and the site is relatively steep. I normally do this manually using contours and the buffer tool and just manually working out distance over ground for different slopes but I just wondered if anyone might know a better way?

I seek an ArcGIS 10.3 solution.


texts: How can I create a numeric field (not ObjectID) with a unique number for each record?

texts:
I need to do some analysis in ArcGIS, export the data to Excel, do some more analysis, import the results back to ArcGIS, and join the resulting table back to one of the original feature classes. Am I right that it's not a good idea to use the OBJECTID field for this, as the data, when imported from Excel to table, will get OBJECTIDs of their own? The data is on census blocks, which have 15-digit IDs. I tried stripping off the state and county codes to make them 10-digit, but even then, the numbers are too high for the DOUBLE field type. (From Excel, the data will be exported to SAS, where the IDs will need to stay in the same matrix with other data, so they need to be numeric.)

If OBJECTIDs won't work and census block IDs are too long or too high, can I create my own numeric unique ID? There is a triple-digit number of blocks in my study area, so I guess a 3-digit (or 4-digit, just in case) ID should be enough. Can I, in ModelBuilder, create a unique numeric ID field that stays unchanged when the table is exported, imported back into ArcGIS, etc.? In other words, just another numeric attribute?


texts: Openlayers: error 405 (Method not allowed) while attempting to add a WFS-T layer

texts:
I need your help: basically I need to add, on a map with several layers already on, another layer WFS-T to allow adding and saving new features to a database. I checked on the internet and syntax looks OK, but all I get is an error 405 (method not allowed).

The server I'm using for the web app is IIS Express; for the layers I'm using GeoServer hosted on it's default server (not Apache) on port 8080.
Of course I'm already using a proxy. Here is also the piece of my code about the WFS layer:

var database_poi = new OpenLayers.Layer.Vector("Points on Database", {
            protocol: new OpenLayers.Protocol.WFS({
                version: '1.1.0',
                url: 'http://localhost:8080/geoserver/wfs',
                featureType: 'database_poi',
                geometryName: 'ogr_geometry',
                srsName: 'EPSG:4326',
                featurePrefix: "Grottole"
            }),
            strategies: [new OpenLayers.Strategy.Fixed(), saveStrategy],
            projection: new OpenLayers.Projection('EPSG:4326'),
            eventListeners: {
                'featureselected': function (evt) {
                    var feature = evt.feature;
                    var popup = new OpenLayers.Popup.FramedCloud("popup",
                        OpenLayers.LonLat.fromString(feature.geometry.toShortString()),
                        null,
                        feature.attributes.ogr_geometry,
                        null,
                        true,
                        null
                    );
                    popup.autoSize = true;
                    popup.maxSize = new OpenLayers.Size(400, 800);
                    popup.fixedRelativePosition = true;
                    feature.popup = popup;
                    map.addPopup(popup);
                }
            }

        });

I really hope you can help me


texts:
I am trying to generate a map in mapserver by connecting a postgres database but it is not displaying any maps. My table name is a19010100001001.

mapfile is LAYER.map

MAP
NAME "MP"
SIZE 400 400
STATUS ON
EXTENT 1143759 4417539 1146436 4420390
UNITS METERS

WEB
TEMPLATE "template.html"
  IMAGEPATH "C:\ms4w\Apache\htdocs\output"
  IMAGEURL "/OUTPUT/"
END

LAYER
        CONNECTIONTYPE Postgis
        CONNECTION "host=localhost dbname=postgis20 user=postgres password=******* port=5432"
        DATA "the geom FROM a19010100001001"
    NAME "a19010100001001"
    TYPE POLYGON
    STATUS ON
    CLASS
      STYLE
        COLOR 255 235 190
        OUTLINECOLOR 0 0 0
        SYMBOL 0
      END
    END
END
END

startmap.html

<title>Creating a simple image using Mapserver and a Shapefile</title>

Creating a simple image using Mapserver and a Shapefile

This page simply contains a link which sends a set of instructions to the Mapserver application using a mapfile.

The information stored within the mapfile tells the Mapserver application how to draw the map.

Click on this link to view a map generated using a Shapefile.

**template.html**

<title>Simple Mapserver Template HTML Document</title>

The image below was illustrated based on the instructions sent in the mapfile.

Where is the mistake?


texts: Piping output of Iterate Raster tool into Raster Calculator tool using ModelBuilder?

texts:
ArcGIS v10.1 ModelBuilder

Using ModelBuilder and map algebra, I want to compute a ten year average grid from a stack of 10.  The problem is that only 1 grid (%raster%), the last one through the Iterate Rasters tool, is available as input to the Raster Calculator tool.

I am using the Iterate Rasters tool to go through a folder of asc grids.  The folder contains ten subfolders, one for each year from 2001 to 2010, inclusive.  Inside of each of these are twelve asc grids, one for each month.  The monthly grids have identical names for all years where the number indicates the month (e.g., name07.asc).   I am using a wildcard that works to successfully iterate over the grids (e.g., ten "July" grids), and define the projection for each; However, the raster calculator then only accepts one of these grids instead of all ten.

Is it possible to use the Iterate Rasters tool with the Raster Calculator tool in ModelBuilder?


texts: The Java API bindings: Band.GetActualBlockSize

texts:
The Java API bindings are missing Band.GetActualBlockSize: https://gdal.org/java/org/gdal/gdal/Band.html
I have several questions:

Is it possible to reproduce the code for https://gdal.org/api/gdalrasterband_cpp.html#_CPPv4N14GDALRasterBand9ReadBlockEiiPv

Whether Band.GetActualBlockSize was omitted deliberately and there is another way to iterate over blocks using Java API?


texts:
I am working on my first experiment with Maxent.

I am using two different species.

When I receive the output map and look at it in QGIS the values for suitable habitat probability do not sum to 1.

Rather, they each sum to much less or much more.

These are the two scales that are produced. Is this abnormal? Does it simply reflect that the model is not very confident? What could explain this?


texts: Getting existing rotational value in QGIS?

texts:
I have one DXF file for and I loaded in QGIS canvas.

In attribute table I did not found any angle for label.

How can we know the existing angle in which the label displayed?


texts: What is the difference of using esri/geometry/geometryEngine distance method and GeometryService length method? Which is faster and capable of calculating distance on Mouse Move event on client side in JS API?


texts: Polygon intersection with LineString in PostGis

texts:
I have a table which contains GPS coordinates at certain times. I created a LINESTRING from them ordered from the oldest to newest.
I also have a POLYGON and I would like to determine the subset of my LINESTRING which lies inside my polygon. This subset should be only the points from the table - no interpolated points from the linestring. All my geometries have SRID 4326.

I used the ST_Intersection(myLinestring,myPolygon). Because the linestring goes in and out of the polygon multiple times I expect the intersection will be GEOMETRYCOLLECTION of multiple LINESTRINGs (which correspond to the individual continuous components of the path inside my polygon).

As a quick check to determine the number of components inside I ran: ST_NumGeometries(ST_Intersection(myLinestring,myPolygon)) but I got some really big number which actually exceeds even the number of coordinates in my table.
When I ran ST_AsText(ST_Intersection(myLinestring,myPolygon)) I saw that the result is rather a collection of many individual points which lie inside the polygon AND the linestring, but they ARE NOT the samples from my table.

How do I do this right?

EDIT: I need to know the connected path components lying inside the polygon, not just the isolated points inside the polygon.

I need to know the inner linestrings so I can determine the total approximate time spent inside the polygon (the time differences of the first and last point of the inner path component summed over all those components would give a precise estimate of the time spent inside the polygon).


texts: Raster result is different for arcpy.sa CON and arcpy.gp.Con_sa

texts:
I have to add two rasters, one bigger than the other, but before adding I have to set the value of NODATA of smaller raster to the value of bigger raster.

So i used the following code to do it:

import arcpy
from arcpy.sa import *

arcpy.CheckOutExtension("Spatial")

arcpy.env.extent = "MAXOF"
arcpy.env.overwriteOutput = True

smallerRaster = arcpy.Raster(r"C:\Temp\smallraster.asc")
biggerRaster = arcpy.Raster(r"C:\Temp\bigraster.asc")

OutputRaster = Con(IsNull(smallerRaster), biggerRaster, smallerRaster + biggerRaster)

resultRaster = r"C:\Temp\resultRaster"
OutputRaster.save(resultRaster + "_con.tif")
arcpy.RasterToASCII_conversion(resultRaster + "_con.tif", resultRaster + "_con.asc")

arcpy.gp.Con_sa(IsNull(smallerRaster), 0, resultRaster + "_con_sa.tif", smallerRaster + biggerRaster)
arcpy.RasterToASCII_conversion(resultRaster + "_con_sa.tif", resultRaster + "_con_sa.asc")

For Con_sa, smaller raster cell value (those that are NODATA) is assigned to NODATA value (in my sample it is -9999) instead of assign with bigger raster cell value. (I tried with constant value of 0, it still assigned them with NODATA)

I need to use Con_sa because the script can be executed by more than one instance of application.
While Con result is what I needed, the output temporary result will be stored in "\AppData\Local\ESRI\Desktop10.3\SpatialAnalyst\", when the script executed in paralel, the CON will fail due to racing condition in code execution (either throw FATAL error) or (Raster cannot be found).

So is there away to set the NODATA value to constant value when I'm using Con_sa for my scenario above?
I will attach the raster ASCII that I used in this example.

Small Raster

Big Raster

Raster CON Result

Raster CON_SA Result


texts:
There is another question about raster data for GeoServer.
Conditions:
 - PostGIS 2.0.3 and PostgreSQl 9.2.
 - I followed: http://docs.geoserver.org/stable/en/user/tutorials/imagemosaic-jdbc/imagemosaic-jdbc_tutorial.html step by step.

I got an error:

    java -jar "c:\..\gt-imagemosaic-jdbc-11.2.jar" import  - config c:\..\osm.postgis.xml -spatialTNPrefix
tileosm -tileTNPrefix tileosm -dir c:\..\tiles\ -ext png
java.io.IOException: select srid from geometry_columns where f_table_schema=? an
d f_table_name=? and f_geometry_column=?  has no result for public,tileosm_0,geo
m
        at org.geotools.gce.imagemosaic.jdbc.Import.calculateSRS(Import.java:600
)
        at org.geotools.gce.imagemosaic.jdbc.Import.<init>(Import.java:203)
        at org.geotools.gce.imagemosaic.jdbc.Import.start(Import.java:400)
        at org.geotools.gce.imagemosaic.jdbc.Toolbox.main(Toolbox.java:46)

The reference system and geometry were added by

psql -U postgres -d gis  -f "c:\Program Files\PostgreSQL\9.3\share\contrib\postgis-2.1\spatial_ref_sys.sql"

psql -U postgres -d gis  -f "c:\Program Files\PostgreSQL\9.3\share\contrib\postgis-2.1\postgis.sql"

Has anybody have an idea what is the problem? I had the same with the real database not only in this tutorial.


texts:
I have a .kmz file that I can't load properly into QGIS. I already rename the file as .zip and look into the files inside. I found the .kml text file and  an other folder with a .png image (the one that I would like to open in QGIS as raster).
When I open the .png directly in QGIS, the values doesn't make too much sense and I loose the geo-reference coordinates. Any advice on it?


texts: How long does it take for a Sentinel2 image to become available after acquisition

texts: If one is interested in developing a near-real-time application that uses satellite data (Sentinel 2), then one would need to know what is the lag time between when the image is taken by the satellite, to when its available for download/use. I guess most relevant would be level-1c, but one would also be interested in l0, l1a, and l1b.


texts: Finding points on an odd map projection using interpolation between known points

texts:
I have an image of a somewhat idiosyncratic projection that is a frame from a film:

A geographer friend of mine said it was probably some kind of Gnomic projection, but that from the resolution it wasn't possible to know for sure. I wouldn't know.

You can see North America at top left, and the Soviet Union and China (!) in red with a black border around it in the middle-right of the frame. The dark vertical and lighter horizontal lines visible seem to go through the North Pole. As you can guess this is a declassified target map from the Cold War; those branched lines are bomber routes (some from bases, some from refueling points).

I am interested in finding the rough lat/lngs of the ends of the branched lines (the "targets"), knowing, of course, there is going to be a large margin of error because of the resolution,. I could hunt and peck these by hand, working first to identify targets that ought to be on there (e.g. Moscow), but it seems like there ought to be an easier way.

There are plenty of identifiable geographical locations on there, such as James Bay in Canada, the tip of Gujarat in India, the Caspian Sea, and so on.

My first thought was to try line between a number of these by hand in Adobe Illustrator, then draw similar lines in Google Earth, and use them as a rough grid to triangulate the missing points by hand. This is of course difficult. I then thought maybe there was some way to do this algorithmically — if I know the lat/lng of fixed pixel locations, can I move from there to figuring out the missing lat/lngs of other pixel locations? I suspect this might be harder than it sounds, given that I don't really know the projection that produced those pixel locations.

Is there a better way? Any thoughts would be appreciated.


texts: Use 'if' statement in ModelBuilder to stop model

texts:
I would like to use an if-else statement in my model (along the lines of this Esri blog). My model works fine (several intersects, dissolves, calculating fields, joins). However, I would like to add a check after the first process runs, which is an Intersect. If the output has 0 rows (using Get Count), the model should stop, else continue. Using the following code in the Calculate Value code code block

def countRows(rowcount):
    import arcpy
    if %rowcount% == 0:
        return false
    else:
        return true

and expression

countRows(%rowcount%)

The model runs and generates a warning

The process did no execute because the precondition is false.

It then just carries on running the other processes, all which generate the warning

All the inputs are not current.

To summarise: The input is intersected, and the rows in the output are counted. If the number of rows is 0, return false and stop. If true, carry on processing. The Calculate Value tool is set as a precondition before all the other processes can run. I've looked at the Stop-Continue tool as well, but I'm not sure how (if?) I should be using it in this instance.

edit Ran the model on an input that I knew would generate some rows after the intersect, when the Calculate Value ran and returned true, the model stopped with the error

Error 000539: Error running expression: countRows(3546) <type 'exceptions.NameError'>:
global name 'true' is not defined. Failed to execute (Calculate Value).


texts: How to share a custom Arcmap .mxd and toolbar?

texts:
Using Arc 10.3.1, I created two tools (via Modelbuilder) which are in their own toolbox.

I then created a new Arcmap toolbar, named "Wetland Rating", and added the two tools, each with their own buttons, to that toolbar.  The toolbar is to be used in conjunction with a purpose-built .mxd.  Please see the two following images:

The .mxd and toolbox are stored on my organization's network path/folder.  Everything works fine when I load the .mxd and use the tool buttons.

However, other users in the organization need to access this .mxd and its toolbar buttons.  Here's the problem: when those users load the mxd, its layers display correctly, but my toolbar and its buttons do not appear.  The .mxd is useless without the associated toolbar.  How can I share this .mxd/toolbar with other users?


texts: Feature Split by Attribute in different folders

texts:
I want to split a vector by an attribute but instead of getting all of them in a single folder, I need them by separate folders (say the same attribute I´m splitting, or another).

I tried splitting by attribute and then copying datasets, but I get Error 110 because the folder does not exist.

Is it possible to use the Model Builder to

split a feature by an attribute,
create a new folder for each attribute, and
place each new layer in the corresponding folder?


texts: What is causing LDOPE error when opening .hdf files?

texts:
I get the following error when I try using LDOPE-1.7 on Linux (64 bit) with Modis QA data. The specific dataset resides in the LDOPE-1.7 directory.

bash-4.1$ ./unpack_sds_bits -of=ldopeQA.hdf -sds="BRDF Albedo Band Quality" -bit=0-3,4-7 MCD43A2.A2006153.h13v09.005.2008126030730.hdf
1 BRDF Albedo Band Quality

Processing input hdf file: MCD43A2.A2006153.h13v09.005.2008126030730.hdf
---------------------------------------------------------------
Cannot open input HDF file MCD43A2.A2006153.h13v09.005.2008126030730.hdf
Done!

Can anyone please point out where I am going wrong?


texts:
I want to change SLD of WMS layer dynamically. In SLD string I have CssParameter XML tag that has Hex color code like "#ff0000". When I post it to GeoServer I got this error:

  java.lang.RuntimeException: org.xml.sax.SAXParseException; lineNumber:
  1; columnNumber: 619; XML document structures must start and end
  within the same entity. org.xml.sax.SAXParseException; lineNumber: 1;
  columnNumber: 619; XML document structures must start and end within
  the same entity. XML document structures must start and end within the
  same entity

That refers to line the line that it has the # character. Here is the code sample:

var SLD = '<?xml version="1.0" encoding="UTF-8"?>  <StyledLayerDescriptor version="1.0.0" xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd" xmlns="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:se="http://www.opengis.net/se">';
SLD += '<NamedLayer><Name>pmo:iczmoagriculturemokran</Name><UserStyle><Name>pmo:iczmoagriculturemokran</Name><Title>Green polygon</Title><Abstract>Green fill with black outline</Abstract><FeatureTypeStyle><Rule><PolygonSymbolizer><Fill><CssParameter name="fill">#ff0000</CssParameter></Fill><Stroke /></PolygonSymbolizer></Rule></FeatureTypeStyle></UserStyle></NamedLayer></StyledLayerDescriptor>';

SLD = encodeURI(SLD);
var source = layer.WMSLayer.getSource();
source.updateParams({ STYLES: undefined, SLD_BODY: SLD });

After encodeURI SLD turns to:

%3C?xml%20version=%221.0%22%20encoding=%22UTF-8%22?%3E%3CStyledLayerDescriptor%20version=%221.0.0%22%20xmlns=%22http://www.opengis.net/sld%22%20xmlns:ogc=%22http://www.opengis.net/ogc%22%20xmlns:xlink=%22http://www.w3.org/1999/xlink%22%20xmlns:xsi=%22http://www.w3.org/2001/XMLSchema-instance%22%20xsi:schemaLocation=%22http://www.opengis.net/sld%20http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd%22%3E%3CNamedLayer%3E%3CName%3Egreen%3C/Name%3E%3CUserStyle%3E%3CName%3Egreen%3C/Name%3E%3CTitle%3EGreen%20polygon%3C/Title%3E%3CAbstract%3EGreen%20fill%20with%20black%20outline%3C/Abstract%3E%3CFeatureTypeStyle%3E%3CRule%3E%3CPolygonSymbolizer%3E%3CFill%3E%3CCssParameter%20name=%22fill%22%3E#ff0000%3C/CssParameter%3E%3C/Fill%3E%3CStroke%20/%3E%3C/PolygonSymbolizer%3E%3C/Rule%3E%3C/FeatureTypeStyle%3E%3C/UserStyle%3E%3C/NamedLayer%3E%3C/StyledLayerDescriptor%3E


texts:
I tried to connect WMS from my MapServer 7.0.4 in QGIS 2.18.3 (QGIS 2.10.1 too) but it failed with error:

Map request error (Status: 200; Response:
            <TITLE>MapServer Message</TITLE>

            msLoadMap(): Regular expression error. MS_DEFAULT_MAPFILE_PATTERN validation failed.
            ; Content-Type: text/html; URL:http://192.168.0.127/mapserver/scripts/mapserv.exe?map=D:\MapServer\map\wmstest.map?&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&BBOX=-422441,-1246470,-419074,-1245430&SRS=EPSG:2065&WIDTH=1302&HEIGHT=403&LAYERS=ulice&STYLES=&FORMAT=image/png&DPI=96&MAP_RESOLUTION=96&FORMAT_OPTIONS=dpi:96&TRANSPARENT=TRUE)

I think there is a problem with "?" in a request GetMap. A correct one should be:

...wmstest.map&SERVICE=WMS....

and QGIS make a link:

...wmstest.map**?**&SERVICE=WMS....

Here is my link for connecting WMS (not accessible from internet):

http://192.168.0.127/mapserver/scripts/mapserv.exe?map=D:\MapServer\map\wmstest.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetCapabilities

Can someone explain me?

my map file contents:

"wms_onlineresource" "http://192.168.0.127/mapserver/scripts/mapserv.exe?map=D:\MapServer\map\wmstest.map?"

I tried it without "?" at the end, but it didn't work. A request GetMap works fine in my browser (without that "?").


texts: Copying mosaic dataset from windows ArcMap to linux ArcGIS Server 10.3.1?

texts:
I have created a mosaic dataset from 12 different images.  This works great inside of ArcMap.  But I have been unable to get it published on my ArcGIS Server.

In my environment, I use the file geodatabase that is duplicated (not a file share).  So I have a local folder containing my file geodatabase (C:\some\dir\file.gdb) and another for my rasters (C:\some\dir\rasters).  Then I create the mosaic in my file geodatabase and add all the rasters from the rasters folder.  Then, when I copy my local folder (C:\some\dir) to the linux server (/opt/some/dir) and register my folder as a data store using the manager web app specifying the different paths for Publisher and Server so that they get translated on a service deploy.

Next I create a simple layer that contains the mosaic, which I Share As -> Service to a service definition file.  When I attempt to publish my service the web UI shows a message of Failed., and when I look in the log, i see this message:

Instance of the service 'System/PublishingTools.GPServer' crashed. Please see if an error report was generated in '/opt/arcgis/server/usr/logs/xxxxxxx/errorreports'. To send an error report to Esri, compose an e-mail to ArcGISErrorReport@esri.com and attach the error report file.

Using this same procedure for normal rasters works just fine, its only the mosaic that is failing.  Initially I thought this could be due to the mosaic having incorrect paths (because i copied it directly to the server not using any publish that would have corrected the different paths).  So I attempted to change the paths using Modify -> Repair....  I then verified the new paths using Export -> Paths... and they show the path for the server.  Then I pushed the folder (using rsync) to the server to ensure the new paths have been propagated.  Then I attempted to publish again and the same problem occurred...

Any ideas here?


texts: Searching on two fields like first and last name in ArcGIS Online Web Map App?

texts:
I am creating a web map app of a cemetery. I hope to have a search widget that can search on last name (required) and then first name (optional). I have played around with the search widget, as well as the Filter widget. The filter widget got me closer to my results than the search because you first filter by "user entered last name" apply and then you can filter based on first name.

I would also like the results to be highlighted within the application. I know there is an enhanced search widget, which I have applied, but it actually has more functionality than I need and didn't quite give me the correct results.


texts:
I am new in programming with maps and coordinates, I am making a software on python where I load a raster (in UTM 18S that extent up to 19S, south orientation ) and a Landsat8 (orientation north), if the Landsat image is on UTM 18S and inside the raster limits; between PATH 5-9 and ROW 60-68; I can overlap both image and have a good coordinate alignment

The problem appears when I try to use a landsat that is on UTM 19S, I reproject it with pyproj library and the projections from the metadata, checked on QGIS and the coordinates are correct:

p1 = Proj(proj='utm', zone=19,datum='WGS84')
p2 = Proj(proj="utm", zone=18,datum='WGS84')

UL_X_PRODUCT = 122700.000
UL_Y_PRODUCT = -204000.000

UR_X_PRODUCT = 350400.000
UR_Y_PRODUCT = -204000.000

LL_X_PRODUCT = 122700.000
LL_Y_PRODUCT = -436500.000

LR_X_PRODUCT = 350400.000
LR_Y_PRODUCT = -436500.000

a1,b1=transform(p1, p2, UL_X_PRODUCT, UL_Y_PRODUCT)
a2,b2=transform(p1, p2, UR_X_PRODUCT, UR_Y_PRODUCT)
a3,b3=transform(p1, p2, LL_X_PRODUCT, LL_Y_PRODUCT)
a4,b4=transform(p1, p2, LR_X_PRODUCT, LR_Y_PRODUCT)

result (added 10 million to be oriented in south orientation):

UL X, Y, (1e7+Y):  790329.086988 -203853.453007 9796146.54699
UR X, Y, (1e7+Y):  1018292.89036 -204622.506814 9795377.49319
LL X, Y, (1e7+Y):  789100.325377 -436182.202764 9563817.79724
LR X, Y, (1e7+Y):  1017056.67578 -437826.672301 9562173.3277

but in the software I get a misaligment, checked the ecuation of conversion to get from UTM2pixel and viceversa and are correct, ,the yellow box is where the center mass of the red polygon should be.

Is there any other good library to reproject UTM zones?
Could the misalligment be due to reprojection error correction? I understand that a coordinate that is near the limit, can be different from 18S and 19S.


texts: Representing Geoserver's WMS-T as time-aware KML for GoogleEarth frontend

texts:
I'm using Geoserver to publish* sets of hourly raster imagery and fought for a while to get a working example of Time Aware KML accessing my Geoserver to enable GoogleEarth as a frontend.

A snippet of my KML is below:

<Folder>
    <NetworkLink>
      <name>inun_elev_20060829T010000</name>
      <TimeSpan>
        <begin>2006-08-29T00:30:00Z</begin>
        <end>2006-08-29T01:30:00Z</end>
      </TimeSpan>
      <Link>
    <href>http://localhost:8080/geoserver/drf/wms/kml?TIME=2006-08-29T00:30:00Z/2006-08-29T01:30:00Z&amp;layers=drf:Ernesto2006&amp;styles=Inundation6m</href>
      </Link>
    </NetworkLink>
    <NetworkLink>
      <name>inun_elev_20060829T020000</name>
      <TimeSpan>
        <begin>2006-08-29T01:30:00Z</begin>
        <end>2006-08-29T02:30:00Z</end>
      </TimeSpan>
      <Link>
    <href>http://localhost:8080/geoserver/drf/wms/kml?TIME=2006-08-29T01:30:00Z/2006-08-29T02:30:00Z&amp;layers=drf:Ernesto2006&amp;styles=Inundation6m</href>
      </Link>
    </NetworkLink>
...

I made use of information from https://stackoverflow.com/questions/2111966/kml-google-earth-big-complex-overlay-with-timeline-selector to get the time-aware backend working.  Also, the suggestion from http://docs.geoserver.org/latest/en/user/googleearth/tutorials/kmlplacemark/index.html#wms-demo-example of accessing the Geoserver's output as:

http://localhost:8080/geoserver/wms/kml?layers=tiger:poi

...was very helpful.  I had initially approached it as a NetworkLink to a WMS service in GoogleEarth, but that over-complicated things to the point of not working.  Using the Geoserver-suggested KML links was much better than the URLs I found from point GE at a WMS.

For standard WMS-T, I inserted the TIME=timespan in the query strings per the above snippet, and corresponding KML:TimeSpan and it works.

I'm currently generating this KML file using a perl script, but I wonder if there are other/more-standard tools for generating time-aware KML from a time-aware WMS-T service?

(*) My data is currently private, but a publicly available sample WMS-T capable service is http://ecowatch.ncddc.noaa.gov/thredds/wms/ncom_amseas_agg/AmSeas_Apr_05_2013_to_Current_best.ncd?service=WMS&version=1.3.0&request=GetCapabilities


texts: Grid Index Features in ArcMap DDP not labeling consecutively

texts:
Using Carto tool-->DDP-->Grid Index features - the generated grid doesn't name the tiles consecutively.

The base was around a buffer of a road feature dataset so it's not a rectangular grid.

So it starts with A3-A7, then B1-B5 etc. While understanding that this is logical, is it possible to sequentially number the existing grids?


texts:
I'm looking for tool that will be convert  WMS to vector layer.

Are they ready tool?(for example in python)


texts: What is the closest CRS to "Meridiano de Greenwich"

texts: I have a 1906 scanned map that I am trying to georeference in QGIS for Mac. The map has French and English lat-long, indicating them as either "Meridiano de Greenwich" or "Meridiano de Paris." I would like to know what the closest approximation to "Meridiano de Greenwich" for choosing the CRS might be.


texts: QGIS how to sum a certain vector field inside a polygon and populate a field in the polygon?

texts: I have a polygon with vector point civic addresses inside it. Each civic address has a different number residence. I want to sum the total number of residence inside that polygon and it populate a field in the polygon.  It is easy to do it manually but I need it to auto-update if another civic address is added or the number of residence changes. I'm new to QGIS and tried an expression but it didn't seem like I was able to reference the field of another point. How would I go about doing this?


texts: Hover effects using CartoCSS: Is this possible?

texts:
I'm trying to make a simple map of parcels in TileMill. Right now when I hover over a parcel, the information for that parcel appears in a teaser. That's simple enough. However, when working with particularly small parcels it may not be immediately clear to the user over which parcel one is hovering.

What I would like is for the outline of a particular parcel to glow when it is being hovered over.

I know in CSS there is a :hover selector, but it would seem that either:
a) There is not a direct translation in terms for between CSS and CartoCSS for this selector.
-or-
b)A hover-like selector is not available in CartoCSS.

I've included an example below where I attempted to use the hover selector from CSS. In this case it would seem the hover selector is ignored and the parcel outlines are drawn again using the given attributes. Nonetheless, I offer this faulty example as a potential starting point for any suggestions on how to implement hover features using CartoCSS.

#parcels {
  line-color:#151515;
  line-width:1;
  polygon-opacity: 0.6;
}
#parcels::hover {
  line-color:#0AFF47;
  line-width:1.25;
}

Thanks for any suggestions!


texts: How to use bandwidth matrix from R in Kernel Density tool in ArcMap?

texts: I want to calculate and map kernel densities using ArcGIS (10.5 so I am unable to use GME). I calculated a bandwidth matrix using the plugin method in the ks package in R. How can I input and use that in the kernel density ArcMap tool?


texts: Access QGIS Topology Checker from Python

texts: Would anyone happen to know if there is a way to utilize QGIS Topology Checker from Python?


texts: Keep getting AttibuteError: 'NoneType' object has no attribute 'CreateLayer'

texts:
I want to create a shapefile. Here is my code:

import ogr, sys, os
import osgeo.osr as osr

line=ogr.Geometry(ogr.wkbLineString)
line.AddPoint(10,10)
line.AddPoint(20,20)

driver=ogr.GetDriverByName('ESRI Shapefile')
ds=driver.CreateDataSource('test.shp')

srs = osr.SpatialReference()
srs.ImportFromEPSG(4326)

layer=ds.CreateLayer('test', srs, ogr.wkbLineString)
fieldDefn_=ogr.FieldDefn('id', ogr.OFTInteger)
layer.CreateField(fieldDefn_)
featureDefn=layer.GetLayerDefn()
feature=ogr.Feature(featureDefn)
feature.SetGeometry(line)
feature.SetField('id',1)
layer.CreateFeature(feature)

but when I run the code no shapefile appears on my desktop like I was thinking. It instead says on my console:

AttibuteError: 'NoneType' object has no attribute 'CreateLayer'

Any ideas what is going wrong here?


texts: How to make 3D building models from lidar data in ArcGIS?

texts:
I have Lidar data, ground points and first returns. I have processed it and have ready tiles from which I am trying to build 3D building models.

So far I was able to just extrude the buildings in the ArcScene and that is it.

I am a beginner in GIS/Remote Sensing and any help would be highly appreciated.

Also, I am trying to work this out in Arc10.


texts:
I want to create a raster map from a Numpy array from arcgis. I am using arcpy.NumPyArrayToRaster() function to convert. But it is throwing following error.

Traceback (most recent call last):
  File "C:\Users\Sidath\Desktop\generateMap.py", line 179, in <module>
    newRaster = arcpy.NumPyArrayToRaster(in_array=myFinal)
  File "C:\Program Files (x86)\ArcGIS\Desktop10.4\ArcPy\arcpy\__init__.py", line 2299, in NumPyArrayToRaster
    return _NumPyArrayToRaster(*args, **kwargs)
TypeError: Cannot create raster for numpy array.

Following is my code snippet

myFinal = np.array(myFinal)
newRaster = arcpy.NumPyArrayToRaster(in_array=myFinal)
newRaster.save("rastwe.tif")


texts: Colour code points over raster stack in R

texts:
I am very new to R and spatial analysis.
I have a column with different categories and I want to colour code my points according to category type. I have seen posts on working with continuous or numeric data but not sure how to begin this. Further, I need to overlay this on top of a raster stack
So end product is:

colour coded points
overlay on top of raster stack of different environmental layers
legend

I was able to plot points for each stack by copying someones function from the internet:
# to plot the points on each layers of the stack we need to
# create a function and pass it to the addfun argument (see ?raster::plot)
fun <- function() {
  plot(samplespoints, add = TRUE, col = "red", pch = 3)
}

plot(stacked_env, addfun = fun)

NOW For colour coding: I followed some posts which suggested the following:
#add sample points
# create a table to map colors to geo-categories
lookupTable <- unique(samplespoints$Env)

# match the different geo-categories with the lookup table
# and retrieve the corresponding color value into a vector
colRegions <- as.vector(lookupTable[match(levels(samplespoints$Env), lookupTable)])

# then use it to plot
spplot(samplespoints, zcol = "Substrate_", col.regions = colRegions)

However, I get this error, even though the object "samplespoints" is a:

[Formal Class SpatialPointsDataFrame]

Error in create.z(as(obj, "data.frame"), zcol) :
  no support for variable of this type

I have been using this resource to build my familiarity https://rspatial.org/


texts: QGIS SERVER - convert WFS GetFeature GML as Shapefile with ogr2ogr

texts:
I'd like to use ogr2ogr with the WFS driver to convert the GML response of my QGIS Server 3.4.2 GetFeature layer into Shapefile. I have to do this from a WebGIS JavaScript application I am developing, via (e.g.) a click event on a "Download" button.

First of all, is there a way to do this with QGIS Server itself without implementing this functionality myself (I cannot see any outputFormat for Shapefile)?

If this Scenario (let's call it Scenario 1) is not possible, I thought about two alternatives, and I'd like to ask which should be the best.

Scenario 2: using PHP exec() like explained here
Scenario 3: using the node.js ogr2ogr wrapper found in this repo

Here is the GetCapabilities of my WFS: https://www.wondermap.it/cgi-bin/qgis_mapserv.fcgi?&map=/home/ubuntu/qgis/projects/Demo_sci_WMS/demo_sci.qgs&SERVICE=WFS&VERSION=1.1.0&REQUEST=GetCapabilities


texts: Importing editor toolbar in ArcGIS ModelBuilder?

texts:
Is it possible to import editor toolbar in ModelBuilder of ArcGIS?

Basically I want to get coordinates of points on a shapefile (line) by randomly selecting, say 10 vertices and then using sketch feature in editor toolbar to know their coordinates. I want to automate this process.

Until now I have seen ModelBuilder is used only for geoprocessing tools and not for editor toolbar.


texts: Run C++ standalone application in debug mode

texts:
I write simple C++ standalone application using QGIS. It works and render vector layers from PostgeSQL database.

#define CORE_EXPORT __declspec(dllimport)
#define GUI_EXPORT __declspec(dllimport)

#include <QString>
#include <QApplication>
#include <QWidget>
#include <QMainWindow>
#include <QVBoxLayout>
#include <QPushButton>

#include <qgsapplication.h>
#include <qgsproviderregistry.h>
#include <qgsmaplayerregistry.h>
#include <qgsvectorlayer.h>
#include <qgsmapcanvas.h>
#include <qgsdatasourceuri.h>
#include <qgssymbolv2.h>
#include <qgssinglesymbolrendererv2.h>
#include <qgscategorizedsymbolrendererv2.h>
#include <qgscoordinatereferencesystem.h>

#include <iostream>
using namespace std;

class PostGisWidget: public QWidget
{
public:
    PostGisWidget(): QWidget()
    {
        QgsDataSourceURI uri1;
        uri1.setConnection("127.0.0.1", "5432", "gis1", "postgres", "pass", QgsDataSourceURI::SSLdisable);
        uri1.setDataSource("public", "map_points", "the_geom", "");

        QgsDataSourceURI uri2;
        uri2.setConnection("127.0.0.1", "5432", "gis1", "postgres", "pass", QgsDataSourceURI::SSLdisable);
        uri2.setDataSource("public", "map_polygons", "the_geom", "");

        QgsDataSourceURI uri3;
        uri3.setConnection("127.0.0.1", "5432", "gis1", "postgres", "pass", QgsDataSourceURI::SSLdisable);
        uri3.setDataSource("public", "map_polylines", "the_geom", "");

        QgsVectorLayer *layer1 = new QgsVectorLayer(uri1.uri(), "testLayer1", "postgres");
        QgsVectorLayer *layer2 = new QgsVectorLayer(uri2.uri(), "testLayer2", "postgres");
        QgsVectorLayer *layer3 = new QgsVectorLayer(uri3.uri(), "testLayer3", "postgres");
        QgsMapLayerRegistry *registry = QgsMapLayerRegistry::instance();

        registry->addMapLayer(layer1);
        registry->addMapLayer(layer2);
        registry->addMapLayer(layer3);
        this->myLayerSet.append(QgsMapCanvasLayer(layer1));
        this->myLayerSet.append(QgsMapCanvasLayer(layer2));
        this->myLayerSet.append(QgsMapCanvasLayer(layer3));

        QgsMapCanvas *canvas = new QgsMapCanvas();
        canvas->enableAntiAliasing(true);
        canvas->setCrsTransformEnabled(true);
        canvas->setExtent(layer3->extent());
        canvas->setLayerSet(myLayerSet);

        b = new QPushButton("test", this);

        QVBoxLayout *layout = new QVBoxLayout(this);
        layout->addWidget(b);
        layout->addWidget(canvas);
    }
private:
    QList <QgsMapCanvasLayer> myLayerSet;
    QPushButton *b;
};

class MainWindow: public QMainWindow
{
public:
    MainWindow() : QMainWindow()
    {
        QWidget *w = new QWidget();
        this->setCentralWidget(w);
        PostGisWidget *pW = new PostGisWidget();
        QHBoxLayout *l = new QHBoxLayout(w);
        l->addWidget(pW);
    }
};

int main(int argc, char *argv[])
{
    QgsApplication a(argc, argv, true);

    QString myPluginsDir = "D:\\work\\QGIS\\myapp\\qgis\\plugins";
    QString prefixPath = "D:\\work\\QGIS\\myapp\\qgis";

    QgsApplication::setPluginPath( myPluginsDir );
    QgsApplication::setPrefixPath( prefixPath, true);
    QgsApplication::initQgis();

    MainWindow wnd;
    wnd.show();

    return a.exec();
}

I build it in MSVC 2010 in Release mode and it works. But I have "must construct a qapplication before a qpaintdevice" for Debug version. What should I do to debug my QGIS application?


texts:
I am developing some templates for my office and would like to pull information from an external source that will be displayed in the marginalia as text boxes or similar objects. A product request form was developed as part of a SharePoint using InfoPath. The main things that I need are the required distribution notices and the product ID, but occasionally there are some other fields that are also needed.

If someone knows how to access an Excel or Access file, I can work with that too. Ultimately if I have to add a table to my TOC I can do that but I would like to avoid that if possible.


texts: Saga GIS Snap Points to Lines tool doesn't produce required results

texts:
I have two sets of data that I'm using. Points extracted from a .csv file and a road network from an ESRI .shp file (both of which I've included here: https://send.firefox.com/download/6f08f9e4938fb389/#Kl20O__Px_D9NP6KcqLu5Q | Password: qgis123). I need to snap each point to its nearest road segment and get the result as a separate point layer.

I am using QGIS 3.8.1 Zanzibar and for the above task I've decided to use the SAGA GIS Snap Points to Lines tool available in the QGIS processing toolbox.

However, after running the algorithm, as an output I get the same point layer that I started off with without any snapping as the result. I'm not exactly sure what I'm doing wrong here and would be grateful for any help or insight into this matter.

In addition to this, If anyone could advise me as to where I might find the source file for the SAGA Snap Points to Lines tool it would be very helpful.


texts:
I have been looking for a way to extract various stats for each group from a shp file which contains groups of points. I found that Group Stats tool is the way to do that. However I would like to iterate this tool over 100 shp files. Is there any way to do that in the QGIS python window?

Otherwise I have to merge all files then apply the tool. But this makes data very large and unmanageable.

I used code below to run items iteratively. Only issue I had, when I open the excel file, it throws me a "repair warning". After I click OK all calculations are there. But not sure why excel gives those warnings.

import processing

...

for itemfeature in listofShps:
    outputfullpath = os.path.dirname(itemfeature)+ '\\' + os.path.basename(itemfeature)[:-4] + '.xlsx'
    processing.run('qgis:statisticsbycategories',
                   {'CATEGORIES_FIELD_NAME': [strCatagoryFieldName],
                    'INPUT': itemfeature,
                    'VALUES_FIELD_NAME': strValueFieldName,
                    'OUTPUT': outputfullpath} )


texts:
I don't know if this is possible already, but I keep wanting to "control the camera" as if I were playing a top-down video game or something, where it slowly scrolls and rotates the entire map based on how much you press left and right, etc. Simply allowing you to "walk around" the 2D map as if it were an older video game.

Is this already supported as some kind of "walk mode" that you can enable or something?

Although simple to implement for an expert, it's a major ordeal for me to accomplish on my own. I think this would be much used if it existed, although I'm of course waiting for the full-3D environments that Google Maps API is supposed to give people now... but until then.

I haven't heard a peep from Google after they released that video.


texts: Overlaying an image on a point, on a map in sharpmap?

texts:
I can add points to a map but I want to show an image (like a baloon or location sign) instead of the default red circle for the points.
how can I do that with Sharpmap?
my code to draw points is:

    Dim vlay2 As New VectorLayer("Points")
    Dim geomColl As New Collection(Of GeoAPI.Geometries.IGeometry)()
    'Get the default geometry factory
    GeoAPI.GeometryServiceProvider.Instance = New NetTopologySuite.NtsGeometryServices()
    Dim gf As GeoAPI.Geometries.IGeometryFactory = GeoAPI.GeometryServiceProvider.Instance.CreateGeometryFactory()

    geomColl.Add(gf.CreatePoint(New GeoAPI.Geometries.Coordinate(TextBox2.Text, TextBox3.Text)))
    vlay2.DataSource = New SharpMap.Data.Providers.GeometryProvider(geomColl)
    Mapbox1.Map.Layers.Add(vlay2)
    Mapbox1.Refresh()


texts: Columns decimalLatitude and decimalLongitud not recognized while creating a layer from a csv file in QGIS

texts:
I'm using QGIS 2.0.1 Dufour to create a layer from a csv file. When I try to define the geometry and assign the x y coordinates sources, I'd expect QGIS to recognize the decimalLongitud and decimalLatitud columns, but instead the field is:

gbifID;abstract;accessRights;accrualMethod;accrualPeriodicity;accrualPolicy;alternative;audience;available;bibliographicCitation;conformsTo;contributor;coverage;created;creator;date;dateAccepted;dateC

for both x and y coordinates ...

what could be wrong?


texts: QGIS Georeferencer - Georeferenced Image Issue

texts:
I'm trying to georeference an aerial image of a site over it's exact coordinates using WGS 84. The same coordinate reference system is used on the settings. I'm not sure what to do from here, is there something I'm doing wrong? And just to add, I have tried the original image in both JPEG and TIFF. Both end up saving as GeoTIFF's and there's no other option in that regard.

[][3


texts: Retrieving everything after certain part of column by using field calculator in ArcMap

texts:
I have a column in an attribute table and I want to split it with the field-calculator in arcis in a way that I get everything after the 4th blank (space) in a new column:

I tried it by using !Kreuzungsname!.split(" ")[4]+!Kreuzungsname!.split(" ")[5] in the field calculator, but the problem is that some of the entries only contain 4 and not 5 blanks.
Is there a way to get everything after the 4th blank?