texts: Convert GPX/KMZ to google maps directions

texts:
Is there a way to convert a set of waypoints in a GPX/KMZ file to driving directions suitable for Google Maps.
There are numerous sites listing community generated routes which I am unable to load onto my TomTom Start GPS device so I'm looking for an alternative. The logical alternative seems to download Google Maps content for offline usage and convert the set of waypoints to a route format compatible with Google Maps

Alternatively, any other apps able to turn a set of waypoints into driving directions will also suffice as an answer.


texts: Feature comparison between QGIS and ArcGIS for Desktop

texts:
I am learning to use QGIS and ArcGIS for Desktop but I cannot find the differences between them.

What are the differences between the capabilities of QGIS and ArcGIS for Desktop?


texts: Leaflet error 'Cannot read property' on bindPopup

texts:
I try to display a popup when clicking on a multi tracks XML track.
This seems to work fine but JS console gives error:
Uncaught TypeError: Cannot read property 'call' of undefined
    at e.fire (leaflet.js:5)
    at e._fireDOMEvent (leaflet.js:5)
    at e._handleDOMEvent (leaflet.js:5)
    at HTMLDivElement.r (leaflet.js:5)

Where is the problem? This is the concerned code:
    function popup(feature, layer) {
      if (feature.properties.desc) {
        layer.bindPopup(feature.properties.desc);
      }
    }
    var customLayer = L.geoJson(null, {
      style: function (feature) {
        if (!feature.properties.id) {
          feature.properties.id = n++;
        }
        var iColor = feature.properties.id % colors.length;
        return { color: colors[iColor] };
      },
      onEachFeature: function(feature, layer) {
        layer.on({
            mouseover: highlightFeature,
            mouseout: resetHighlight,
            click: popup(feature, layer)
        });
      }
    });


texts: Inserting min and max values from var in visual parameters of image using Google Earth Engine?

texts:
I want to add layer in the map canvas in GEE with visual parameters coming from variables. for some reason it doesn't see my variables as numbers. Here is part of my code:

var min = image.reduceRegion({
  reducer: ee.Reducer.min(),
  geometry: fc,
  scale: 30,
  maxPixels: 1e9
});
var max = image.reduceRegion({
  reducer: ee.Reducer.max(),
  geometry: fc,
  scale: 30,
  maxPixels: 1e9
});
var maxXT = max.get('B10_1');
var minXT = min.get('B10_1');

//Thermal Visual parameters
var palette_1 = ['Black', 'Blue', 'White']
var Thermal_vis = {
   min: minXT,
   max: maxXT,
   palette: palette_1,
   bands: ['B10_1']
};
Map.addLayer(image.clip(fc), Thermal_vis, 'Thermal');

if i print my Thermal_vis variable I get:

Object (4 properties)
  bands: ["B10_1"]
    0: B10_1
  max: 54.652863769531294
  min: 47.71834838867191
  palette: ["Black","Blue","White"]
    0: Black
    1: Blue
    2: White

but I still get an error for adding the layer which says:

Thermal: Layer error: Image.visualize: Expected a number or list of numbers
for field 'min'.

If I input the numbers manually within my visual parameters, the layer adds with no problem though. What is the problem?


texts: PyQt - default option don't close dialog

texts:
I have a plugins generated by "plugins builder" with simple Ok / Cancel button / combo box to display canvas layers.
When i cick on "OK" button, plugins is not close and if i use it again, my components are not reloaded as first time and add again existing values.

I could  insert condition in my python code to not load layer again if already exist in my combo box but i think it's better to entirely close and open plugin without taking into account the previous state.

Same result is know when user click on window's red cross to close.

What is the function to properly close plugins ?


texts: Changing number of decimal places of a String variable within a Vector Layer using PyQGIS

texts:
I have earthquake data and within the data, there are magnitude, longitude and latitude values. However, these values have around 6/7 decimal places but I would like to only have 2 decimal places for each value, when I export my map. I add the earthquake event through QgsVectorLayer rather than a CSV format when using python and I can access features such as magnitude, longitude and latitude, by using feat['magnitude']), as can be seen below:

I then add each feature to the layout exporter, ready to export. I have tried various ways to only get 2 decimal places on each feature but non have prevailed as of yet. The ways I have tried are: to_real(ID), format_number(ID, decimal place), float(ID), round($ID, decimal places) and layer.dataProvider().addAttributes([QgsField("fieldname",  QVariant.String, "String", 10, 2)]). I may have done part of the code wrong though, hence why it did not work. Each feature is within a string variable but I can not seem to find a way how to convert to double or real. A small snippet of my map is included below where the values of magnitude, longitude and latitude can be seen, so that I would like each value to say 4.39 (Mag), -72.02 (Long) and 6.40 (Lat). Hope this makes sense.


texts: When using an iphone the user cannot update features using the collector app when hidden required fields are present

texts:
I have a layer that I want to use in collector but some of the fields in that layer are hidden as I want to use them at a later stage in a "Review WebMap". On an iphone i cant submit a survey but I can on Android.
Has anyone experienced this issue before?


texts: Spatially join attributes from point to polygon side with numerous contiguous polygons and numerous adjacent points

texts:
I have been trying for 2 days to join points representing addresses (in Paris region) to the closest polygon (parcel of land).
The problems:

The parcels of land are contiguous, sometimes a point related to the next parcel could actually be closer to the next parcel's centerpoint/vertice midpoint than to its own
There are sometimes several points (addresses) by land parcel
Some points are located quite close to the vertice of "their" parcel, sometimes further away (depending also on the street width) so it is difficult to use a buffer strategy (plus the buffers would overlap over each other since land parcels are adjacent)
I tried "NNJoin" but it doesn't move forward at all (I have a large database) and I am not sure how to specifiy how many points I want to select
I tried "Join attributes by nearest" but some dots are equally distant to the polygon and then all included, which is ok but the distance problem means it sometimes include some dots it shouldn't include
I tried a space matrix with vertices extracted from the polygons, but it froze...
My guess is that ideally, I should establish a kind of perpendicular projection of the parcels on the street side only, that would stop at the median line of the street. This way I would be sure not to include the points of adjacent parcels or parcels on the other side of the street. But I have no idea if and how to do this... Otherwise, my less ideal solution would be to use "Join attributes by nearest", specify 3 or 4 as maximum possible addresses and a maximum distance of 1 or 2 m, and hope to get the majority of points without too many of the neighbouring points. Not so great as you see...

Below is a screenshot + what I envision with the median line of the streets and the perpendicular projection.

Now I have tried to use Voronoi (the SAGA one the other ones seem to take a lot of time) around the Pole of Inaccessibility of the land parcels, but the result is a kind of disaster.

I think I am onto something though, @Bruce Xiaolong Liu is already developing a plugin for Voronoi for polygons: Calculating Voronoi Diagrams for polygons I didn't manage to install it, but maybe I can find some workaround to achieve something a bit similar. I first thought about applying Voronoi to extracted vertices from the polygons, then combining each polygon from the same parcel into one larger polygon, but it seems a bit complicated. I will see if I find something else.
Another idea: replacing the polygons with points, then using the simple region growing tool by SAGA. But I am not an advanced user and unsure how to do it.


texts: Advanced Digitizing Panel(CADInput) import to plugin(custom toolbar)

texts: How to add a CADInput(Advanced Digitizing Panel) to plugin to click when we want to show us a Advanced Digitizing Panel(because I'm trying to make my own toolbar), is any chance to do this?


texts: Adding graduated color to line based on data using QGIS?

texts:
I have a line that I would like to color based on some data points that I have along its path. I'm not sure the best way to go about this.

Should I try to break the line up into many segments?

Then I guess I would need to join the point data to each line segment?

I'm using qGIS 2.6.

I have a gas pipe KML file that I want to change the color of depending on the flow of gas through the pipe at any given point. I can calculate the flow myself, then it is just a matter of incorporating that data into the map. The points on the pipe where I measure the flow are pretty much up to me, but they will not be regularly spaced. I've been tinkering around, but I'm sure you would have some better ideas.


texts: How to make a custom ToolbarControl Item in ArcEngine?

texts:
I would like to create a custom toolbar item in ArcEngine.

I add items like this

((AxToolbarControl)toolbarControl).AddItem( myCustomItem )

I need to know how to create a custom item in ArcEngine 10.  I'm using C# and VS2010.


texts: Creating MBtiles file from ".osm.pbf" file using TileMill

texts:
I am using Mapbox Offline Map in my app using MBTiles. Previously I was using shapefiles for creating offline maps. After searching a lot I am not getting Australian shapefiles.
But my friend referred this URL which contain all the layers of MBtiles of ".osm.pbf" format (not .shp format).
Is there any way to use ".osm.pbf" file in TileMill to create MBtiles file or a way to convert ".osm.pbf" file to ".shp" file and then use it in TileMill?


texts: 504 Gateway Timeout only with 1 kind of mapserver request (TileWMS in OpenLayers 3)

texts:
I'm very new to GIS. With MapServer, I'm calling four kinds of data, but only with this one am I having some HTTP 504 error message randomly. The other three never have that error, but only with this map:

MAP
  NAME XXX
  STATUS ON
  SIZE 600 600
  EXTENT 49782.1874916550004855 5149959.5214843796566129 664282.1874916550004855 7904959.5214843796566129
  UNITS METERS
  SHAPEPATH "rast"
  IMAGECOLOR 255 255 255
  TEMPLATEPATTERN "itasca"
  WEB
        METADATA
            "wms_enable_request" "*"
        END
  END
  IMAGETYPE PNG
  CONFIG "MS_ERRORFILE" "/tmp/ms_error.txt"
  DEBUG 5
  PROJECTION
        "init=epsg:3857"
  END
  WEB
        IMAGEPATH "/tmp"
        IMAGEURL "http://XXXXXX/tmp/"
        METADATA
            "wfs_title"            "XXXXXX"
            "wfs_onlineresource"   "http://XXXXXX/cgi-bin/mapserv?"
            "wfs_srs"               "EPSG:32719 EPSG:900913 EPSG:4326 EPSG:3857"
            "ows_schemas_location" "http://ogc.dmsolutions.ca"
        END
  END
  LAYER
        NAME balance_hidrico_1
        TYPE raster
        STATUS ON
        DATA "PG:host=192.168.1.XXX port=5432 dbname='XXXXXX' user='postgres' password='XXX' schema='raster' table='balance_hidrico_1' mode='2'"
        DEBUG 5
        PROJECTION
            "init=epsg:32719"
        END
        PROCESSING "SCALE=AUTO"
        CLASS
            NAME "-15"
            EXPRESSION ([pixel] <= -15)
            COLOR "#b87711"
        END
    END
    # etc...(more LAYERS)
END # Map File

I'm calling via JavaScript with OpenLayers 3 with this:

this.state.bal_hidrico = new ol.layer.Tile({
            source: new ol.source.TileWMS({
                url: "http:/XXXXX/cgi-bin/mapserv?",
                serverType: 'mapserver',
                crossOrigin: 'anonymous',
                params: {
                    'LAYERS': 'balance_hidrico_1',
                    'FORMAT': 'image/png',
                    'map' : '/opt/mapfile/map_balance_hidrico.map',
                    'TILED': true
                }
            })
        });

As I said, it's only problem with this map and not always...

Could this be a problem with the raster size on the database?


texts: Constructing query to return values from all polygons that line passes through using SpatiaLite?

texts:
I want an SQL query in Spatialite to return a list of values (Primary Key in this case, but could be any value) from all the polygons which are crossed by a line. Say, for example, a footpath passes through several fields and I want a table of the field numbers of all the fields the footpath passes through.

I've tried playing around with st_crosses, but that only returns a single result.


texts:
QGIS 1.8.0 Mac OSX 10.6.8
These problems seem to be specific to Mac, as two Windows users don't have the problem.

Import a file as a vector:
TEST.CSV

id;wkt
1;"POLYGON((10 10,20 20,20 30,20 10))"
...

The features import with correct values, individual points can be edited, and the layer saved as a shape file. But, no feature can be selected that was imported this way, so they can't be moved. New features added manually to the same layer can be selected and moved normally.

Probably related, only wkt-created features fully contained within the view are shown, wkt-features that have even a small bit outside the view vanish entirely. However, features added manually to the layer behave normally by showing the portion in the view. Layer editing capabilities are normal (full).

Has anyone suggestions as to a workaround for this? I'm hoping to migrate a dozen maps with 10,000 or so features from an old package that only exports true CSV:
x1,y1
x2,y2
...
I can script-edit this format to the above WKT, or similar text format. I don't have an app for .dbf so haven't been able to look there for any difference between WKT imports and QGIS-created features.


texts:
I am using the Time Manager plugin in QGIS and the data points from the CSV shapefile with animation to display the data points for a month at a time, is there a way that I can have the data points remain on the map and not disappear - So it's like the data points are building into a sort of heat map

Instead of showing the (month) data points and then disappearing and the showing the next (month) of data points and so on


texts: how to insert coordinate of province to postgresql?


texts: Failed attempt to relate a .csv file of 400 records to a single record in a point data layer

texts:
I have the Provincial Groundwater Monitoring Network as a point feature of 39 monitoring wells which includes an attribute for WELL ID. Each monitoring well then has a corresponding .csv file with 400 records of water level fluctuations.

I was wondering how I could relate the one well point to the many water level readings within a .csv file?

The WELL_ID field in the point layer is a String with a length of 254 however the corresponding field in the .csv file is a string with a length of 255. I have tried adding a field to the point layer with exactly the same name, type and length, however ArcMap 10 defaults the new string field to a length of 254.

Is there something I am doing wrong or is there something I could try differently.

sneely1


texts: Creating polygon like dashed line in Global Mapper?

texts:
I need to draw polygons like a "dash line" in Global Mapper (GM). It is necessary that the polygon has beats and spaces between the dashes.

GM has a style for lines with dashes, but it's for lines and I need create polygons.

Maybe there is an option to convert the line style to a polygon?

I am using Global Mapper 16.05.

Polygon created from line by tool "create buffer arround line":


texts: Zonal statistics per raster category in QGIS?

texts:
I have a raster layer of land use and a vector layer of areas of interest.
I would like to calculate for each polygon (areas of interest) the proportion or number of cells of the raster, for each category. I would like to get a table of areas in rows, raster categories in columns and the number/proportion of cell for each combination.
I'm sure there is an easy way to do that but I couldn't find it. All I got was global statistics through Zonal Stats but I couldn't calculate per category.


texts: Get the name of a Geoserver store based on the layer name

texts:
Is there a way to get the name of the Store that the layer belongs using gsconfig?

I have two different Stores registered in my geoserver and I need programmatically to be able to know which store each layer belongs to.

In the gsconfig documentation I see there is a get_store function but it accepts as argument only the store name (or the workspace).


texts: Calculating the area of polygons within bigger polygons

texts:
I work with PostGreSQL and have 2 tables, both in EPSG 2950:
Table 1 has a couple of big polygons and table 2 has smaller polygons that INTERSECTS with the polygons of table 1.
I am looking for a function to calculate the area of the portions of the polygons of table 2 that are WITHIN the polygons of table 1.
Having no idea how such a formula would look, i tried the following:

ALTER TABLE table_1 ADD COLUMN area NUMERIC (10,2);
UPDATE table_1 SET area = ST_Area((ST_Within(table_2.geom, table_1.geom)));

The resulting error was that there was a missing entry for the FROM clause for table_2.
I tried adding the FROM before and than after my SET constraint but both turned out with errors.
Any idea about what would be missing in my function?


texts: How can I found a portable version of Qgis 3.10 runnnig on MAcOs or Windows?

texts: I have to remotely help dozens of users install Qgis 3.10. on their computers. Their computers are heterogeneous. In 90 % of the cases the installation works well but for some users it does not work. Are there portable versions of Qgis 3.10 ?


texts: How can I split polygons in the Natural Earth 10m land shapefile?

texts:
This problem, that I have also been struggling with, in QGIS 1.7.3 as well.

Here are the steps to reproduce the problem:

1)Download Natural Earth 10m land shapefile from original website.

*2)*Open the file as vector shapefile in QGIS.

*3)*On layer browser, right click and enable "Toggle Editing"

*4)*Press button "Select single feature by click", then click on the piece of land (becomes yellow)

*5)*Click "Split Feature" scissors button.

At this point the land layer disappears, (the map display goes white, but land layer is still on layer browser though) and the "Toggle Editing" is disabled without me doing anything.

As soon as I re-enable editing, the map comes back.

Other features like drawing polygons function normally.

Thanks in advance.


texts: An OL3 listener seems undefined as reported by ol-debug.js

texts:
I am using ol3/3.15.1/ol-debug.js, and get the error message in the console:

ol-debug.js:6326 Uncaught TypeError: Cannot read property 'call' of undefined
    at ol.source.Vector.ol.events.EventTarget.dispatchEvent (ol-debug.js:6326)
    at ol.source.Vector.ol.Observable.changed (ol-debug.js:6453)
    at ol.source.Vector.addFeatures (ol-debug.js:56141)
    at ol.source.Vector.<anonymous> (ol-debug.js:54892)
    at ol.source.Vector.<anonymous> (ol-debug.js:54831)

I have lots of js in my application, and am comfortable debugging my own code.  However this error is during the rendering, after all my initiation code is processed, and I have little experience using the Chrome DevTools. It occurs once whenever each new vector layer is loaded, and seems to be about Listeners.

The Stack Trace:

ol.events.EventTarget.dispatchEvent (ol-debug.js:6326)
ol.renderer.canvas.Map.dispatchComposeEvent_ (ol-debug.js:59040)
ol.renderer.canvas.Map.renderFrame (ol-debug.js:59098)
ol.Map.renderFrame_ (ol-debug.js:68117)
(anonymous) (ol-debug.js:66987)

The code of ol-debug with the problem line (<<<<<) is:

ol.events.EventTarget.prototype.dispatchEvent = function(event) {
  var evt = typeof event === 'string' ? new ol.events.Event(event) : event;
  var type = evt.type;
  evt.target = this;
  var listeners = this.listeners_[type];
  var propagate;
  if (listeners) {
    if (!(type in this.pendingRemovals_)) {
      this.pendingRemovals_[type] = 0;
    }
    for (var i = 0, ii = listeners.length; i < ii; ++i) {
        if (listeners[i].call(this, evt) === false || evt.propagationStopped) { <<<<<<<<<<<<<<<<<
        propagate = false;
        break;
      }
    }
    var pendingRemovals = this.pendingRemovals_[type];
    delete this.pendingRemovals_[type];
    while (pendingRemovals--) {
      this.removeEventListener(type, ol.nullFunction);
    }
    return propagate;
  }
};

I have got a record of what I think is the state of the local variables at a breakpoint where the error occurs. Some of the values are:

event : ol.render.Event
type : "precompose"
listeners : Array[2]
name : "boundListener"
[[FunctionLocation]] : ol-debug.js:5910
pendingRemovals : undefined
propagate : undefined

I have made changes recently in the default vector styles area, so maybe I am causing a problem, but I cannot track it down. I cannot see that this error is having any effect on my application, as I only notice it with the console on.

Can anyone point me to where I can start looking into what I have done wrong?


texts: I'm looking for solution how to get current map size (in kilometers) with current zoom level. Is there a way how to calculate map scale?


texts:
I have a folder of NDVI raster and I want to see his stats as follows:

with rasterio.open('C:\\path_to_NDVI.tif', 'r+') as ds:
array=ds.read()

stats = []

for band in array:
    stats.append({
        'min': band.min(),
        'mean': band.mean(),
        'median': np.median(band),
        'max': band.max()})

stats

[{'min': -32768, 'mean': -3250.0849086875, 'median': 1547.0, 'max': 9994}]

The problem is that checking on QGIS the data does not match, in fact on QGIS the image data are:

STATISTICS_MAXIMUM=9272
STATISTICS_MEAN=2820.9099057427
STATISTICS_MINIMUM=-6171
STATISTICS_STDDEV=2201.6453582856

Having a no date value -32768.0 can be a problem? How can I get the same statistics as QGIS?

It doesn't really match HGIS, how come?

Band 1 Block=4000x1 Type=Int16, ColorInterp=Gray
  Min=-6939.000 Max=9994.000   Computed Min/Max=-6939.000,9994.000
  Minimum=-6939.000, Maximum=9994.000, Mean=2822.344, StdDev=2204.594
  NoData Value=-32768
  Metadata:
    STATISTICS_MAXIMUM=9994
    STATISTICS_MEAN=2822.3440402538
    STATISTICS_MINIMUM=-6939
    STATISTICS_STDDEV=2204.5942196929
    STATISTICS_VALID_PERCENT=82.94

I get this when I try your suggestion:

array[array == ds.nodata] = np.nan

arr_min = np.nanmin(array)

ValueError                                Traceback (most recent call last)
<ipython-input-19-9ad870d738e7> in <module>
----> 1 array[array == ds.nodata] = np.nan
      2
      3 arr_min = np.nanmin(array)

ValueError: cannot convert float NaN to integer

While when I use the other option the numbers still don't match:

m = (array != ds.nodata)
arr_min = array[m].min()

print('min=',array[m].min())
print('mean =%.2f'%array[m].mean())
print('max=',array[m].max())
print('std =%.2f'%array[m].std())

min= -6939
mean =2822.34
max= 9994
std =2204.59


texts: Combining information from multiple rasters into aggregate raster and populating fields accordingly

texts: I am stuck on how to best combine the information from multiple rasters into one raster. Specifically, I am working with a time series of raster files, whereby each raster corresponds to a different year (they are all the same extent). The pixels of each raster range from values 1-4 (excluding nodata). I am trying to use ArcGIS to combine the information from each year into one aggregate raster whereby each cell will have the following information: 1) the total count of each value (e.g. Total occurrence of "one", total occurrence of "two", total occurrence of "three", etc.); and 2) the last instance of each value (e.g. Most recent year of instance of "one", most recent year of instance of "two", etc.). I have been toying around with field calculator and raster calculator, but am not quite sure where to start on this problem (I'm a newbie in ArcGIS and Python).


texts: Projecting using OpenLayers, Drupal, and MapBox

texts:
I've installed OpenLayers in Drupal 7 and created a view that pulls geofield data for a "Geography" vocabulary (states, tribes, and U.S. jurisdictions) and shows points on a map that I'm storing on MapBox's server. The map tiles I created in TileMill.

The map displays fine, the points appear in the proper locations, but I can't get the map to center properly -- it appears somewhere off the coast of western Africa. I'm guessing that this is a "projection" problem.

TileMill maps are always projected to "Web Mercator" (EPSG:3857)
So, for the layer that I've added, I've used layer type "XYZ" and set the "Projection" to "EPSG:3857"
In the "Layers & Styles" tab for the map, I've selected "EPSG:3857" for the "Map Projection"
I've also set the "Display Projection" to "EPSG:3857"
Because I'd like the map to be centered over/near California, I've made the "Centerpoint" in the "Center & Bounds" tab equal to "-122, 33"
I've also tried "Zoom to Layer" in the "Behaviors" tab -- but that doesn't seem to work either.

I'm guessing there's something conceptual that I'm missing here -- that there's something about projections that I don't understand, right?


texts: Dissolving featurecollection in google earth engine?

texts:
Here is the link to my GEE code:

https://code.earthengine.google.com/99b494aacf00df398e0e710ec02c13e8

Here is the code (DMDP is an asset and to see it please follow the link):

Map.centerObject(DMDP, 9)

// -----------------     ADD BOUNDARY LINES TO DISPLAY     -----------------

// Create an empty image into which to paint the features, cast to byte.
var empty = ee.Image().byte();

var outLn_dmdp = empty.paint({
  featureCollection: DMDP,
  color: 0,
  width: 1
});
Map.addLayer(outLn_dmdp, {palette: 'red'}, 'DMDP');

I know that I can easily dissolve the DMDP featurecollection (i.e. shapefile) in ArcGIS or QGIS. But I am wondering if there is a way to dissolve DMDP (i.e. featurecollection) in Google Earth Engine, so that I can display only the boundary of the featurecollection.


texts:
I wish to combine multiple shapefiles for different regions and assign them names in R/sf. I'm not sure if my procedure is orthodox. That may also be the reason for the incorrect boundary box which results.

The raw data is a set of three shapefiles downloaded from this site (in Korean). I attach the files, as they are not accessible outside Korea. The files are for the Seoul, Incheon and Gyeonggi-do regions. I want to combine them into the Seoul Capital Area. At the same time, I wish to name them in Roman script. Here's the code:

library(sf)

#Read, combine and name shapefiles
sca_nsdi <- rbind(data.frame(st_read("LARD_ADM_SECT_SGG_11.shp"), Name="Seoul", stringsAsFactors=F),
                  data.frame(st_read("LARD_ADM_SECT_SGG_28.shp"), Name="Incheon", stringsAsFactors=F),
                  data.frame(st_read("LARD_ADM_SECT_SGG_41.shp"), Name="Gyeonggi-do", stringsAsFactors=F))

#Convert back to sf dataframe (according to https://github.com/r-spatial/sf/issues/193#issuecomment-276354417)
st_geometry(sca_nsdi) <- sca_nsdi$geometry

I'm not sure if this the right way to go. The boundary box of the merged set is the same as the boundary box of Seoul, which is smaller than surrounding Gyeonggi-do. I don't know how to correct that, but I'm also wondering if my procedure produces other undesirable side-effects which I haven't detected yet.

st_bbox(sca_nsdi)==st_bbox(sca_nsdi[sca_nsdi$Name=="Seoul",]) #returns all TRUE
plot(sca_nsdi$geometry) #returns truncated map
plot(sca_nsdi$geometry[sca_nsdi$Name=="Seoul",], add=T, lwd=2) #superimprints Seoul in bolder lines


texts: How to display vertex markers in QGIS for non-editable layers?

texts: I've a PostGIS layer with read-only privileges. Is there any way to display the vertex markers of the layer?


texts: Looking for a shapefile for Europe on 4-digit postal code

texts:
I am looking for a source of a shapefile hat includes european countries with 4-digit postal codes.

The country codes should be DIN-A2 (two digit) and a postal code for four digits...

Does anyone have an idea where to find such a file?


texts: Why can I see the data from a second sde database connection in my database?

texts: I have an sde 9.3 database which when opened in arccatalog shows the data from another sde database. Under settings > Source this is confirmed. Why and how can this happen? The only thing the 2 databases have in common is that the owner is the same.


texts: Overlapping buffer values to create new, dynamic risk profiles around hazardous equipment

texts:
My question is similar to Creating buffers with values, and finding areas with high value overlap of these buffers
Using QGIS, I have several hundred points representing pieces of equipment, each with potentially 3 different lengths of buffer around it in concentric, overlapping circles. Each of these circles represents a hazard originating from the point, and would be filled with the probability of that hazard occurring, for which I also have data.
Each one of these hazard radii may then overlap with other radii from other points, and I'd like to add up the overlapping probability for each overlap, similar to how the link below describes it. However, these risks will change over time, due to equipment wear and sensor degradation, until they are repaired. Due to this, I'd like to be able to have the probabilities filling each buffer be able to change dynamically with time, even if that means it just pulls from the CSV file that is updated whenever the project is loaded.
The solution linked to below manually changes each buffer fill, I think? If I'm being honest I'm not certain if QGIS is the right tool for this, but it seemed like it would be powerful enough for the analysis, but I'm well beyond my skill level, and I don't know enough to judge the other solution.
I am new to QGIS, and I have taken on a project that may be beyond me, and need help to answer the following:

Can I have buffers filled with different values, and have them add up and be visible/accessible when they overlap?
If so, how?

Would someone be able to explain the solution given in the below link on a more basic level? I don't recognize most of the terms and ideas cited.

Creating buffers with values, and finding areas with high value overlap of these buffers


texts: Add layers to Spatialite Database using PyQGIS

texts:
I would like to add layers into a spatialite database. I have used the QgsVectorFileWriter method:

parcDisSHP='/xxx/xxx/xxx/xxx/FILE.shp'
parcelasDis = QgsVectorLayer(parcDisSHP, 'Parcelas_Unicas', "ogr")

QgsVectorFileWriter.writeAsVectorFormat(parcelasDis, "/xxx/xxx/xxx/xxx/database.sqlite", "utf-8", None, "SQLite", False, None ,["SPATIALITE=YES"])

But this method it seems good for create the database and insert just one layer. If I repeat the operation for other layers, this rewrites the Database again.

What should I do to add more layers to this DB?

Is there some others ways to do this operation?


texts: How to find parcels related to geocoded addresses?

texts:
I have geocoded a table of addresses (around 200 records) in ArcMap 10.1 and now need to select the parcel polygons that they are related to. Trouble is the geocoded addresses fall outside of the polygon boundaries.

Is there a recommended method to be able to identify the parcels that belong to these addresses?


texts:
I have a shapefile in which polygons overlap and I can't have overlaps for the sake of my analysis. I want the overlapping area saved, but if the overlapping area is saved to the polygon with the smallest/largest area or shared boundary, doesn't matter much.

Merging manually is not an option, as I have tens of thousands polygons. Dissolve does solve a majority of the overlaps, but not all as I need to dissolve on an attribute I need to keep (and there is a range of values for this attribute).

I have tried SAGA polygon self-intersection tool, and it has worked for a similar previous problem, but not this time.

(The polygons are doughnuts created by the buffer & symmetrical difference tools, if it matters. My aim is to have a layer with doughnuts with no overlaps and as many doughnuts as plots, as I am going to run a regression clustering on "pairs" of doughnuts and plots.)


texts: Why don't they use cell towers like GPS satellites?

texts:
If my understanding is correct, a GPS satellite produces a pretty simple signal which is basically composed of its location and its time.  Given 4 of these signals, then one can uniquely solve for the X,Y,Z position (and as a by product, time) of the hand-held GPS unit.

Why don't we use use cell towers like we use GPS satellites?

It's much more easy to tell the position of a cell tower than a satellite (they don't move).  And they can be given atomic clocks just like GPS satellites are given.  Then we would have more redundancy, more availability, and more accuracy in determining location.

Note: I know that the E911 service uses cell tower to triangulate the position of cell phones, but this technology is based upon measuring the signal strength of the tower and is therefore nowhere nearly as accurate as GPS.


texts: Show only features which are transboundary across two features of another layer

texts:
I have two layers in my QGIS project: 1x shapefile with country borders, and 1x geojson which plots segment features.

Is there a way to only select/show those segments which are transboundary, i.e. which are crossing AT LEAST one border of the features (countries) in the shapefile?

To explain in words: I need to select only those electricity grids which are connecting two or more countries, not domestic ones.


texts: What projection to use in ArcMap for a map that extends over Wgs84 UTM 31 and 32

texts:
I have a WGS84 UTM map that extends over two UTM zones(31N and 32N). Using either of them distorts my map and ArcGIS allows you to choose only one projection per map.

Please what can I do?


texts: How to do spatial join in FME by preferring points with same attribute

texts:
First of all, I'm new to FME, but I'll try to be specific with my question.

I have two different shapefiles with point features. These points have information on bridges and overpasses etc. but are from different providers.
These points are located quite close to the actual location of these bridges etc. So I think a spatial join can be done in this case.

The problem is, there are sometimes a lot of different points in one layer and only one point in the other layer. Both layers have one attribute in common, which represents the road number where the bridge etc. is located.

In FME I have tried to join these two layers with "NeighborFinder" -transformer, with 50 meter search radius. I think I could be more precise with the join if I could prefer joins that have common attribute.

For examble If point A has two different points close to it in the other layer. Point B is 10 meters away and point C is 45 meters away. In this case Neighborfinder would join point B to point A. But, I'd like FME to check what is the ROADNUMBER attribute in point A, then check what points are within 50 meters from it, then check if any of the points close to it (B & C) have ROADNUMBER attribute similar to point A, If there is similar attribute on either of these, the one with similar attribute would be preferred and joined to point A. In case there was no similar attribute, then just the closest point would be joined to point A.

Another thing i would like to know, is the number of candidates available for join within the search radius, but this is just secondary knowledge in this case.


texts: Load image data from WPS response using OL

texts:
We have a React application using OpenLayers and Geoserver.
We have a countrywide raster layer in Geoserver and want to load a cropped version in OL when a province is selected.
We have the WPS part working, it is returning the cropped data.
We also get the data as base64 back in OL and set it as the source of the layer, but nothing is shown on the map. It seems like the layer isn't updated.
const tempUrl =
    "http://localhost:8480/geoserver/ows?service=WPS&version=1.0.0";
var wpsLayer = new ImageLayer({
    source: new ImageWMS({
      url:
        "http://localhost:8480/geoserver/umva_geo/wms?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&FORMAT=image%2Fpng&TRANSPARENT=true&LAYERS=Aarea0&exceptions=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A4326&STYLES=&WIDTH=658&HEIGHT=769",
      imageLoadFunction: function (image, src) {
        console.log("fetching");
        var img = image.getImage();
        fetch(tempUrl, {
          method: "POST",
          body: xmlWps,
          headers: {
            "Content-Type": "application/xml",
            Accept: "image/jpeg",
          },
        })
          .then((data) => data.blob())
          .then((data) => {
            var reader = new FileReader();
            reader.readAsDataURL(data);
            reader.onload = function () {
              var base64data = reader.result;
              img.src = base64data;
              console.log('source is changed');
            };
          })
          .catch((e) => {
            console.log(e);
          });
      },
    }),
  });

Of course, the layer is added to the map.
We've tried several days understanding why it is not working, please advice.
Edit:
After the suggestion of @Mike we changed from requesting a tiff to a png. That didn't work we got this error: An error occurred while encoding the results of the process No suitable image writer for this output.
Changing to jpeg did work, but then we loose the transparency. But for testing this is OK.
But when setting the img.src to the base64 response we did see the jpeg image appear on the map. But only briefly, too small and at the wrong location.
This makes sense because the JPEG file doesn't contain any geospatial data like coordinates. So how would OL know where to place the image.
Perhaps we need a different layer/source than ImageLayer/ImageWMS?


texts:
I am planning on hosting a map server to serve out directions to my webapp. I need to be able to give public transit directions, time estimate using said public transit, and also offer search for businesses/poi much like google places api.

Can this be done with OpenStreetMap + something else?


texts: DEM classified using SAGA GIS and conversion to point shape

texts:
I have converted DEM to terrain specific points i.e. peaks, pits, saddle points etc. with SAGA GIS using surface specific points tools. The output is showing values as 1, 7, 9 -1 etc; with different colors.

I want to convert to point shape values have attribute values with 1, 7, 9, -1.

How to do in SAGA GIS?


texts: Using QGIS 2.2, I want to move a circle from one specific point to another specific point: How can i grab the exact center of the circle and move it to another location without creating points in the center of the circles?


texts: Looking for a source of data for these specific United States Demographics for People and Businesses

texts:
Sorry for if I come across ignorant. I usually hangout over at StackOverflow. I'm a developer and a client has specific demographics needs that I'm not sure where to get. I looked at some Census data but couldn't find what I was looking for.

Example the client wants to know how many 35-39 year old people live in a given 1, 2, 3, 5 mile radius but Census only has 35-44 year old grouping from what I can tell.

Does anyone know who would be a reliable source for all of the following?

It would need to be something I can download and import or even better it has an API I can tap into.

In Regards to People, distance from a point, 1, 2, 3, 5 miles:
How many..

35-39 Year Olds
Households with no Children
1 Person Living in a Household
2 People Living in a Household
Household Income 75k Higher
Units In Structure - 1 Attached Unit
Home Values worth 1 Mill
Renter Occupied Median Rent amount

Business Demo Info, distance from a point, 1, 2, 3, 5 miles:
How many..

Businesses (Count)
Other Food Services
Furniture Stores
Garden Stores, Bldg Material Stores, Hardware Stores (Can be combined to one number)
Garden Percent of total business are Transportation,
Communication, Utilities


texts: SQL query as part of featureClick in CartoDB.js

texts:
I am a complete novice at both Javascript and SQL so am learning as I'm going with this!

I have made a webpage that shows a map with a layer of points on the left hand side of the page. What I want is to click on a point and display the nearest five points to the clicked point (and associated information about these points) on the right hand side of the page. I have managed to do this so that information about the clicked point shows up but can't get it to show the info for the other five points.

This is the code I am using that doesn't do what I want:

        cartodb.createLayer(map, {
        user_name: 'XXX',
        type: 'cartodb',
        sublayers: [{
            sql: 'select * from branch_points',
            cartocss: '#branch_points{marker-fill: #109DCD; marker-width: 8; marker-line-color: white; marker-line-width: 0;}',
        }]
    })
        .addTo(map)
        .done(function (layer) {
        cdb.vis.Vis.addInfowindow(map, layer.getSubLayer(0), ['address', 'number_of_members', 'lat', 'long']);

        var sublayer = layer.getSubLayer(0);
        sublayer.on('featureClick', function (e, pos, latlng, data) {
            sql.execute("SELECT * FROM branch_points WHERE address='" + data.address + "' ORDER BY the_geom <-> ST_SetSRID(ST_MakePoint(" + data.long + "," + data.lat + "), 4326) LIMIT 5")

                .done(function (data) {
                console.log(data)
                for (var i = 0; i < data.total_rows; i++) {
                    $('#content').append("
" + data.rows[i].address +
                        "&nbsp;&nbsp;&nbsp;&nbsp;" + data.rows[i].number_of_members +
                        "

");
                }
            })

        });

    });

It shows the information about the clicked point if I use the SQL query SELECT * FROM branch_points WHERE address='" + data.address + "'"

I've also just realised that, if I then click on another point, this gets added to the list on the right.

However, when I try to add the part to find the five nearest rows (based on the tutorial here), it doesn't work and I can see from the Javascript console that only one object in 'data' is returned.

Where am I going wrong here? Should I be doing all this code at the same time as adding the layer to the map? How can I get the information about the nearest points to display when a point is clicked? And how do I get this to refresh every time I click a different point?


texts:
I wanted to know if it is possible to make a turn for a point with a defined image (arrow example) depending on the attribute of a field that reflects the angle in degrees.
I want to represent the direction of the wind for these three meteorological stations. In the three I have the addresses (220,230,240 ...) but I do not know if there is any way to rotate the layer in cartocss.


texts: It is not possible to see in QGIS 3.4 data in WFS service from PostGIS view, it is only possible to see data in services created from tables. Is it not possible to create services from SQL views?


texts: Filtering demographic data for USA using TIGER/CENSUS data

texts:
I am working on Texas demographic data for a client. The ask is to collect demographic data for ZCTA areas of Texas state. I am looking for help in the source and linking demographic data for these regions.
ZCTA boundary polygons are downloaded from here.
Some information on the website on demographic details says.

The core TIGER/Line Files and Shapefiles do not include demographic
data, but they do contain geographic entity codes (GEOIDs) that can be
linked to the Census Bureau’s demographic data, available on
data.census.gov.

This link has a staggering amount of detail. But, I am interested in only basic demographics.
As an alternative, I thought, I have found what I needed at https://www2.census.gov/geo/tiger/TIGER_DP/2018ACS/

This is in Geodatabase format and has required ZCTA polygons and demographic details as Tables. Is there any advice to get basic statistics like population,pop_density, sex, age, employment, ethnicity, etc


texts: Joining attribute by location failing to join all attributes

texts: I have a polygon representing an urban area. I have point data representing the cities which fall in this urban area. I'm trying to combine both polygon and points using a "join attributes by location". When I do so, only one point out of the 11 points appear in the attribute table. Any insight on what I may be doing wrong?


texts: Working with GeometryCollection in Leaflet layer


texts: Is there any learning material available for GE Smallworld?

texts:
I have been searching for any kind of tutorial or getting started kind of material for GE Smallworld. From their website, I could not find anything relevant. Maybe I am missing or overlooking sometging there.

Also is there any demo or trial version available for the same to explore?


texts: Working with legend patches/symbology in ArcGIS Desktop?

texts:
I am working with a legend in a map from ArcGIS 10.1. The map is used as a template and will be used many times to create different maps. The legend is used to show a soil type and its descriptor:

So, in other words, I have set my layer symbology to unique values, add all values, single field and I have turned off all the symbology so that the patches do not show up in the legend.

The solution I am looking for, is to avoid having to manually turn off the symbology all the time. I just want to 'Add All Values' and have the item and Description populate in the legend without the symbology patch.

I don't think there is a checkbox/button that does this in the layers properties symbology tab, but I was trying to figure out how to do this in the legend properties dialogue box. So far, I can't seem to figure it out. It seems like any of the styles under the Legend-->Properties-->Items tab requires a patch, label and description. There is no option to just choose the label and description. Am I missing it somewhere?


texts:
Can I automate Geomedia using VBA?

The Geomedia training manual "Fundamentals of Geomedia Development Part 1" talks about automating using visual basic but I do not have Visual Basic.


texts: Where is the OpenLayers Plugin in QGIS 2.4?

texts:
I want to do a really simple thing: add OpenLayers/Google Maps basemap as WMS layers. I found this answer: How to add Basemaps from Google or Bing in QGIS?

I installed the OpenLayers plugin, restarted QGIS, but under "Plugins" dropdown there is no OpenLayers plugin. Is it a bug? Or I need to do also some other things to add plugin? Or where else I can find this plugin settings?

Probably my question is: how to add world basemap layer to QGIS?


texts:
I want to change projections for images using gdal bindings for c#. Gdal_translate seems like just renaming of projection (using a_srs parameter), but not reprojecting, so I used gdalwarp with s_srs parameter for that task.
It's pretty clear what to pass to the Gdal.wrapper_GDALTranslate function: path to the destination file, dataset of the input file and some minor stuff. It also has more or less clear documentation. But for gdalwarp there are 3 kinds of different methods:

Gdal.wrapper_GDALWarpDestName(string dest, int object_list_count,
SWIGTYPE_p_p_GDALDatasetShadow poObjects,
GDALWarpAppOptions warpAppOptions, Gdal.GDALProgressFuncDelegate callback,
string callback_data); //returns Dataset

Gdal.wrapper_GDALWarpDestDS(Dataset dstDS, int object_list_count,
SWIGTYPE_p_p_GDALDatasetShadow poObjects, GDALWarpAppOptions warpAppOptions,
Gdal.GDALProgressFuncDelegate callback, string callback_data); //returns int

Gdal.AutoCreateWarpedVRT(Dataset src_ds, string src_wkt, string dst_wkt,
ResampleAlg eResampleAlg, double maxerror); //returns Dataset

It's absolutely not clear what these functions do and how they do it. Docs on gdalwarp page don't have any of these. I also don't understand the parameters: there is no input file or dataset parameter, only destination ones; the SWIGTYPE_p_p_GDALDatasetShadow class, which also doesn't have docs (there are not a single word about "shadow" either).

Summarizing, I'd like to hear some explanations about how this funcs work and how to make them work as binary gdalwarp.exe does.


texts: Prevent Export to CAD to add exported data to the map

texts:
Is there a way to prevent ArcMap from automatically adding Export to CAD results to the current map?

Export Data gives you the choice when the operation is completed but Export to CAD does not.


texts: How to prevent gpkg size increase when I delete attributes?

texts:
I have a file, polygons.gpkg that I am using in QGIS.  Its original file size is 48MB.

When I do nothing except delete a handful of the attribute table's fields, I expect the file size to decrease.  However, it instead increases to 85MB.

After deleting the fields, if I export as a new gpkg (Export > Save Features As), the new file is only 38MB.  This result makes sense to me.

Is there a way to "clean up" whatever extra data is getting stored in the original polygons.gpkg so that its size on disk is reduced?  That would be a more convenient solution than exporting anew...


texts:
I'm trying to write a "simple" plugin as training and to automate a task repetitive task as well.  I would like to have the map layer hardcoded instead of make sure you select the correct one but if I use mapLayersByName it adds [ and ] to start and end of layer which makes it think its a list. I can fix this by using Layer[0].getFeatures() instead of normally using Layer.getFeatures()

What causes this?

Layer = QgsProject.instance().mapLayersByName('Parry Sound FDSA Boundaries')
layer = iface.activeLayer()

print(Layer)
[<qgis._core.QgsVectorLayer object at 0x000001D610F0AD38>]

print(layer)
<qgis._core.QgsVectorLayer object at 0x000001D610F0AD38>


texts: Getting label to display one decimal space?

texts:
The attribute table correctly shows all data for counties. Some labels show one decimal and other labels shows as none.

I have tried to change the decimal places in the Layer Properties (Formatting-Formatting) section to 1, but this does nothing to the labels.


texts: Is it possible to migrate users from one ArcGIS Server instance to different one

texts:
We are planning to consolidate 2 ArcGIS Server instances, by migrating all services and users from one into the other.

So users are stored in json files:

{
  "username": "foo",
  "password": "7SxxxxxxxxxxxxxxxxxxxxxxxxxxKEfw==",
  "description": "dummy",
  "email": "foo@bar.de",
  "fullname": "bar, fo",
  "secretQuestion": "default",
  "secretAnswer": "IxxxxxxxxxxxxxxxxxxxG577Q=",
  "disabled": false
}

Apprently the secret answer and the password is hashed. I can't find any information on how this is hashed and if the hash is based on some machine key, certificate or other.

So the question is: Can those user configurations be migrated, without further ado or do we need to create new passwords for each user and email them out after we've copied the files.


texts: Using Projections, Transformations and Area Calculations in ArcGIS Desktop?

texts:
I am working with a dataset of the USA Marine Exclusive Economic Zone (EEZ) and a dataset of current Marine Projected Areas (MPAs). Download Data here  This is all being done in ArcGIS 10.4. I know that to calculate area I must first transform the layer from GCS to PCS. This does not seem to be a problem.

Next I calculate the area using the add geometry tool on the new PCS-transformed layer. Then I sum the area of the us EEZ I arrive at a value of ~25 Million Square Kilometers! The real size of the USA EEZ should be ~11 Million Square Kilometers.

Furthermore when I sum the area of the US MPA I arrive at a value of ~31 Million Square Kilometers. This is obviously wrong as this should be less than the total EEZ area.

Ultimately I just need to know the percent of area of the EEZ that is covered by an MPA.

Where am I going wrong with the projection or area calculation?


texts: Performing Radiometric Calibration of Sequoia Imagery?

texts:
I recently bought a used Sequoia camera and when I bought it, I was under the impression that the sun irradiance sensor and calibration plate would calibrate all my images in real time and I wouldn't have to do a radiometric calibration. However, its not real time as the camera just records all the information to do the correction afterwards.
I am familiar with GIS programs and raster calculators, and want to know if there are any open source plugins or documentation that already do this in QGIS, GRASS, SAGA, or even python and R?
I'm not looking to buy pix4d or agisoft as I already own software to make a mosaic.
If not then what would be my best approach for accomplishing this?
I am familiar with what needs to be done from research but seek a good explanation. I am looking to produce an NDVI out of the imagery.


texts: How to pass time dimension to postgis DB layer WHERE clause in Geoserver?

texts:
I have successfully configured a layer with time dimension that is backed by an SQL query to a PostGIS DB.
I can query it through WMS, but I just can't find a way to pass the start and end time to the query (WHERE clause), so that the DB is the one filtering by time and not Geoserver. (I'm assuming that is what is going on, since my query doesn't have a where clause and works fine ... albeit inefficiently.)
Is it possible to pass start/end to the layer query and, if so, how?

Update:

Ok, I turned on postgresql logging and what geoserver is doing is wrapping my sql view layer in something like:

SELECT * FROM ( <my sql view query> )
as "vtable" WHERE  ('2012-01-18Z' >= "start"
AND "start" IS NOT NULL
AND '2013-01-18Z' <= "end"
AND "end" IS NOT NULL

I also analyzed the execution plan vs. the execution plan of a simple query with the same where clause, and the costs where exactly the same.

In my case though, I'm dealing with a function, not a simple query so I'm not sure what the impact is. This is more of a postgresql question now. I'll post my findings here.


texts: Why GeoServer returns 404 response with coverage limits?

texts:
I have just installed GeoServer, but I'm geting some trouble getting it work. I'm doing some test with the examples provided on installation, specifically with tiger:tiger_roads. Despite I can get the tile, when I move around the map, it throws 404 errors on chrome console, and the next response:

Coverage [minx,miny,maxx,maxy] is [2411, 5111, 2414, 5116, 13], index [x,y,z] is [2410, 5113, 13]

I expected that GeoServer return a 20X (ok) with no data, because there is nothing to display inside that bounds.

Is that a normal behaviour? If not, what do I have to set in order to prevent that error?

This is a complete index.html where you can reproduce the problem. Just open it, and move along the map, or change the zoom.

  <title>Vector tiles</title>

  <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@master/en/v6.1.1/css/ol.css" type="text/css">

Mapbox Protobuf - vector tiles


texts: Where do I obtain the boundary for an address via OSM?

texts:
The boundary around the address shown in red in the OSM GUI, It does not return when querying, and in the download XML the "GeoJson" of this polygon does not show... is it possible to obtain this boundary via the API?
I'm not sure how it's being generated on the backend.


texts: Writing scripts that can call on both Arcpy and PyQGIS?

texts:
I have spent quite a bit of time looking for a clear answer this topic and have still been unable to really accomplish my goal of accessing PyQGIS in a stand alone script.

Parts of answers have been provided across many different questions such as:

Standalone applications using QGIS and environment variables

pyQgis in stand alone script, vector loading error

Writing standalone Python scripts using PyQGIS?

The most thourough Answer that I have found was provided by @gene here.

What I particularly am interested in, is being able to write scripts that can call on both Arcpy, and PyQGIS. I have set both PATH and PYTHONPATH system variables according to the PyQGIS cookbook documentation as:

 C:\OSGeo4W\apps\qgis\bin,%PATH%;C:\Python27\ArcGIS10.2\Lib\site-packages\PyQt4;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\;C:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\

and

C:\OSGeo4W\apps\qgis\python; C:\OSGeo4W\apps\Python27\Lib\site-packages

Respectively.

I am starting with this script:

from qgis.core import *

QgsApplication.setPrefixPath("C:\OSGeo4W\bin\qgis.bat", True)
QgsApplication.initQgis()
# or your solution
# read a shapefile
layer = QgsVectorLayer('H:\DATA\Airfields_AB.shp', 'Airfields', 'ogr')
layer.isValid()
True
# loop through layer
for elem in layer.getFeatures():
    geom= elem.geometry()
    attr =elem.attributes()
    (processing)

I am looking to avoid batch scripts that set the appropriate settings, but rather call them from inside the Python script. The optimal scenario for me would be to use the IDLE in the ArcGIS 10.2 folder to run the preceding code. I am using a Windows 7 machine with ArcGIS 10.2 and QGIS 2.01.

Currently the results of this code is:

Traceback (most recent call last):
  File "F:\Users\...\PyQGIS_Test_01.py", line 1, in <module>
    from qgis.core import *
ImportError: DLL load failed: The specified module could not be found.


texts: PostGIS ERROR: getPoint4d_p: point offset out of range

texts:
I have a set of streets (LINESTRING) in a PostGIS 9.1 PostGIS 2.1 database.

I need to obtain points from the lines, on the right and on the left of the street.

I offset the lines with:

   ST_OffsetCurve(the_geom, 30)

then I try to get the points:

   (ST_DumpPoints(ST_Segmentize(the_geom, 20))).geom

when i get the error:

    ERROR:  getPoint4d_p: point offset out of range

Any one can replicate the behaviour ?


texts:
I am trying to extract zonal statistics for different classes in R.
I have a raster with two classes (0,1) and need the area (or percentage) of each class under the area of each polygon. I tried  exactextractr::exact_extract  but I don't manage to extract a frequency of each class. I can get the sum of class 1, but that wont tell me the proportions.


texts: Map data do not show up under the Leaflet magnifier

texts:
I tried to add Leaflet magnifier to my map and it is perfectly working on the base map, but it doesn't magnify or show my own data on the map. My own data is loaded as GeoJSON to map and its visible on the map, but the magnifier doesn't pick it. Here is my script:

//Begin function to create map

function createMap(){

    var tileUrl = 'https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}{r}.png';
    // but use two independant TileLayer objects
    var mapTiles = L.tileLayer(tileUrl),
        magnifiedTiles = L.tileLayer(tileUrl);

    var map = L.map('map', {
        center: [32.00983, 118.7969],
        zoom: 11,

    layers: [ mapTiles ]}
    );

    var magnifyingGlass = L.magnifyingGlass({
        layers: [ magnifiedTiles ]
}).addTo(map);
    getData(map);
};
//End function create map

//Begin function to load geoJson data file.....

function getData (map){
    $.getJSON("data/popular_POIs_AOIs_corrected.geojson",function(data){

    // Add GeoJSON layer to the map once the file is loaded

        var dataLayer = L.geoJson(data,{

        // Change Leaflet default markers to circles
            pointToLayer: function(feature, latlng) {
                return new L.CircleMarker(latlng, {
                  radius: 5,
                  color: "red",
                  weight: 1
                });
              },
            // Adding popup to POIs
            onEachFeature:function(feature, layer){
                layer.bindPopup(feature.properties.name);
                //Event listeners to open popup on hover and fill panel on click
                layer.on({
                mouseover: function(){
                    this.openPopup();
                },
                mouseout: function(){
                    this.closePopup();
                }
            }).addTo(map);
                console.log(feature.properties)
            }
        });

        //create filter by using leaflet default filter function
        var overlayMaps = {
            "PointOfInterest": dataLayer
        };
        L.control.layers(null, overlayMaps).addTo(map);

        //create search operator
        createSearchOperator(map, data);

    });
};


texts: Spatial join (Points to Polygons) joining points that do not fall inside polygons to attribute table

texts:
I am using ArcMap 10.6.1 and am having trouble with a spatial join. I have created 250km buffer polygons around some of my sampled data points and I am now trying to join some modelled data to those polygons to give me the average, min, max, and deviation of the data from that global model.
For some of my polygons, the join works normally but for others Arc is sampling points nowhere near the polygon or just not sampling the data inside the polygon at all rendering zeros '0' in the data columns after joining.
Here are the points inside the polygons and their data:

and here is the output of that polygon:

As you can see the data are coming out as zero when there are usable data within the polygon.
These are the join parameters I am using:

Why this might be happening?


texts: QGIS: spatialite incorrect string concatenation when loading layers

texts:
I am trying to draw some polygons in spatialite using the DB Manager in QGIS. However
select 1 as id, st_geomfromtext('POLYGON((0 0,0 '||random()||','||random()||' '||random()||','||random()||' 0,0 0))',31256) as geom

throws the following error
Data source is invalid (In ExecuteSQL(): sqlite3_prepare_v2(select 1 as id, st_geomfromtext('POLYGON((0 0,0 '):
              incomplete input)

which gives me the impression that the concatenation doesn't work this way. But how else is this supposed to work?
Win10 1607, QGIS 3.14.16, Spatialite 4.3.0a
and on
Ubuntu 20.04, QGIS 3.10.8, Spatialite 4.3.0a


texts: Why does deleting columns in the QGIS attribute table take longer than in ArcGIS?

texts:
In QGis, I recognised that deleting columns takes quite a while - is there a faster way than doing it in the attribute table (in editing mode?). I am speaking about a table with ~ 300 000 lines...

Because in ArcGis the same procedure I just one click and the column is immediately deleted...in QGIS I have to wait several minutes...(there is a dialogue window where you can see how many objects are loaded so far.....but why does it load anything at all?)


texts: How to programmatically set a rule-based renderer in QGIS?

texts:
I'm in the process of developing a plugin which highlights/changes the color of a set of features in a vector layer, depending on some calculation.

I found a nice article about QGIS – Rule based styling
and i need to do the same thing but using python code.

What is the best way of doing this? Are there any examples out there?


texts: I was doing a research project a little while ago and found out about FIPS 6-4 which is used to identify counties in the United States.  I also understand that this standard is a bit out of date.  Is there a similar standard for identifying cities?


texts: How to programmatically write list of roads into OSM format?

texts:
I have Java List of Objects where each object represent road + some attributes:

public class Road {
    public String ID;
    public int direction;
    public int type;
    public double startLatitude;
    public double startLongitude;
    public double endLatitude;
    public double endLongitude;
}

I want to write this data into OSM file format, how can I do it?

One option I thought about was to write it to Shapefile using known libraries for it, and then convert Shapefile->OSM. However must a direct way too.


texts: Calculating percentage of overlap between 2 features from 2 different layers using ArcGIS Desktop?

texts:
I have two layers. Layer 1 has features that are property/parcels with area in acres. Layer 2 has features that are wetlands/bodies of water with area in acres. I want to calculate parcels that have for example 0% wetlands, 10% wetlands, 20% wetlands, 30% wetlands etc. to 100% wetlands.

How can I do this on ArcGIS Desktop?

Ideally, I want to find parcels/properties that have a limited number or a limited percentage of wetland coverage.


texts: Is there a library to make custom markers for Google Maps API V3 by setting the marker's icon, labels and opacity?

texts:
Is there a library to make custom markers for Google Maps V3 by controling the icon, labels and opacity?

This library for Google Maps API V2, Labeled Markers, seems OK, but I was hoping for a V3 version, and was curious about opacity control also?


texts: Export Attachments for Arcgis Collector - Naming

texts:
I am using Arcgis Desktop 10.4.1 and Arcgis Collector.

I've followed the guide for exporting attachments as described on ESRI's webpage here: http://support.esri.com/technical-article/000011912

It works really well, but I want to change the filenames. I want each filename to have the name from a field from the shapefile, and then a suffix (like _1,_2,_3)

I did fiddle a bit with this line, trying to add field names and whatnot, but I didnt get it to work.

 filename = filenum + str(item[1])

Anyone able to point me in the right direction?

Script from link:

import arcpy
from arcpy import da
import os

inTable = arcpy.GetParameterAsText(0)
fileLocation = arcpy.GetParameterAsText(1)

with da.SearchCursor(inTable, ['DATA', 'ATT_NAME', 'ATTACHMENTID']) as cursor:
    for item in cursor:
        attachment = item[0]
        filenum = "ATT" + str(item[2]) + "_"
        filename = filenum + str(item[1])
        open(fileLocation + os.sep + filename, 'wb').write(attachment.tobytes())
        del item
        del filenum
        del filename
        del attachment


texts: QGIS modeler and pyqgs standalone programming questions

texts:
i have create two model in QGIS modeler one path for raster and one for vector and now i want to create a QGIS plugin from that models but i have some questions.

first model :

that model work fine in QGIS from processing tools but now work on standalone pyqgis script because i thing i have only the final exports(i thing) from aglorithms but that i need only the final.

if i change the model to :

with exports for any algorithms then working but i dont like this method because  keep not necesery layers for my task i need keep only the final export.

how to fix that ?

here the python codes :

model 1 :

##=name
##myvector=vector
##newvector=output vector
outputs_QGISFIELDCALCULATOR_1=processing.runalg('qgis:fieldcalculator', myvector,'mynewfield',0,10.0,3.0,True,'a+b',None)
outputs_QGISFIELDCALCULATOR_2=processing.runalg('qgis:fieldcalculator', outputs_QGISFIELDCALCULATOR_1['OUTPUT_LAYER'],'mynew2_field',0,10.0,3.0,True,'a+b+c',newvector)

raster :

##test=name
##myraster=raster
##final=output raster
outputs_grass7:r.slope_1=processing.run('grass7:r.slope', myraster,0,False,'1.0','0.0',None,'0.0',None)
outputs_qgis:rastercalculator_1=processing.run('qgis:rastercalculator', [outputs_GRASS7R.SLOPE_1['slope']],'GRASS7R.SLOPE_1:slope@1*100','0.0',None,None)
outputs_qgis:rastercalculator_1=processing.run('qgis:rastercalculator', [outputs_QGISRASTERCALCULATOR_1['OUTPUT']],'QGISRASTERCALCULATOR_1:OUTPUT@1*50','0.0',None,final)

model 2 :

##=name
##myvector=vector
##output=output vector
##newvector=output vector
outputs_QGISFIELDCALCULATOR_1=processing.runalg('qgis:fieldcalculator', myvector,'mynewfield',0,10.0,3.0,True,'a+b',output)
outputs_QGISFIELDCALCULATOR_2=processing.runalg('qgis:fieldcalculator', outputs_QGISFIELDCALCULATOR_1['OUTPUT_LAYER'],'mynew2_field',0,10.0,3.0,True,'a+b+c',newvector)

raster :

##test=name
##myraster=raster
##slope=output raster
##outraster=output raster
##final=output raster
outputs_grass7:r.slope_1=processing.run('grass7:r.slope', myraster,0,False,'1.0','0.0',None,'0.0',slope)
outputs_qgis:rastercalculator_1=processing.run('qgis:rastercalculator', [outputs_GRASS7R.SLOPE_1['slope']],'GRASS7R.SLOPE_1:slope@1*100','0.0',None,outraster)
outputs_qgis:rastercalculator_1=processing.run('qgis:rastercalculator', [outputs_QGISRASTERCALCULATOR_1['OUTPUT']],'QGISRASTERCALCULATOR_1:OUTPUT@1*50','0.0',None,final)

how to do model 1 to work ?what is the difference ?


texts: SQL Server to generate points on map for web

texts:
These are my components:

SQL Server 2016 with R-in-database.
smb-share on a subdirectory underneath root directory of an IIS with enough rights to let
R-in-database write files.
Tables in database containing spatial data
leafletjs to show maps

I want to show one or more rows of spatial data from a table from SQL Server as marker on a map and all the other columns as tooltip in the map using Leaflet.

What I did:

Query spatial data from database in dbeaver (eclipse-plugin)
Mark data as geospartial (in dbeaver)
Click on spartial view
Click on view in brwoser
Copy that dynamically generated data into my IIS-directory

That works like a charm. But there are three to four manual steps what is no problem, when it does not come to mass data. The fileformat used by dbeaver for Leaflet is not too complicated.

So I wonder if anyone figured out how to export a simple table with spatial information from SQL-Server into a GeoJSON/Leaflet file using R-in-database.

Any ideas?


texts: View Markers on Both Sides of OpenLayers Dateline -- Tips and Tricks

texts:
I'm looking for advice on how to display vector markers on both sides of the dateline. I'm using a GeoRSS feed.

Currently only one OpenLayer's "globe" worth of data shows at a time. You have to pan east/west of dateline to get that "globe's" data.

I've read about some tricky hacks that might work -- though they'd be expensive to do depending on the size of your dataset. So i'm wondering what other hacks people here have come up with. Please share your ideas.


texts: How to find a point on linestring and in a range of 10 meter

texts:
i have a linestring which is show in diagram and i have a point which is some time on the linestring or out of linestring  but in range which is red line and some time its is out of range so how can i find when its on route and out of route in mysql spatial index

MY project is this as you can see bus no 26 is out off route so how can i get the bus is out off route

i think there is two things to do this

convert linestring into a polygon with range and find point in a polygon.
Point convert into polygon and check linestring is intersect the polygon.

so tell how can i do that

my database structure is

'id', 'int(11)', 'NO', 'PRI', NULL, 'auto_increment'
'route_name', 'varchar(45)', 'YES', '', NULL, ''
'from_id', 'varchar(45)', 'YES', '', NULL, ''
'to_id', 'varchar(45)', 'YES', '', NULL, ''
'line_string', 'geometry', 'NO', 'MUL', NULL, ''


texts: Seeking free, publicly available GIS data for Singapore?

texts:
Are there any free, publicly available datasets for Singapore?

I've examined Openstreetmap, Global Admin Boundaries, GRUMP and the Natural Earth datasets, but I'm interested in vector data of higher resolution and or any type of census information.


texts: "bending" lines to a predetermined shape

texts:
I have a dataset with AIS-transponder information.

A AIS-transponder is a digital system onboard a ship that sends/receives information to/from the vessels within range of the VHF transceiver in a SOTDMA defined interval.

The set has linestrings, every line is the track of one journey of one ship. The line starts at the point of entry and ends when the vessel changes his status to "moored" (or the otherway around)
The vertices of the line are the points where the vessels transmitted.
This presents me with a problem, as seen in the following shot:

The tranmission interval depends on the type of ship and speed (and a few other parameters). In a lot of cases this means that in area's with sharp turns the line between two vertices is displayed over land.

In the screenshot above i have displayed a red-dotted-line.
Is there a way to force the line between the vertices to stay within the red-dotted-line?

The data is stored in a geopackage with one layer per year, starting from 2009.I use QGIS 3.6.


texts: KMZ with attachments having issues in GE

texts: I have a point feature class with attachments-sometimes multiple attached images per point - and everything looks and works perfect in ArcGIS Pro. But once I converted to KML and opened the file in Google Earth (GE), some of the photos were randomly rotated, and with points that had multiple images - only one of the photos is viewable in the pop-up and the other image links don't work. Any idea why the images wouldn't work properly in GE?


texts: Can't fix this error using OpenLayers v6.3.1 release

texts:
I'm very new at using OpenLayers.  I really would like to test the consumption of a WFS xml file being returned from a REST call.  Using Openlayers v6.3.1 release:
https://openlayers.org/download/
I coded up Thomas Gratier's Block that works with a WFS xml file (thank you for this):
https://bl.ocks.org/ThomasG77/5579a8831db6fa0f5641474e56739201
My code is exactly as is shown on that web page with the only exception being that I am using the URL provided in the mapserver.org site:
https://mapserver.org/input/vector/wfs.html
... That URL being:

https://demo.mapserver.org/cgi-bin/wfs?
SERVICE=WFS&
VERSION=1.0.0&
REQUEST=getfeature&
TYPENAME=continents&
MAXFEATURES=100

When I run this using npm, I keep getting this error:

TileLayer.js:161 Uncaught TypeError: tileSource.getTileGridForProjection is not a function

As stated I'm really new at using the OpenLayers API. Am I getting this error because of the mapserver.org URL I am using?  Am I doing something wrong or missing something?  Or is this a bug in the latetest version of OpenLayers?
Thanks to all for your time and assistance.
gwm


texts: Calculating lat/long in NAD 83 and NAD 27 using arcpy or modelbuilder

texts:
I have four double columns for lat/long with NAD 83 and NAD 27.  The native projection of the data is in NAD 83, but the client want's the attributes filled out for NAD 27 as well.  I want to calculate these fields with a script before I sent out to a client.  I can use the field calculator to calculate this:

def find(shape):
  point = shape.getPart(0)
  return point.Y

find(!Shape!)

This works for the native projection of the data.  Is there a way to change the projection to NAD 27 and calculate the other fields in it?


texts:
I am using ArcGIS Pro 1.4.  I have a shapefile with the boundaries of the countries in Sub-Saharan Africa which I am using as the mask.  The raster is a land use data set.  When I run Extract by Mask I get a good clean raster except that there is a large rectangle out in the ocean. (Inside the red line)

Extract

What could be causing this?


texts: arcpy.AsShape function returning RecordSet not Geometry

texts:
I have the following code:

feature_geometry = arcpy.AsShape(json_string, esri_json=True)
print feature_geometry
print type(feature_geometry)
>>><geoprocessing record set object object at 0x0E1D9F20>
>>><class 'arcpy.arcobjects.arcobjects.RecordSet'>

It's returning a record set however the documentation says it should return a geometry object... What I am missing?

This is the ESRI_JSON object I'm passing:

{"displayFieldName":"","fieldAliases":{"OBJECTID":"OBJECTID","SHAPE_Length":"SHAPE_Length"},"geometryType":"esriGeometryPolyline","spatialReference":{"wkid":102100,"latestWkid":3857},"fields":[{"name":"OBJECTID","type":"esriFieldTypeOID","alias":"OBJECTID"},{"name":"SHAPE_Length","type":"esriFieldTypeDouble","alias":"SHAPE_Length"}],"features":[{"attributes":{"OBJECTID":2,"SHAPE_Length":27314.085654472176},"geometry":{"paths":[[[-12374196.4669,7608025.6432999969],[-12373633.217700001,7580717.365699999]]]}}]}


texts: creating one tree to many observations in qgis

texts: Looking to create a database for QGIS where each point represents a tree (with name attribute) and another table of observations about each tree over time. Ideally I can update tree location in QGIS without breaking the relationship (sometimes they are inaccurate).


texts:
Can someone help me understand why the following ST_Area query returns 0:
SELECT ST_Area(ST_SetSRID(ST_GeomFromGeoJSON('{"type":"Polygon","coordinates":[[[-180.0,0],[180,0],[180,80],[-180,80],[-180,0]]]}'), 4326)::geography);
 st_area
---------
       0
(1 row)

but changing the coordinates slightly gives a reasonably large looking value for area.
af=> SELECT ST_Area(ST_SetSRID(ST_GeomFromGeoJSON('{"type":"Polygon","coordinates":[[[-179.99,0.01],[179.99,0.01],[179.99,79.99],[-179.99,79.99],[-179.99,0.01]]]}'), 4326)::geography);
     st_area
------------------
 13948451441.7438

For reference, this is my PostGIS version
SELECT PostGIS_Version();
            postgis_version
---------------------------------------
 2.5 USE_GEOS=1 USE_PROJ=1 USE_STATS=1

Follow up question: why are these areas different than the ones I see on geojson.io? Do I have a the wrong CRS or some other problem?
The docs say "by default area is determined on a spheroid with units in square meters" https://postgis.net/docs/ST_Area.html
If I put the same coordinates into geojson.io as feature collections, I see the following areas:
{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "properties": {},
      "geometry": {
        "type": "Polygon",
        "coordinates": [[[-180,0],[180,0],[180,80],[-180,80],[-180,0]]]
      }
    }
  ]
}

gives an area of 251720748408616.50 Sq. Meters
{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "properties": {},
      "geometry": {
        "type": "Polygon",
        "coordinates": [[[-179.99,0.01],[179.99,0.01],[179.99,79.99],[-179.99,79.99],[-179.99,0.01]]]
      }
    }
  ]
}

gives an area of 251654405021681.66 Sq. Meters


texts:
I have a line which is 709 meter long. I need the same line with 750m long. I mean the same line that I need the same direction.

Can I solve this with QGIS Desktop 2.16.1?


texts: Group and export to pdf based on an attribute field using DDP - Python Script

texts:
Using Python, I want to export a map series. Each series needs to be grouped based on an attribute field which is not being used in DDP settings (page num, page index etc...).

For example: my shapefile RoadName.shp has a field called RoadType.  Now when I ask my DDP to export maps, it should group diff RoadTypes into one single (multipage) pdf.

Any quick solution please?


texts: OWSLIB Python WCS GetCoverage does not work

texts:
I wrote a Python script in order to read a WCS with the module OWSlib:
# -*- coding: utf-8 -*-
from owslib.wcs import WebCoverageService
from owslib.util import Authentication
ldbv_url = 'https://geoservices.bayern.de/inspire-ows/v1/dop/oi/dls/wcs?'
wcs = WebCoverageService(ldbv_url, version='2.0.0',auth=Authentication(username='Test', password='Test'))
# Available Layer
print(wcs.contents.keys())
layer = 'dop20'
#GetCoverage Request
subset_bbox=(686995,687195,5346918,5347118)
#output=wcs.getCoverage()
output = wcs.getCoverage(identifier='dop20',Styles='fc',bbox=subset_bbox,format='image/tiff',crs='EPSG:25832', width=200, height=200)

However I get an error, as the CoverageID is wrongly set:
dict_keys(['dop20'])

Traceback (most recent call last):

File "r:\85\85_gemeinsam\rie\import_wcs.py", line 40, in <module>
output = wcs.getCoverage(identifier='dop20',Styles='fc',bbox=subset_bbox,format='image/tiff',crs='EPSG:25832', width=200, height=200)
File "C:\Users\rie\Anaconda3\lib\site-packages\owslib\coverage\wcs200.py", line 216, in getCoverage
u = openURL(base_url, data, method, self.cookies, auth=self.auth)
 File "C:\Users\rie\Anaconda3\lib\site-packages\owslib\util.py", line 210, in openURL
req.raise_for_status()
 File "C:\Users\rie\Anaconda3\lib\site-packages\requests\models.py", line 940,    in raise_for_status
raise HTTPError(http_error_msg, response=self)
HTTPError: 404 Client Error: Not Found for url: https://geoservices.bayern.de/inspire-ows/v1/dop/oi/dls/wcs?version=2.0.0&request=GetCoverage&service=WCS&CoverageID=d&crs=EPSG%3A25832&format=image%2Ftiff&width=200&height=200&Styles=fc

The CoverageId must be dop20.
What am I doing wrong?
I tried identifier=wcs['dop20'].id which gives me dop20, if I print it.
The line output = wcs.getCoverage(identifier=wcs['dop20'].id,Styles='fc',bbox=subset_bbox,format='image/tiff',crs='EPSG:25832', width=200, height=200)
still gives me following error:
HTTPError: 404 Client Error: Not Found for url: https://geoservices.bayern.de/inspire-ows/v1/dop/oi/dls/wcs?version=2.0.0&request=GetCoverage&service=WCS&CoverageID=d&crs=EPSG%3A25832&format=image%2Ftiff&width=200&height=200&Styles=fc

Again the CoverageID is set wrongly.


texts: Computing parameters for QGIS Affine transformation?

texts:
I have a vector floorplan (DXF) that I've added to a blank project in QGIS using the Dxf2Shp plugin.

I've been reading tutorials and StackExchange threads, but I can't seem to find out how to "georeference" my layer?

I'm assuming I can somehow select the corners of the building and set the lat/long.

My goal is to export a shapefile that I can use with TileMill and TileStache.

I realized that the project coordinates were actually lat/long coordinates:

and I need to use the "Affine (Rotation, Translation, Scale)" plugin to "place" my CAD drawing.


texts: Calculate Circle Geometry Based On Point for Map Service

texts:
I have a Map Service that is currently just multiple boundary layers. Users query this Map Service with a lat/long to determine whether or not a Point falls within a Boundary. Currently they are using the ArcGIS Identify operation to do this procedure.

We've found cases where some points of data are falling outside of all boundaries. If the Point is X distance away from a boundary, the users would still like it to be returned. In cases like this, I was thinking of having the user calculate a Polygon Circle with X distance (X determined by their specific function, but let's say 5 miles) based upon their Lat/Long.

My thinking was to have them pass in the geometry for this Polygon Circle, rather than passing in the Point. If there is an intersection, return that boundary. I understand that this could lead to returning multiple results, but the users are fine with this. They basically care whether or not the Point falls within, or near, a given boundary.

What are some good methods for calculating the geometry needed for a Polygon Circle, given the Lat/Long, to be used in the Map Service Identify function?

What I've Tried:
I have tried using the "Tolerance" parameter. However, I'm not sure I like this given that it's based upon Pixel tolerance (I understand why). I feel like this wouldn't be the best route to go.

I was told by ESRI (am waiting on a link) that there is an SoE that allows for a "Find Nearest" type function. I'm worried that adding in an SoE could cause blocking on future update for ArcGIS Server. E.X. - Map Services get fundamentally changed, which breaks the SoE, which prevents us from upgrading.


texts: Why are QGIS's QuickMapServices on Mac (Apple) not showing up like on Windows?

texts:
Is QuickMapServices on Mac (Apple) limited for some known reason?

In Windows QuickMapSerivces there are many other WMS.

Need the Google Satellite WMS to be available on Mac (Apple).

The answer provided by gene solved the issue, forgot to do
Web  >  QuickMapServices  >  Settings  >  More services  >  Get contributed pack


texts: Field Calculator extract three last digits from another field

texts:
How everyone!

I have two fields the on is the cadastral number which is for example 051020213001 and I am trying to fill the other field (label) with the last 3 digits from the cadastral number, in this case 001. Is there any way I can do that automatically and not manually because I have 2800 polygons in which I have to do that. I am using QGIS 2.2.0


texts: Extra attribute is embedded into KML file after conversion

texts:
I converted point shapefile into KML which has two columns, one is Name of School and second is Coordinates.
"Coordinates" column has only 10 rows. And in the "Name of School" column, there are 30 rows.
When I open it in Google Earth there is a coming by name column where the row has coordinates which is ok for me. The problem is about the row which has no coordinates.
There are 000 coordinates. When I click such point it is opened in between the ocean.
How can I open KML file by coordinates? In Google Earth, I want to end up only with 10 rows and not with 30.


texts: Add a new field in a already created feature class

texts:
I have a feature class. On the basis of some calculation, I want to create a new field in that table and set value of that field. To do so, my algorithm is:

void UpdateFeatureClass(IFeatureClass featureClass, List<Edge> edges)
{
    CreateField(featureClass);
    UpdateDictionary(featureClass);
    UpdateFieldValue(edges);
}

To add a field I use following code snippet:

private void CreateField(IFeatureClass featureClass)
{
    IFields oldFields = featureClass.Fields;
    IFieldsEdit fieldsEdit = (IFieldsEdit)oldFields;

    IField field = new FieldClass();
    var fieldEdit = (IFieldEdit)field;
    fieldEdit.Name_2 = "Value";
    fieldEdit.Type_2 = esriFieldType.esriFieldTypeInteger;
    fieldsEdit.AddField(field);
}

Update dictionary basically creates a dictionary with all features of the feature class. The key of the dictionary is feature's OID and value of the dictionary is the feature. After that I am trying to update features with value in the value field. The code snippet is:

private void UpdateFieldValue(List<Edge> edges)
{
    int fieldIndex = dictionary[0].Fields.FindField("Value");
    if (fieldIndex != -1)
    {
        foreach (Edge edge in edges)
        {
            var feature = _dictionary[edge.PolylineEdge.OID];
            feature.set_Value(fieldIndex, edge.Value);
            feature.Store();
        }
    }
}

Everything works fine for me except the feature.Store() command. Whenever this line executes, 'System.Runtime.InteropServices.COMException' exception occurs. From my perspective, if there is any problem with set value, the error should occur in that statement. I couldn't find out any pointer why the store command creates the error. Can anyone please help me to find why the error is occurring?

EDIT :
I tried to store value in different fields of the feature and succeeded. Only updating the value of the newly created field, gives the exception.

Error message: "Error encoding INFO item during save"
Error code: (-2147220133)

EDIT :
I think the problem is the newly created field is not permanent. after adding the field, I go through the feature class and the newly created field is here. But whenever I close the ArcMap and open a new ArcMap, I find that the newly added field is vanished. So, I think the problem is the change is not permanent. So, My question is how to create a field in a already created feature class permanently?

Thanks


texts: osgeo4mac QGIS 3.4.4 issues with gdal's merge

texts:
I'm trying to run the gdal mosaic tool from QGIS3 homebrew osgeo4mac, but when I run it I get this error:

2019-02-11T18:25:17     INFO    gdal_merge.py -ot Float32 -of GTiff -o /private/var/folders/fc/8d63rgj567954sphjm_18jxc0000gn/T/processing_b134aaed11d54580be7a0a55892749b4/852f65f2e4174785a1b7b8edc21053e9/OUTPUT.tif --optfile /private/var/folders/fc/8d63rgj567954sphjm_18jxc0000gn/T/processing_b134aaed11d54580be7a0a55892749b4/mergeInputFiles.txt
2019-02-11T18:25:17     INFO    GDAL execution console output
             Traceback (most recent call last):

              File "/usr/local/opt/gdal2-python/bin/gdal_merge.py", line 38, in

              from osgeo import gdal

              File "/usr/local/opt/gdal2-python/lib/python3.7/site-packages/osgeo/__init__.py", line 21, in

              _gdal = swig_import_helper()

              File "/usr/local/opt/gdal2-python/lib/python3.7/site-packages/osgeo/__init__.py", line 13, in swig_import_helper

              import _gdal

             ImportError: No module named _gdal

It seems strange because I can run other gdal tools but not that one.


texts: Using Select By Location Intersect, how to exclude the join features that only touch the boundary of target features

texts:
I have two layers: an Agricultural Land layer and a Parcel Layer (Both are polygon shapefiles). Some big features in Ag Layer will contain, but not completely contain several features of Parcel layer and vice versa.

What I want is to select all the features in Parcel Layer that contains any feature or any part of any feature of Ag Land layer. I tried the Intersection method in Select by Location. However, it will also gives me the features in Parcel Layer that only touches the boundary of these Ag land features instead of being in any of them. I don't want any of that part.

My dilemma is shown in the picture:

The Blue layer is the Ag layer (with 50% Translucency) and the base layer is the Parcel layer. So as you can see some Ag features cover parts of 2 or even 3 Parcel features. Therefore completely within or contain couldn't really work here.

I sort of need a Intersect_CLEMENTINI if that makes sense to you.

Any idea how to achieve that?


texts: Editing files within a project outside the GUI

texts:
I'm using QGIS 2.12 Lyon on Windows 10.
Is there a way to edit the files/layers contained within a project other than the Layers Panel? My project takes a very long time to load and the status bar shows one particular file/layer 'loading...'. I can't track the file down in the GUI.


texts: Seeking QGIS 3.4 equivalent of MapInfo Erase Target tool?

texts:
Is there a QGIS 3.4 equivalent of MapInfo's Erase target?

I'm editing a habitat map from aerial imagery, and adding in a lot of new features. I was doing this on MapInfo, so I was drawing a new polygon (e.g. around a pond), setting the target to the overlapping polygon (e.g. the field that the pond is in) and erasing the target by the selected feature (the pond I just drew). The tool is explained here

I now have had to swap to QGIS, so wondering if anyone can tell me which tool/plugin I can use to replicate this functionality?


texts: Openlayers. How to remove last sketch if invalid

texts:
I can currently identify if a polygon is invalid through wps as per below code.
What I want to know is how to remove the last sketch polygon if it returns invalid?

To give you an idea, here is the code that is run on "sketchcomplete".

    farmpaddocks.events.on({
    sketchcomplete: function (e) {
    var poly = e.feature.geometry;//var of sketch geom

    //check if geom valid through wps
    wpsClient.execute({
    server: 'local', //from server address
    process: 'JTS:isValid', //wps function
    inputs: {
    geom: poly  //geom input for testing if valid
    },
    success: function(outputs) {
    //on completion of testing check if false = invalid   geom
    if(outputs.result==false){
    $('#noti').append("Invalid Polygon").show(1000);
    $('#noti').css("color", "red");
    $('#noti').fadeOut(5000);
    draw.deactivate();
    }
    }
    });


texts:
I installed QGIS without selecting the demo datasets. Now I realise that was a mistake.

Is there a way to install these after QGIS installation or do I have to uninstall completely and re-install?


texts: Why is proj version dated in the future?

texts:
I compiled proj (also known as proj.4) from sources on Ubuntu (https://github.com/OSGeo/proj.4.git).
I now wonder why is proj version dated in the future?

E.g.:

$ proj
Rel. 6.0.0, March 1st, 2019

Edit:

Same for proj version 6.1.0, which I freshly updated from git sources:

$ proj
Rel. 6.1.0, September 1st, 2019


texts: Export Shapefile To KML - Google Maps Layers/Tiles

texts:
I need to convert a shapefile (either polygon shp with millions of polygons or polyline shapefile derived from the polygons) into a format to use online in Google Maps.  I currently use GDAL codes including MapTileCluster Pro to create image tiles of high resolution rasters to display via the Google Maps web interface, which works very well.  My problem is displaying very large vector files that well exceed the limits for KML files in Google Maps (https://developers.google.com/kml/documentation/mapsSupport).

I have tried a variety of different methods in converting shapefiles to KML, which is a pretty trivial process for smaller datasets (ArcGIS, ogr2ogr, Global Mapper, etc.).

I have also tried burning the vector files to a raster using ogr2ogr and ArcGIS polyline to raster tool; however, the raster looks good either zoomed in or zoomed out, pending the raster size, not not both.

I would like suggestions on how to display large vector files (millions of polygons) via Google Maps.

Thanks,
Matt


texts: GeoServer Style referencing SQL Server data store

texts:
I have a SQL server (2012) based data store in GeoServer (version 2.6) .
For better readability I created a spatial layer with a whitespace in a column (attribute) name.

Trying to use a style with the attribute "landslide code" reasults in an error.

org.geoserver.platform.ServiceException: The requested Style can not be used with this layer.  The style specifies an attribute of landslide code and the layer is some layername

The problem seems to be the whitespace in the attribute name.
I tried to use the xml coding for whitespace , no success.
I also tried to encapsulate the attribute name in square brackets [], which is the standard for sql server. Also no success.

How can I use attribute names with whitespaces in their names?
SQL server allows this!


texts: How do I find least cost path over a DEM based on slope magnitude and direction?

texts:
What sort of algorithms can I use to find a least cost path through a DEM where it costs more to traverse a cell going downhill or uphill than it does to follow the contour of the land?

All the examples I've seen involve creating a least cost surface where the magnitude of the slope is part of the cost - but the direction isn't.

Additionally, the examples assume the cost to travel through a cell does not depend on the direction of travel.


texts: Getting 404 error when making WMS call on GeoServer

texts:
I am trying to make a WMS call to GeoServer with parameters to get a specific layer. However, when my application makes a WMS call to GeoServer, I am getting a 404 error in the console and the network calls..
In the logs for Tomcat, every time I try to make a WMS call, the following error pops up: 02 Sep 15:40:05 WARN [servlet.PageNotFound] - No mapping for GET /geoserver/workspace/wms
Not sure why I am getting this error.
Example of my WMS call:
Request URL: http://<domain>:<port>/geoserver/<workspace>/wms?service=WMS&request=GetMap&layers=<workspace><layername>&styles=&format=image%2Fpng8&transparent=true&version=1.1.0&icon=symbol&tiled=true&height=512&width=512&srs=EPSG%3A3857&bbox=-10018754.171394622,0,-7514065.628545968,2504688.542848655


texts:
I need export a shapefile to DWG using Java.
I have seen many examples of how to export a DWG file to PDF, but I have not found any that directly export from shapefile to DWG .
Is it possible to do this with GeoTools? If not possible, is there another way to do it?


texts: How to fix incorrect SRID of the geometry column?

texts:
I've been told to use AddGeometryColumn to properly add a column with correct/preferred SRID. however I wonder if it's possible to fix/change the current column instead of adding a new?
If there's no other way but to use this function should I remove the previous column?

Thanks a ton.


texts: how to obtain a shapefile of 2D FOV from EXIF?

texts:
I allow myself to contact you about a topic for which I saw you writte an answer on this discussion :

How can i use field of view in ArcGIS?

So maybe you will be able to help me.

I have a serie of landscape photos that I would like to locate on a map with a simple 2D field o view.

I found the perfect functionality on geosetter :

But what I would like to do is to export this shape in any format that gis (such as arcgis) could read... Geosetter is able to export in KMZ for google earth (so it would be possible from KMZ to get a shape), but, unfortunaltely, it only export the location point of the photo and not the shape of the FOV... Would you have any idea to 1) export the geosetter shape or 2) create such a shape directly on arc GIS... ?

I dont know if I am very clear, because my english is not realy fluent... but I hope you will be able to understand something and maybe help me answer this question ...


texts:
I am trying to create a function that takes in a shapefile and a binary (1's and 0's) raster, with the same extent, and extracts the values from the raster. Once this occurs I desire to sum up those values and get a percentage of pixels within those boundaries that are 1. Then rasterize these percentages. Here is what I have so far. It is working just fine BUT IS EXTREMELY SLOW!

Density2 <- function(rstr,shp,... ){

UrbanBuildup <- extract(rstr,shp)

summed.values <- lapply(UrbanBuildup, FUN = sum)
#sum the values in    each respective bndry
number.values <- lapply(UrbanBuildup, FUN = length)

vector.of.summed.values <- matrix(summed.values,nrow=length(summed.values),ncol=1)
vector.of.number.values <- matrix(number.values,nrow=length(number.values),ncol=1)

vector.of.summed.values <- unlist(vector.of.summed.values)
vector.of.number.values <- unlist(vector.of.number.values)

sumUrbanBuildup <- vector.of.summed.values
sumUrbanBuildup[which(is.na(sumUrbanBuildup))] <- 0
numPixels <- vector.of.number.values

shp$den2 <- sumUrbanBuildup/numPixels
shp$den2[which(is.infinite(shp$den2))] <- 0
shp$den2[which(is.na(shp$den2))] <- 0

ext <- extent(shp)
r <- raster(ext, res=300)
r <- rasterize(shp, r, field='den2')
return(r)
}

I read elsewhere it is faster to rasterize() the polygon first and use getValues() but I do not know how to apply this to my situation.

The project is for urban build-up/density using remote sensing data, hence the names.