texts: QGIS/GDALDEM SLOPE Output Has Contoured Or Terraced Texture

texts:
I have been trying to greatly reduce or eliminate the contour-like texture that appears in my output from gdaldem slope.  The image, below, demonstrates this textural effect.

The texture of the slope values appears to follow the contours, making a terraced effect.  I am curious, does this output reflect a reasonable calculation of slope (e.g. reasonable isoclines)? Or are these patterns an artifact?

Is it possible that I will not be able to eliminate this effect because this texture is present in the original DEM (image, below)?

I have tried a number of suggestions for reducing patterns in the slope values, for instance:

warping (reprojecting) the DEM so that the vertical units match the horizontal units (as suggested in Slope analysis from NED data gives crazy histogram?)
warping (reprojecting) the DEM, as above, but using different resampling methods (as suggested in What is the source of horizontal and vertical striping in USGS DEMs?)
using various "ratio of vertical units to horizontal" values in gdaldem slope (e.g. 111120 or 370400, as suggested in Getting incorrect slope values from an ASTER DEM in QGIS?)

Also, I have seen this texture in many other slope rasters, see for example:

aldo_tapia's Slope results in Hillshade shows grid texture artifacts)
This link to a blog about Curvature

Any ideas on what causes this?


texts: Creating road/streets and adding numbering on street in relation to the plots. ArcGIS

texts:
I am trying to connect through a geodatabase all the streets with their numbers and the houses. So far I created a feature class for streets, one for points and one for polygons which both represent the plots.

But I can't find a way to add in the data base the numbering of each street on both sides, left and right.

My final goal on this report is for example when there is damage on the water network underneath the road on a specific point it will return the exact address of this point.

Do you have any suggestions on how to do this?


texts: Can get PyQGIS 3 map to display in PyQt5 standalone app or menus, but not both

texts:
I can run a standalone app but no map shows up, but different from a similar question last year.  The code posted last year works for me after editing QGISHOME to Win 10 system (r'c:\OSGeo4W64\apps\qgis') and path to my data. Similarly I adapted the code for standalone programs from the latest PyQGIS Programmer's Guide and my data shows up fine.  Neither of these examples deal with bringing in a main window from Qt5, leaving me to believe there is a disconnect between Qt5 and PyQGIS that I am unable to bridge.

I built a main window using Qt Designer (Qt5) by following the (Qt4) instructions in geospatialdesktop.com/2009/02/creating_a_standalone_gis_application_1/ tutorial, then added some drop down menus I will attach functions to later.

I edited the tutorial's example code ShapeViewer.py (Qt4, Python 2.x, PyQGIS 2 API) to point to my data and QGIS install.  I had to update code to PyQt5, Python 3.x, PyQGIS3 expectations.

For a couple of days my application would load with all menus dropping down fine, but no content in canvas area.  Then it failed on an unusual error message:  "TypeError: setupGui() takes 1 positional argument but 2 were given."  The code (after imports) that creates this error is:

gpkgpath = r'c:\tmp\DVD_surveying\NM\geopackages\nm_survey.gpkg'
class geoGcdb(QMainWindow, Ui_MainWindow):

  def __init__(self):
    QMainWindow.__init__(self)

    self.setupGui(self)
    self.project = QgsProject()

    # Set the title for the app
    self.setWindowTitle("Survey Measurement Exploration and Integration Tools")

    self.add_ogr_layer(gpkgpath+'|layername=filedataset')

  def setupGui(self ):
    frame = QFrame(self)
    self.setCentralWidget(frame)
    #self.grid_layout = QGridLayout(frame)
    self.box_layout = QVBoxLayout(frame)

    self.map_canvas = QgsMapCanvas()
    #self.grid_layout.addWidget(self.map_canvas)
    self.box_layout.addWidget(self.map_canvas)

  def add_ogr_layer(self, path):
    fdslayer = QgsVectorLayer(gpkgpath+'|layername=filedataset', 'file data set', 'ogr')
    if not fdslayer.isValid() :
      print('fdslayer NOT valid!!!')
      exit()
    self.project.addMapLayer(fdslayer)
    self.map_canvas.setExtent(fdslayer.extent())
    self.map_canvas.setLayers([fdslayer])
    self.map_canvas.show()

def main(argv):
  # create Qt application
  app = QApplication(argv)

  # Initialize qgis libraries
  QgsApplication.setPrefixPath(qgis_prefix, True)
  QgsApplication.initQgis()

  # create main window
  wnd = geoGcdb()
  # Move the app window to upper left
  wnd.move(100,100)
  wnd.show()
  # run!
  retval = app.exec_()

  # exit
  wnd = None
  QgsApplication.exitQgis()
  exit(retval)

if __name__ == "__main__":
  main(sys.argv)

In desperation I changed "setupGUI(self)" with "setupGUI(self, path)" and an interesting thing happened.  The window appeared with a populated map canvas but no menu items.  I am thrashing here trying to juggle two paradigms and obviously not that fluent in object behavior.  It would help greatly if I had an updated version of ShapeViewer.py and/or an explanation of why my code behaves unkindly.


texts: Georeferencing single drone image from metadata (gimbal angles, flight angles)

texts:
My question is in regards to the answer given to Georeference single drone image from EXIF data.
The answer describes how to georeference a single drone (DJI) image using EXIF data but, in the solution they present, why do they use the Gimbal angle for Pitch but the Flight Angle for Yaw i.e. what is the difference between Gimbal and Flight angles? From what I gather, the flight angle is in the world coordinate system and the gimbal angle is in a coordinate relative to body of the drone. With that said, the documentation is very confusing and forum discussions I have saw on this topic often have conflicting information.
Ultimately, I need to solve for the absolute orientation of the CAMERA. In other words, where is the camera pointing in the world frame. To do so, I need to know the specific flight and gimbal coordinate system which Is unclear.
Here is some preliminary work I have done to try to figure out what Flight vs Gimbal Angle is in DJI drones. I have extracted an image from google earth so I am able to verify the yaw orientation of the drone (left pictures). I indicate the north direction with a red arrow. The pictures on the right are the image of the corresponding location from the images shot with a drone. (They are usually a sub-component of the image to the left). In any event, with this information, I am trying to make sense of the flight and gimbal angles, specifically the yaw.

(Top Image DJI Phantom 4 and DJI Mavic Mini Bottom Image)
As you can see in the top image, the flight and yaw angles are equivalent. However, it makes no sense to me because the gimbal angle should relative to the body of the drone but this is not the case because both gimbal and flight angles are nearly 180 degrees but the camera heading in the drone image is south instead of north.
In the bottom example, the angles make more sense according to my understanding but the first example makes me think I have it all wrong.
Any help would be much appreciated!


texts: Create point in the origin of a CRS using PROJ.4

texts:
I know we can use ST_TRANSFORM to transform a geometry into a different spatial reference system, which can be defined as a PROJ.4 string such as: +proj=gnom +ellps=WGS84 +lat_0=52 +lon_0=0 +no_defs. In my case I have a list of PROJ.4 strings with different origins but I don't have the actual ST_POINT of those origins and I would like to create a geometry based on that.
Is it possible to make a point on the origin of this projection, which would be equivalent to ST_GeomFromText('POINT(0 52)',4326)?
I tried select st_transform(st_makepoint(0,0), '+proj=gnom +ellps=WGS84 +lat_0=52 +lon_0=0 +no_defs') but it doesn't work. I was looking for something like this.


texts:
I would like to filter on a date value (show only attributes with a date later than 1-1-2000 for example).
The field is of QDate type.
But doing so I get the message: "Type mismatch or improper type of arguments to > operator".
Anyone know how to filter on date?


texts: SQL-based query to project from 4326 to 3857?

texts: While most SQL databases have in-built projection tools (usually st_transform), BigQuery does not. I'm looking for a SQL query that takes decimal degrees in 4326 and projects them into the meter-based 3857. I have searched SO and the internet, and similar questions usually pertain to people having issues using toolkits like GDAL, rather than the pure expression itself, which is what I'm looking for. Can anyone share one?


texts: Specifying pyproj lat and lon in radians

texts:
I'm using pyproj to do some conversions:

import pyproj
myprojection=pyproj.Proj('+proj=gnom +lat_0=1 +lon_0=1  +R=1.')
print myprojection(30,30)

Out:
(0.5480783303637778, 0.6353400942474053)

Now I know it's possible to give  myprojection values in radians with:

myprojection(0.52359877559829882,0.52359877559829882,radians=True)

Is it possible to do the same when declaring the projection with pyproj.Proji.e. can I specify the lat_0 and lon_0 in radians?

I could not find good documentation on how to write those projection declaration strings.


texts: What happened in using L.CRS.EPSG4326 or not in leaflet？

texts:
Not Use L.CRS.EPSG4326::

map = new L.Map('map', {
    center: [21.43078,51.12748],
    zoom: 13
});

Use L.CRS.EPSG4326:

map = new L.Map('map', {
    center: [21.43078,51.12748],
    zoom: 13,
    crs: L.CRS.EPSG4326
});

The default epsg is what? (is EPSG:3857?), But Both I will input latlng, not xy meter, I think only Mercator-Projection(or other-projection) can be show in map. What happened in the process? And why will get different x,y index tile?


texts: OpenLayers tutorial: map doesn't show up

texts:
I'm following an OpenLayers tutorial and already there is something wrong after trying to represent a simple map.

I will show you the code I copied from the tutorial and when opening my HTML file with Firefox, it should show me a OSM map. However it doesn't do anything. I have tried to write "Test" into my html, and that worked, thus I guess the problem lies somewhere else.

That's the HTML code:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name = "viewport" content = "width=device-width, initial-scale=1.0">
    <title>Title</title>
    <link rel="stylesheet" href="./lib/OpenLayers/ol.css">
    <link rel="stylesheet" href="./style.css">
</head>
<body>
    <div id="js-map" class="map"> </div>
    <script src='./lib/OpenLayers/ol.js'> </script>
    <script src='./Main.js'> </script>
</body>
</html>

That's the js code:

    window.onload = init;

    function init(){
        const map = new ol.Map({
        view: new ol.View({
            center: [8.25, 49.97],
            zoom: 11.1,
            maxZoom: 15,
            minZoom: 5
        }),
        layers: [
            new ol.layer.Tile({
                source: new ol.source.OSM()
            })
        ],
        target: 'js-map'
    })
}

I guess, there is a typo somewhere but I just can't see it.

Another possible problem is that I'm using Ubuntu. Perhaps it has something to do with that?

Here is also a screenshot from the project folder:


texts:
I am trying to label a field using two fields. Example: "[FieldOne] / [FieldTwo]". But I don't want to show FieldOne if the value is zero. Example: 0 / 1050 should read just 1050 whereas 1/1050 should read as 1/1050.

How do I leave out the zero values from the label?

I have tried a SQL query on the label - example: "Portion <> 0" but that just leaves out the label entirely, not just just the zero from field one.


texts:
I use Mapbox GL JS for visualization massive dataset. And now I try to create several checkboxes for filtering some features of a tileset by its value. Dataset was uploaded to Mapbox through Mapbox Studio.

For example, there is field SortOfFruit. I would make checkboxes for Orange, Apples, Mangoes, etc. When checkbox Orange checked then oranges appear on map. How to do it?

I tried to use Mapbox example, there was solved similar task, but I can't adapting it to my purpose. There use a modest feature collection instead of the massive tileset.

Is there any example of code for showing features by given values?


texts: How to calculate mean of raster layers where some layers have missing values (R or QGIS)?

texts:
I am trying to create annual averages of some raster layers, but some of these layers have gaps in the data. If all pixels in all of the layers contained info I would just use Raster Calculator and do (r1 + r2 + r3 +...)/n. However, the number of layers including useful information for each pixel isn't the same across the rasters so I am not sure how to proceed.
I am very new to spatial analysis and working with rasters, and any guidance on how to solve this problem would be appreciated! Happy for solutions that work in QGIS or R.


texts: Is it possible to create a standalone python script to export "layout" to pdf?

texts:
I have a python script that successfully runs from ArcMap 10.2. I was wondering if it would be possible to rewrite it so that it is a standalone script that prompts the user for the shapefile and then runs some analyses (e.g. buffer, tabulate intersection, intersect, etc.),  changes layer's symbology properties using a preexisting lyr file, zooms to its extent, turns on and off other layers in the mxd TOC template depending on a specific conditions, changes the map title, and finally exports resulting map as a pdf.

The script is quite extensive and although much of the coding can be run as a standalone script, I am wondering if the section of the script dealing with manipulating the layout properties (legend, title) and the layers in the TOC as I want them to look so that I may create a map for exporting as a pdf can be done as a standalone script. It seems to me that some of these actions may only be possible inside an ArcMap session.


texts: Interpolating bathymetric data to make a volume estimate

texts:
I have 3 m resolution bathymetric data of a lake that I want to use to make a volume estimate of a landslide deposit that is on the lake floor. Basically, I want to interpolate the bathy data to make a "pre landslide lake floor" surface in order to get a volume estimate of the deposit.

Here's my thinking:

Draw a polygon slightly larger than the landslide.
Feature vertices to points.
Extract values to points of the bathy data
Interpolate the bathy values of the points using kriging
Extract by mask the interpolated bathy raster to the polygon shape
Extract by mask the bathy raster to the polygon shape
Raster calculator: bathy raster - interpolated bathy raster
Raster calculator: subtracted raster from step 7 * cell resolution
Zonal Statistics table to calculate sum which equals volume.

Does my method seem logical?

Also, my 3 m resolution bathy data is such that the high value (max) is 176 m and the low value (min) is 1.5 m. Should I invert the bathy data?


texts: maxScale or minScale don't work in vector (from WFS) layer

texts:
var options =
    {
        projection: "EPSG:900913",
        displayProjection: "EPSG:4326",
        units: 'm'
    };
    map = new OpenLayers.Map('map', options);

ilceSinir = new OpenLayers.Layer.Vector("İlçe Sınırı",
    {
        minScale: 150000,
        strategies: [new OpenLayers.Strategy.Fixed()],
        projection: new OpenLayers.Projection("EPSG:4326"),
        protocol: new OpenLayers.Protocol.WFS(
        {
            version: "1.1.0",
            url: "http://localhost:8080/geoserver/wfs",
            featurePrefix: 'topp',
            featureType: "g_ilce_siniri",
            featureNS: "http://www.openplans.org/topp",
            geometryName: "bounds"
        })
    });

Scale isn't working, layer is visible at every zoom.


texts:
I have secured map services with AGS. I also have the proxy.config, proxy.ashx, and web.config in my application. My map layers display OK using the proxy. When I try to display my legend using the proxy map layers, a login dialog show up and the legend does not display. If I enter my user and password the legend displays. When I use unsecured services from an AGS server the legend displays fine.

Has anyone experienced this?

this is my proxy code:

esriConfig.defaults.io.proxyUrl = 'proxy/proxy.ashx';
esriConfig.defaults.io.alwaysUseProxy = false;

this i my toc.js for create legend:

    _getLegendIconUrl: function(legend)
   {
  var src = legend.url;
  // in some cases NULL value may cause #legend != #of renderer entry.
  if (src != null && src.indexOf('data') == -1)
   {
    if ((!has('Microsoft Internet Explorer') || has('Microsoft Internet Explorer') >= 9) && legend.imageData && legend.imageData.length > 0)
    {
      src = "data:image/png;base64," + legend.imageData;
    } else {
      if (src.indexOf('http') !== 0)
      {

        // resolve relative url
        src = 'http://localhost/proxy.ashx?'+ this.rootLayer.url + '/' + this.serviceLayer.id + '/images/' + src;

      }
      if (this.rootLayer.credential && this.rootLayer.credential.token ){
        src = src + "?token=" + this.rootLayer.credential.token;
      } else if (esriConfig.defaults.io.alwaysUseProxy){
        src = esriConfig.defaults.io.proxyUrl+ "?"+src;

      }
    }
  }
  return src;
},

when i comment this function, the login dialog box not appear, and legend not appear

   map.on('layers-add-result', tocRun);
   function tocRun(evt)
   {
     toc_demarcationLayer = new TOC({
        map: map,
        layerInfos: [{
            layer: demarcationLayer,
            title: "Sempadan Pentadbiran",
            collapsed: true
        }]
    }, 'legendDiv1');

    toc_demarcationLayer.startup();
    console.log("start toc demarcationLayer");

    toc_demarcationLayer.on('load', function(){
        if (console)
            console.log('TOC demarcationLayer loaded');
    });

    toc_demarcationLayer.on('toc-node-checked', function(evt){
        if (console) {
            console.log("TOCNodeChecked, rootLayer:"
            +(evt.rootLayer?evt.rootLayer.id:'NULL')
            +", serviceLayer:"+(evt.serviceLayer?evt.serviceLayer.id:'NULL')
            + " Checked:"+evt.checked);
            if (evt.checked && evt.rootLayer && evt.serviceLayer){
                // evt.rootLayer.setVisibleLayers([evt.serviceLayer.id])
            }
        }
    });


texts: What is the average google maps geocoder response time?

texts: What is the average Geocoder response time (i.e. from the time you make the request till the time you get the response back)?


texts:
Google earth comes with a variety of borders, for example:
International Borders
1st Level Admin Borders
2nd Level Admin Regions

I was wondering if it is possible to render these borders on Google maps, in the same way we can render kml files.

Does anyone know where this information is stored?  Is it at Google's end, or having installed Google earth, is it at my end?  Are they just KML files?

Thanks


texts: How to select by location with multiple source layers?

texts:
I would like to script the selection of the square that contains both the orange and green points, but not the squares with any other combination of points including white points. I am very familiar with python, but I do not know if the process of selecting a target feature with two sources layers is even possible. I cannot seem to figure out the process even within ArcMap's GUI. This seems like it should be easy. Any ideas?

Pseudo code: If square contains both orange and green points but only those points > select


texts: QGIS taking too long to load/launch on Windows 10

texts: I had a version installed, I think it was 3.4.10, and used it couple months back it worked great. I tried opening it yesterday and it took forever. I uninstalled it and installed the latest version 3.4.15 and that is also taking forever. I can't use it all. I uninstalled and reinstalled and still super slow. I see this is big problem but can't find a fix. Im on Win10 Pro.


texts: How to build OpenSeaMap/renderer on ubuntu 14.04?

texts:
I have set up a tile server on ubuntu 14.04, downloaded the openstreetmap-carto style and compliled it with carto. Then I customized the renderd.conf file like this:

[renderd]
socketname=/var/run/renderd/renderd.sock
num_threads=4
tile_dir=/var/lib/mod_tile
stats_file=/var/run/renderd.stats

[mapnik]
plugins_dir=/usr/local/lib/mapnik/input
font_dir=/usr/share/fonts/truetype/ttf-dejavu
font_dir_recurse=1

[default]
URI=/osm_tiles/
TILEDIR=/var/lib/mod_tile
XML=/usr/local/share/maps/style/....../osmcarto.xml
HOST=localhost
TILESIZE=256

Now apache together with the mod_tile module deliver tiles to the client.

I have found in git a renderer (used from openseamap) for the elements with seamark tags which is written in java and has no installation instructions.

I have only figured out that in order to build searender on ubuntu as a first step I have to run the command "make -f Makefile.linux".

Does anyone know what else must be done in order to build and run searender successfully on ubuntu 14.04?

I also know that jsearch and jtile need to be build with Apache ant and moved or linked to the jar files in work/.

How may I accomplish this?

Is it possible to have both renderers(the one that I have already and the openseamap/renderer) running on the same machine and produce two different tile sets(/osm_tiles/{z}/{x}/{y}.png which I already have  and tiles produced from openseamap/renderer which will be used as an overlay in my map)?


texts: Using multiple wildcards within iterator of ArcGIS ModelBuilder?

texts:
I would like to know if it is possible to use multiple wildcards to select specific shapefiles when using the Iterate Feature Classes tool in ArcGIS ModelBuilder.

I use this to select all shapes beginning with T but wonder how I would ask the iterator to select shapes beginning with R,S & T, for example.


texts: How to save a raster and vector into a single PNG file in GRASS?

texts: I am trying to save a raster and vector into a PNG file. The vector is overlayed on top of the raster map. I was only able to save the raster file into a png using r.out.png but without the vector.


texts:
In the city where I live, the main street is depicted on maps as running exactly north/south, and its main cross street is depicted as running exactly east/west. However, in reality, the north/south street runs on a different angle, as does the east/west cross street. I'm assuming on our city touristy and transit maps this is done to make it them easier to understand, whereas on the detailed road maps "true" angles are depicted. (A similar principle, Gis software in my vehicle allows me to set it so that whatever direction I'm driving in is straight up (and down) on the 2d map, or I can set it so that it shows me driving at whatever angle is the road's true gis coordinates)

My question is, is there a name for the type of map, or the principle behind creating those types of map, that depict the main streets as running exactly north/south east/west (as the case may be), or conversely, is there a name for the maps that depict "true" angles of the streets?  (please include information about how cartographers describe the differences between these two types of map).

(note, I've seen several websites that list 5 or 6 principles of map making but none of them refer to this concept/idea explicitly, although I assume it falls under the general principle of Legibility, which is one of the 5 key principles of map making)


texts: Leaflet marker cluster by Administrative boundary

texts:
Is it possible to perform clustering based on administrative boundary using the leaflet.markercluster plugin? How would I do that?

I already have the boundary layer.


texts:
I have the following script for render an OpenLayer3 map into a div in my web
The map is showed on the web when de user click on a button.

function traza_mapa() {
    function clearTheDiv()
    {
        document.getElementById("map").innerHTML = "";
    };
    clearTheDiv();

    var myVista = new ol.View({
           center: ol.proj.fromLonLat([-30,50],'EPSG:3857', 'EPSG:4326'),
           zoom: 4,
        });

        var map = new ol.Map({
          target: 'map',
          layers: [
            new ol.layer.Tile({
              source: new ol.source.OSM()
              }),
          ],
          view: myVista,
          controls: new ol.control.defaults({
            zoom: true,
            attribution: false,
          })
        });
        map.addControl(new ol.control.ZoomSlider());
};

I would like to show a track as a layer. The vertex positions are obtained from a array [[lon1,lat1],[lon2, lat2]]..................]

How can I include the array as as layer into the map ?


texts: ERROR 000824: The tool is not licensed from arcpy.gp.ExtractByMask_sa()?

texts:
I know I have spatial analyst licensed and the tool works fine within ArcMap but when I try to run this code snippet:

import arcpy

arcpy.CheckExtension('Spatial')  # which returns 'Available'

arcpy.gp.ExtractByMask_sa("D:/Sheyenne/Atmospherically Corrected Landsat/Just_bands/LT50300281984137PAC00_sr_band3.tif", "D:/Sheyenne/sheyenne_area_poly.shp", "D:/Sheyenne/Atmospherically Corrected Landsat/Practice_band_clipLT50300281984137PAC00_sr_band3.tif")

the error returned is:

ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000824: The tool is not licensed.
Failed to execute (ExtractByMask)

Has anyone encountered this before?


texts: QGIS Python console will not recognize any QGIS methods or properties

texts:
I just installed QGIS 3.6, and while the basic Python functions work, I cannot get the most basic GIS related functions working. Every attempt results in the "'builtin_function_or_method' object has no attribute" message. Here is one example:

    print(qgis.utils.iface.activeLayer.name)
Traceback (most recent call last):
  File "C:\OSGEO4~1\apps\Python37\lib\code.py", line 90, in runcode
    exec(code, self.locals)
  File "<input>", line 1, in <module>
AttributeError: 'builtin_function_or_method' object has no attribute 'name'

What could be going wrong here?


texts: Exporting Data from Layer Export introducing slivers in coincident data

texts:
I am seeing odd behaviour in Arcmap 10.6 where I select a layer and export its data and then choose to import the exported data and when it comes in I see slivers in areas which are coincident in the source data.

Coordinate system is the same as source when exported.  Below are images of the resulting output data and the original source data zoomed to the same scale.  Seems to happen on curved borders.

[

How can I keep from introducing slivers into the data when I export the layer?


texts: I am working on a hydrant renumbering project. We have over 1,500 hydrants and the land base is filled up sporadically as new subdivisions are built. However this cause our numbers to be all over the place. We service a number of towns within the county. We have decided that since we are still small enough we will be able to renumber the hydrants by town. So we would start with a letter in front of the hydrant number corresponding to the town the hydrant is in and starting from 1 and numbering up. I clipped out the hydrants based on town but was wondering if anyone had any suggestions on the best tools to use in ArcGIS 10.5 to complete the process. I would like the hydrants to be numbered somewhat uniformly geographically.


texts: How can I create drawFeature control in leaflet?

texts:
I want to call a callback on leaflet after drawing a feature.
In openlayers I do it like this :

customControl= new OpenLayers.Control.DrawFeature(
                    tempLayer,
                    OpenLayers.Handler.Point,
                    {
                        title: 'Custom Control',
                        displayClass: "olControlClass",
                        featureAdded: onCustomControlCallback
                    });

How can I do the same in leaflet ?


texts: How to enable/disable snapping functionality with PyQGIS?

texts:
Goal: The snapping functionality should be enabled and disabled.

I use the function setSnapSettingsForLayer. Convenience function to set snap settings per layer.
Short Example:

QgsProject.instance().setSnapSettingsForLayer(layer.id(), True, 2, 1, 10, True)

This approach has already been explained in another post: How to enable the snapping for a layer with the tolerance value with python programming

Up to this point everything works. Now we come to the problem. How can I disable the snapping functionality?

If I set the second parameter in the function setSnapSettingsForLayer to False (to enable the layer snapping), then nothing happens. The Snapping remains activated. Even if I change an another parameter e.g. tolerance, also does not change.

So, how can the Snapping be enabled and disabled while editing?

UPDATE:

Despite my answer, the problem is not yet solved. By choosing Settings -> Snapping options you will find the following window

Only when I confirm this window with the 'OK' button, the code in my answer works. Only now the Snapping can be turned off and on during processing. Has anyone any idea?


texts:
I am trying to use AWS lambda to process some files stored in an S3 bucket using GDAL.

I have used information in the previous question enter link description here to test that I can read the file using /vsis3/

The difficulty has been to get GDAL working in AWS Lambda which is a Linux RHEL, which meant I have had to build from source.

I used the following config for that
    ./configure --disabled-shared --enable-static

Which gave me the executables that I can include in my code zip to upload to Lambda.

I have tested the GDAL executable using a local file within my code zip and that works, eg gdalinfo image.tif

However, trying to use

gdalinfo --config AWS_REGION "region" --config AWS_ACCESS_KEY_ID "KEY" --config AWS_SECRET_ACCESS_KEY "SECRET"/vsis3/bucket/key

causes an error message of

Unable to open datasource `/vsis3/bucket/key' with the following drivers.

Does anyone know a solution?

My fear is that /vsis3/ requires something that I am not using in the build process

EDITS

I managed to change my GDAL build to include curl (--with-curl) and have successfully used that from lambda to the S3 file using

gdalinfo "/vsicurl/image.tif"

But the vsis3 still fails


texts: Logic behind Google querying based on POI

texts: I am Currently Working in Geocoding process based on google API service.Today my superior asked a question how does Google exactly query a POI(Place Of Interest) if it is latitude and Longitude is passed.Can anyone help me in answering this?


texts: Using script tool input as variable in Python script tool?

texts:
I have made three different script tools to run in a module that is going to clean multiple sets of data as I get them.

import arcpy
fc = "C:\Users\CartoFront\Desktop\Chicago Update\Chicago Update.gdb\ChiMetroJoin12012016practice"
arcpy.AlterField_management(fc, "SitusStdHouseNbr", "sthsnum", "sthsnum")
arcpy.AlterField_management(fc, "SitusStdDirectionLeft", "stdir", "stdir")
arcpy.AlterField_management(fc, "SitusStdStreet", "ststname", "ststname")
arcpy.AlterField_management(fc, "SitusStdMode", "stsuffix", "stsuffix")
arcpy.AlterField_management(fc, "SitusStdUnitType", "stunitprfx", "stunitprfx")
arcpy.AlterField_management(fc, "SitusStdUnitNbr", "stunitnum", "stunitnum")

I have previously just been editing the fc every time I run the script for the necessary input. However, I find this very counter-intuitive because I enter the same file input into my script tool every time I run it.
Is there any way that I am able to set my inital fc variable to the input that I am entering into my script tool?


texts: Aligning Multiple Polygons (Based on centroid possibly) [Spatstat, sf, sp]

texts:
I'm trying to create a composite/average of multiple similarly shaped polygons. I think the first step is most likely to align them via the centroid of each polygon.

Does anybody know of a tool to align polygons in R? I am using spatstat mainly, but can convert the polygons to sp and sf classes.

Here's an example of what I have so far:

test.verts <- list()
test.verts$x <- c(518, 594, 421, 286, 104, 129, 315)
test.verts$y <- c(273, 608, 1202, 1201, 620, 285, 135)

test.verts2 <- list()
test.verts2$x <- c(900, 922, 693, 471, 207, 305, 628)
test.verts2$y <- c(459, 777, 1265, 1267, 615, 325, 135)

test.verts3 <- list()
test.verts3$x <- c(910, 980, 687, 476, 223, 389, 664)
test.verts3$y <- c(343, 863, 1339, 1340, 594, 185, 65)

test.owin <- spatstat::owin(poly = test.verts)
test.owin2 <- spatstat::owin(poly = test.verts2)
test.owin3 <- spatstat::owin(poly = test.verts3)

plot(test.owin)
plot(test.owin2, add = TRUE)
plot(test.owin3, add = TRUE)

The figure cuts of some parts of the polygons due to size. The polygons are roughly the same shape, but vary somewhat in size.


texts: Query OSM for all beaches facing west? - QGIS preferred

texts:
I want to identify all beaches on this planet (or a given subset of it) that are facing westwards (+/- 20-30 degrees).

My idea is to use OSM as the data source. Extracting all polygons that have the tag "natural=beach" gives me a dataset / shapefile of all areas that are flagged as beaches. So far so good.

I also know that I can use coastline data (either from OSM or Natural Earth for example) to identify the facing of the beaches.

Buffering the beach shapes to correct for minor mismatches and intersecting these with the coastline should provide me with data on which side of the shape is facing towards the water. Using the max/min values of all intersecting points should give me an idea of the bearing. (90 degrees +/- 20-30 degrees would be fine...)

And that's where I am lost...

My preferred tool would be QGIS, but PostGIS would be OK as well.

Is there anyone around with a clever idea how to solve this puzzle?


texts: Raster resolution stuck at 96dpi in ArcGIS Pro

texts:
I am using ArcGIS Pro 2.5.

I have a high resolution raster I've downloaded from a state run imagery site, sid format.  I'm trying to export it to a pdf using the native resolution.  The dpi is seems to be locked at 96dpi, see capture below.  The resulting pdf is not nearly as high resolution as the actual raster, I can put it side by side with the map view and clearly see the quality difference.

I understand the ESRI basemaps lock themselves at 96dpi, but this is just an unrestricted 3rd party raster.  In ArcMap for this imagery source all I had to do to get the best resolution is set the dpi to 350.

Why can't I do that with ArcGIS Pro?


texts:
My current assignment required to do research and produce world territorial units for statistics.

In Europe it was easy thanks to Eurostat. Even non-commercial GIS data is available here. Now outside Europe I am completely lost. I know there are some regional organizations that exist. What I don't know is how they organize their territorial units for the member countries.

Any ideas?


texts: Determining communities with single point of entry using ArcGIS Network Analyst?

texts:
I am attempting to determine the communities in a province that would have a single point of entry that could isolate the community if this road/bridge were closed (due to a weather event, for example).

Has anyone tackled a project like this before?

I feel it could be done within the Esri environment using Network Analyst, but I haven't figured it out yet.


texts: Google API Geocoding in MS Excel for free

texts:
I am seeking a solution enabling me to do address geocoding in Excel using the Google Maps Geocode API.
Basically, the task is possible via Google Sheets, like has been discussed at
How to Geocode a Google SpreadSheet?
and explained in details here:
http://www.mkrgeo-blog.com/the-costless-way-to-geocoding-addresses-in-excel/
The Google Sheets have a good plugin - Awesome Table, which can do it for you up to 1000 records daily.
The major awkward thing is, that it works somewhat on an external platform, which the Google Spreadsheet is and anytime requires the transfer to our Excel worksheet.
I would like to have I straight in Excel.
Unfortunately, due to Google Maps policy, the geocoding API is not free anymore (even for the small amount of queries).
The policy changed in the summer 2018, however I spot something in the web, that might be helpful to get around this problem, even without the VBA macros involvment.
According to the thread below:
https://www.reddit.com/r/excel/comments/a2r3aq/converting_addresses_to_lat_and_long/eb0mkys/
this issue can be solved up to 2500 records per day, when we:

create our API key

restrict it to Geocode API option

Paste into our Excel formula, which looks as follows:
=WEBSERVICE("https://maps.googleapis.com/maps/api/directions/xml?key=PUTYOUROWNAPIKEYHERE&origin="&SUBSTITUTE(A1," ","%20")&"&destination="&SUBSTITUTE(A2," ","%20"))

Translating it into my example (with my own Geocode API key) it looks as follows:
  =WEBSERVICE("https://maps.googleapis.com/maps/api/directions/xml?key=AIzaSyCiAhXX59p2G2PworpQeu8ADcqIo0s8h8A&origin="&SUBSTITUTE(Z18," ","%20")&"&destination="&SUBSTITUTE(Z19," ","%20"))

Unfortunately, it doesn't work, as I am getting the string like this:

REQUEST_DENIED
<error_message>This API project is not authorized to use this API.</error_message>

I though, that it means, that my newly created API is not enabled. I went here and did it.
It didn't help too. So does it mean, that there is no option for free geocoding in Google?
Can anyone clarify, who encountered this problem or was willing to do some geocoding via Google Maps?


texts: impossible to load the 2019 hansen GLAD alerts in GEE

texts:
I had a functionnal process that was displaying glad alerts. both for 2019 and 2020.
Since yesterday it doesn't work anymore.
I was using the following code :
var all_alerts  = ee.ImageCollection('projects/glad/alert/UpdResult')
var country     = ee.FeatureCollection('USDOS/LSIB_SIMPLE/2017').filter(ee.Filter.eq('country_co', 'SN'));

var alerts_2020 = all_alerts.select('conf20').mosaic().clip(country);
var alertMasked = alerts_2020.mask(alerts_2020.gt(0));
Map.addLayer(alertMasked, {palette:['red']}, 'alert');

it still work for 2020 but if you select the conf2019 band, it will raise the following error :

Tile error: Error in map(ID=08_04_ASIA):
Image.select: Pattern 'conf19' did not match any bands.

I try to verify this problem by running :
var alert_year = all_alerts.select('conf19').first().clip(country); //lucky me it's on Singapore
var alert_masked = alert_year.mask(alert_year.gt(0));
Map.addLayer(alert_masked, {palette:['green']}, 'alert_2019');

And there I can see my alerts. If you reverse conf19 and conf20 in my two proposed codes, you'll get two errors. Does anyone see what's going on ?


texts: QGIS 1.8.0 - Define shapefile as UTM 15 NAD83 Feet

texts:
I have a shapefile which the .prj file says it is

  PROJCS["NAD_1983_UTM_Zone_15N",GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",1640416.666666667],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",-93.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Foot_US",0.3048006096012192]]

QGIS's on the fly reprojecting is not working.  It has worked well enough for me so far but I can't seem to figure out how to change the UTM to feet from meters.


texts: Splitting where lines cross each other using QGIS?

texts:
I have 2 lines and I want to make a split where it is crossing each other/intersection point in Qgis 2.16

I have a good picture to see what I really want to do.


texts: Is there some kind of symbology saved in a GPX track?

texts:
I know there can we can save some kind of symbology for waypoints into the GPX files, but I began doubting about the track symbols. I checked the GPX format specifications but I wanted to make sure.

Can it contain information about symbol width, color or something like that?


texts:
I am working on creating soils map and need to group symbolize into greater numbers and within between numbers..

Here is an example of what I am talking about ...


texts: Determining spatial sort order with ArcPy?

texts:
How do I determine if a varying hypothetical set of lines (example in image) needs to be sorted by X (longitude) rather than Y (latitude) programmatically to ensure they are ordered from 1 to 14 as described by the arrow?

The example set of lines is only an example and can occur in an number of different orientations and permutations.

I will always know which line needs to be 1 for each set of lines, but the rest of the lines need to be ordered in proper sequence.

UPDATE_05_18_2017:
To clarify this post a bit if anyone comes across it in the future.

The problem:

Lines can come into the program in any arrangement;
Due to digitizing when creating these lines the (OBJECTID, OID, FID
whatever) will also get scrambled;
A method was needed to order these lines;
The Sort tool, an SQL "ORDER BY" statement with a da.UpdateCursor, etc.
would sort the records, but since the lines can come in any
orientation, to my knowledge there is no way to achieve an accurate sort.

My work-around was to educate the editors so that while editing they maintained some logical OID order. With an ordered OID field I could then query and loop though the data reliably as desired.

I thought to calculate average bearings, and sort on their basis since lines will follow a defined orientation, but the lines shown in the example are 118.9degrees which would lend them to be sorted by Y:

    if 45 <= avgGbearing <=135 or 225 <= avgGbearing <= 315:

using the .firstPoint(shown), .midPoint or .lastPoint coordinate would not sort the lines 1 to 14 appropriately:

The data is stored in a Microsoft (JET) Access personal geodatabase.
I am using ArcGIS Desktop version 10.1 ArcInfo License.


texts: How to import GDB to PostgreSQL into separate tables?

texts:
I am trying to upload a .gdb data into my postgres database using og2ogr. If I upload whole database by command
ogr2ogr -f "PostgreSQL"   PG:"" "test.gdb"  -nln gdb_test -nlt PROMOTE_TO_MULTI it creates a single table gdb_test,
it imports first layer into that and then gives errors
Warning 1: Geometry to be inserted is of type Multi Line String, whereas the layer geometry type is Multi Polygon. Insertion is likely to fail ERROR 1: COPY statement failed. ERROR:  Geometry type (MultiLineString) does not match column type (MultiPolygon) .
I guess it is because other layers are of different geometry types. Is there a way to upload whole .gdb with multiple layers, each different geometry type to a postgres into separate tables?
ogrinfo on my .gdb is following:
1: Ned (Multi Polygon)
2: Str (Multi Line String)
3: Vod (Multi Line String)
4: Kan (Multi Line String)
5: Red (Multi Line String)
6: Uch (Multi Polygon)

Update: I'll leave the question unanswered, if anyone knows how to upload whole package automatically.


texts:
I want to extract meteorological data of a point which are 3 meteorological stations around it. I found that ArcGis has the capability to do it by interpolation.
My essential data is wind speed , wind direction and cloud cover
which interpolation method or any other method is useful for my case?


texts: QGIS 3.14 vs PostgreSQL 11.5 : same query, different result

texts:
My layer has 82431 points. Each point has an attribute var with a single value a, or b or c,...
I snap points, group by geometry and count the number depending the var attribute.

So I start with :

geom | var
pt      a
pt      b
pt1     a
pt1     a
pt1     b
pt2     c
...

And want :

geom count(a) count(b) count(c)
pt      1       1        0
pt1     2       1        0
pt2     8       0        1
...

In QGIS 3.14, with a shapefile, this query gives through a virtual layer the correct result so to speak 157 rows (1 per geometry) and the columns with count :

select st_snaptogrid(m.geometry, 25) as geom,
count( case when var Like 'a' THEN 1 END),
count( case when var Like 'b' THEN 1 END ),
count( case when var Like 'c' THEN 1 END )
from mytbl m
group by geom

Now, I uploaded the shapefile into PostgreSQL 11.5. The same query (geom instead of geometry though) does NOT group geometries. I have 64967 rows with some weird values in the columns between 0 and 10...
Obviously, I do something wrong but where ?

gid id_fiche var geom
1   "74760" "Lithique"  "POINT(566780.44 6913793.64)"
2   "74763" "Lithique"  "POINT(566780.1 6913793.78)"
3   "74764" "Lithique"  "POINT(566780.2 6913793.46)"
4   "74765" "Céramique" "POINT(566780.43 6913793.45)"
5   "74766" "Céramique" "POINT(566780.11 6913793.41)"
6   "74767" "Lithique"  "POINT(566780.18 6913793.28)"
7   "76359" "Faune" "POINT(566780.22 6913793.79)"
8   "76360" "Lithique"  "POINT(566780.19 6913793.73)"
9   "76361" "Lithique"  "POINT(566780.14 6913793.3)"
10  "74768" "Lithique"  "POINT(566780.13 6913793.09)"
11  "74769" "Lithique"  "POINT(566780.43 6913793.03)"
12  "76362" "Lithique"  "POINT(566780.36 6913793.16)"
13  "76363" "Lithique"  "POINT(566780 6913792.98)"
14  "76364" "Céramique" "POINT(566780.3 6913792.94)"
15  "76365" "Lithique"  "POINT(566780.28 6913792.86)"
16  "76366" "Lithique"  "POINT(566780.37 6913792.73)"
17  "40700" "Céramique" "POINT(566781.51 6913795.88)"
18  "74759" "Lithique"  "POINT(566780.71 6913793.59)"
19  "74761" "Lithique"  "POINT(566780.5 6913794.14)"
20  "74762" "Lithique"  "POINT(566780.2 6913794.17)"
21  "76358" "Céramique" "POINT(566780.21 6913794.14)"
22  "76385" "Céramique" "POINT(566781.64 6913795.66)"
23  "76386" "Céramique" "POINT(566781.84 6913795.43)"
24  "76387" "Faune" "POINT(566781.73 6913795.3)"
25  "76388" "Lithique"  "POINT(566781.7 6913794.22)"
26  "76389" "Lithique"  "POINT(566781.67 6913794.18)"
27  "76390" "Céramique" "POINT(566781.98 6913795.05)"
28  "76391" "Céramique" "POINT(566782.18 6913794.2)"
29  "76393" "Lithique"  "POINT(566781.77 6913794.73)"
30  "76394" "Lithique"  "POINT(566781.84 6913795.78)"
31  "76395" "Lithique"  "POINT(566781.95 6913793.64)"
32  "76397" "Lithique"  "POINT(566782.26 6913793.48)"
33  "76402" "Céramique" "POINT(566781.88 6913793.38)"
34  "108456"    "Lithique"  "POINT(566782.69 6913796.39)"
35  "108457"    "Lithique"  "POINT(566782.74 6913796.6)"
36  "108458"    "Céramique" "POINT(566782.67 6913796.65)"
37  "108459"    "Céramique" "POINT(566782.53 6913796.65)"
38  "42136" "Céramique" "POINT(566780.13 6913789.78)"
39  "74770" "Lithique"  "POINT(566780.49 6913792.82)"
40  "74771" "Lithique"  "POINT(566781.05 6913793.11)"
41  "74772" "Lithique"  "POINT(566780.75 6913792.53)"
42  "74773" "Lithique"  "POINT(566780.41 6913792.2)"
43  "74774" "Lithique"  "POINT(566780.97 6913792.03)"
44  "74775" "Lithique"  "POINT(566781.03 6913791.8)"
45  "74776" "Lithique"  "POINT(566780.62 6913791.63)"
46  "74777" "Céramique" "POINT(566781.04 6913790.59)"
47  "76367" "Lithique"  "POINT(566780.57 6913792.51)"
48  "76368" "Faune" "POINT(566781.11 6913792.42)"
49  "76369" "Lithique"  "POINT(566780.85 6913792.63)"
50  "76370" "Céramique" "POINT(566780.91 6913792.81)"


texts: Drawing LineString to right (horizontal) direction only

texts:
We use Vue.js 2 and OpenLayers 4.6.5. The picture looks as folowing:

The user draws the first line, for example, from the bottom upward and makes a click to finish the first line. Then he draws next and last line and makes the last click to finish it. He can draw the second (last) line in any direction, but I need to allow him to draw in right, horizontal direction only.
How to allow drawing LineString to right (horizontal) direction only? The code looks as following.
Style function:
getCallOutStyle (feature, title, zIndex) {
  if (title) {
    const styles = []
    const geometry = feature.getGeometry()

    geometry.forEachSegment(function (start, end) {
      styles.push(new Style({
        geometry: new LineString([start, end]),
        stroke: new Stroke({ color: 'black', width: 1 }),
        text: new Text({
          text: title.toString(),
          font: '17px "Roboto", Helvetica Neue, Helvetica, Arial, sans-serif',
          textAlign: 'left',
          overflow: true,
          placement: 'line',
          textBaseline: 'bottom',
          stroke: new Stroke({ color: 'black', width: 1 })
        }),
        zIndex
      }))
    })

    if (styles.length >= 2) {
      styles[0].text_.setText('')
      styles.splice(styles.length)
    }

    return styles
  }
},

Drawing:
callOut (callOut) {
  if (!callOut) {
    this.callOutDraw.un('drawend', this.onCallOutDrawEnd)
    this.map.removeInteraction(this.callOutDraw)
    return
  }

  const draw = new Draw({
    source: this.vectorLayer.getSource(),
    type: 'LineString',
    maxPoints: 3
  })
  this.callOutDraw = draw
  this.map.addInteraction(this.callOutDraw)

  draw.on('drawend', this.onCallOutDrawEnd)
},
onCallOutDrawEnd (event) {
  this.callOutFeature = event.feature
},

How to achieve it?


texts: We have an old VB6 app that uses the map, toolbar and toc controls.  On the toolbar, we've added the custom menu so users can add other built-in tools or tools they've created.  One of our customers would like us to build a couple of custom tools for them.  They are using version 10.0 and most users will only have the engine runtime installed.  The walkthroughs that I've seen seem to deal more with ArcGIS Desktop and tools built using ESRI.ArcGIS.Desktop.AddIns won't install on a machine that doesn't have Desktop.  Our customer wants one tool that will query the "Loc_Num" field against a specific set of layers and another that will do an address lookup.  I've spent about 5 days on this and have gone through numerous walkthroughs/code samples and have gotten nowhere.


texts: How to export aerial imagery as layers in layered PDF?

texts: I want to show aerial imagery as layers in my pdf, so people can turn them on and off (e.g historical images). However according to ESRI images become merged when exported as a layered pdf. What is the point of this? The only way around it would be to merge the tif (or ecw in this case) to a single band image but this would result in it being grayscale I think? I tried everything...


texts: QuickOSM query (in QGIS) appearing in the wrong place. Maybe CRS Problem?

texts:
I had a question in QGIS Buffer distance vs Distance in Distance Matrix

which in turn made me to change my project CRS from EPSG: 3857 to EPSG: 25832.

My project location is in the middle of Germany (Shown in the image with the green dot, that i added manually)

But then, i queried some data from Quick OSM, only for it to appear somewhere in south of France. (Shown as the red dot)

At first I realized that the OSMquery layer have a different CRS than my project. (EPSG: 4326), so in turn, I changed the layer CRS from the OSMquery to my Project CRS, which is EPSG: 25832, but then this happened:

The red dot (Representing the layer with changed CRS) appears on the sea near the African Continent!

Did I do something wrong? Is there a way to repair this? Is there any command I have to change in the QuickOSM? Or is this a problem with the CRS? Or I just missed a setting somewhere? (Note: I am very new to GIS software in general)


texts: Classifying slope (flat, slope, steep, very steep) in QGIS?

texts:
I want to classify the slope of the DEM data, by dividing the slope by 4 classes: flat, ramps, steep, very steep.

How to do this with QGIS?


texts: How to get the area of a bounding box using PostGIS 2.2?

texts:
As someone who is doing a data integrity check of Geonames, I've found that about 10 percent of the data contain multiple sets of coordinates (longitude, latitude) for a place name within a country. For example, Krajan in ID has 1,151 unique coordinate pairs attributed to it.

I want to know how dispersed the coordinate pairs are for places with more than one pairing. This is an analysis of all places within Geonames modified as recently as 2016-03-04. My analysis is available on GitHub, and you can fork it here.

To figure out the dispersion of place names with more than one set of coordinates, I first converted the coordinates provided by Geonames to the geography datatype. I then ran the following query:

SELECT
    name,
    "country code",
    COUNT(DISTINCT concat(latitude, longitude)) as locat_count,
    ST_Area(ST_Envelope(ST_MakeLine(
    ST_MakePoint(ST_YMin(ST_Extent(ST_Transform(geog::geometry, 4326))),
               ST_XMin(ST_Extent(ST_Transform(geog::geometry, 4326)))),
    ST_MakePoint(ST_YMax(ST_Extent(ST_Transform(geog::geometry, 4326))),
               ST_XMax(ST_Extent(ST_Transform(geog::geometry, 4326))))
    )))*POWER(0.3048,2) as sqm
FROM
    geonames
WHERE
    "feature class" = 'P'
GROUP BY
    name,
    "country code"
HAVING
    COUNT(DISTINCT concat(latitude, longitude)) > 1
ORDER BY
    COUNT(DISTINCT concat(latitude, longitude)) DESC

As someone whose GIS experience is limited to reading PostGIS in Action, 2nd edition, I'm hoping that the following questions can be answered:

Did I correctly transform a Geography to a Geometry data type, given that I'm doing an analysis of specific places across the entire globe?
Is using the area of a bounding box a good, but not great, measure of dispersion for this problem set?
Do you see anything I overlooked which will effect the quality of my analysis?


texts: Is there an equivalent of dplyr::bind_rows (or the old plyr::rbind.fill) for spatial objects?

texts:
bind_rows can append dataframes even when they do not have identical columns.  It fills any non-matching columns with NAs.

Is there an equivalent for spatial point data frames in R?

I have two spdfs I want to combine (row wise) but they have almost no matching columns.
I have had a look at the sf package but it doesn't have a method for this (yet?).

UPDATE:

I get an error  message trying to replicate suggested solution

data(meuse)
coordinates(meuse) <- ~x+y
meuse <- st_as_sf(meuse)

m1 <- select(meuse, cadmium)
m2 <- select(meuse, copper)

m3 <- bind_rows(m1, m2)
m3$geometry <- c(m1$geometry, m2$geometry)
m3 <- st_as_sf(m3)

> head(m3)
Error in .subset2(x, i, exact = exact) :
 attempt to select less than one element in get1index

UPDATE 2:

Don't be an idiot like me and forget the crucial data.frames() step when using bind_rows


texts: How can I print the text of help(some_method_class) in my QGIS plugin?

texts:
I'm developing a QGIS plugin to search classes and classes methods of QGIS. The dir equivalent option it was answered in:

How can I access to elements in dir(some_class) of PyQGIS without a dictionary in my code?

As an example, the next image shows the search for methods with 'geo' pattern in QgsVectorLayer class and the result was as it expected.

When I tried out the equivalent help option at the plugin, with the next fixed example (see snipped code) for the 'geometryType' method of QgsVectorLayer, result it was always printed at the Python Console (not into the QTextBrowser object); as it can be observed at the next image.

.
.
.
    def getClasses(self):

        if self.dlg.checkBox.isChecked() == False:
.
.
.
        else:

            message = help(QgsVectorLayer.geometryType)
            txtBox = self.dlg.textFeedback
            txtBox.setText(message)

    def run(self):
        """Run method that performs all the real work"""
.
.
.

Other arbitrary messages were printed as I expected so, it was pointed out that this part of the code works well.

My question is:

There is any option to redirect the text of the help command to the QTextBrowser object or it is impossible?

Editing Note

I did a search based at the links supplied by Joseph:

Redirect stdout to a file in Python?

Unable to restore stdout to original (only to terminal)

and I can build this code:

import sys

#save a reference to the Python Console of QGIS before reassignment
oldstdout = sys.stdout

#open an arbitrary file in disc to reassign the standard output
sys.stdout = open('file', 'w')

#write to the open file
print help(QgsVectorLayer.geometryType)

#force the flush to the open file
sys.stdout.flush()

#reassign the standard output to the Python Console
sys.stdout = oldstdout

It works; as it can be observed at the next image (and the Python Console can be used again as standard output). However, I would like to improve the code by using a tempfile in memory before writing it to the QTextBrowser.


texts: NVS Vector Stream Order Tool gives 000816 Tool is Not Valid in ArcGIS 10.2 for Desktop?

texts:
I am trying to use the NVS vector stream order tool (designed for ArcGIS 10.0) in ArcGIS 10.2. The tool is available for free.

Whenever I attempt to operate the tool I am met with the error message:

  000816 Tool is Not Valid

I am assuming that this is due to the tools incompatibility with ArcGIS 10.2.

How can I resolve this issue?


texts: Can in_memory act as a regular directory in the memory?

texts:
I am having trouble with raster clipping whenever the result is saved to a GDB,
is there any other way to geoprocess in the memory and have the results behave as if saved to a normal directory?


texts: Why is my raster offset after I use a tool such as Reclassify?

texts:
I'm using ArcGIS 10.1 and have noticed a strange problem.  Often,though not always, when I use a tool such as Polygon to Raster, Reclassify, or Mosaic to New Raster, the resulting raster layer is offset just a bit- either it's too high or low by about half a pixel.  The projection is exactly the same, the layers just don't quite line up.  The strangest thing is that it doesn't always happen.  Anyone else run into this problem or have a solution?

Thanks so much!


texts: Getting longitude and latitude from a GraphicsLayer using ArcGIS API for JavaScript ( 3.32 )

texts:
Update : I have to position a button at the bottom of a layer, i try with Point, fullExtent and xyToLngLat.
but the result seems offset sometime.

I have a hard time getting longitude & latitude from a GraphicsLayer and don't find anything in the documentation for that.
API 3.x.x
https://developers.arcgis.com/javascript/3/jsapi/
GraphicsLayer
https://developers.arcgis.com/javascript/3/jsapi/graphicslayer-amd.html
require([
        "esri/map",
        "dojo/on",
        "esri/arcgis/utils",
        "esri/geometry/webMercatorUtils",
        "dojo/domReady!"
    ], function(Map, on, arcgisUtils, webMercatorUtils) {
        arcgisUtils
            .createMap("mapID...", "map", {
                mapOptions: {
                    zoom: 11
                }
            })
            .then(function(response) {
                map = response.map;
                map.setInfoWindowOnClick(true);
                map.disableScrollWheelZoom();
                esriConfig.defaults.map.zoomDuration = 1000;

                let layer = map.getLayer('1233_..._layer');
                // How to get longitude latitude ?

let point = Point({
    x: layer.fullExtent.xmin,
    y: layer.fullExtent.ymin,
    spatialReference: map.spatialReference
})

let positionButton = esri.geometry.xyToLngLat(point.x, point.y);
//  Result seems off sometime.

            });
    });
});


texts: python gdal - libgdal.so.1: undefined symbol: sqlite3_column_table_name

texts:
I just reinstalled my python environment (and my whole Ubuntu).

In python (or IPython), when loading geopandas:

import geopandas as gpd

or when I import fiona:

import fiona

I get this error message:

ImportError: /usr/lib/libgdal.so.1: undefined symbol: sqlite3_column_table_name

I have found quite similar requests (here, or here) but none answered my problem. Any advice?


texts:
I have a points shapefile with City, State, Zip columns.  I want to merge the column data together into a new column containing: City-State-Zip (with the hyphen).

Can I merge column data like this using a IFeatureClass?  If not what should I try?


texts: mapping.mapDocument() not working, but not throwing exception. path issue?

texts:
I'm working through the recipes in the Python cookbook, and am having some weird results.

When I run the script (copied below) with

the map reference listed as "CURRENT" from an open mxd
from the Python window in Arcmap

I get the expected results -- a layer is added to the map.

However, when I:

change the map reference to a path
save the script as a .py, and
run it from idle

no errors are thrown, but no layer is added. I even tried nesting the whole thing in a try/except/else statement, and I got back the else response.

I know the mxd path is correct, because I copied it from ArcCatalog.

Any ideas?

# Import arcpy.mapping module
import arcpy.mapping as mapping

# Create a map reference
mxd = mapping.MapDocument(r"H:\Python\Python_Cookbook\Maps\TravisCounty.mxd")

# Create a reference to the primary data frame where the layer will be added
df = mapping.ListDataFrames(mxd)[0]

# Define the reference layer
refLayer = mapping.ListLayers(mxd, "Building_Permits*", df)[0]

# Define the layer to beinserted relative to the reference layer:
insertLayer = mapping.Layer(r"H:\Python\Python_Cookbook\data\TravisCounty\School_District_2.lyr")

# Insert the layer into the df
mapping.InsertLayer(df,refLayer,insertLayer,"BEFORE")


texts: Shape index, compactness and assymetry index with PostgreSQL /PostGIS

texts:
I am working on automated land parcel identification and would like to extract road/river/thin and linear-like polygons from a massive dataset. For now, the only index I can get some answers from is the ratio between the perimeter and the area of the polygons. The results are Ok, but I need to "clean" them.

How do I find the shape index, compactness or assymetry with PostgreSQL/PostGIS? I need a solution for vector data only.


texts:
I have two Shapefiles with Polygons ( City and Forerst)

Is there a Plugin who is able check the topology (QGIS)? Like "Knots do not overlap" or something like that? I dont want that they overlap.

Does anybody know a Plugin?
Would be great!


texts: leaflet 2 layers with different resolutions


texts:
I have an ArcMap 10.x AddIn in which I've developed a dockable window. Everything works great except that I want the dockable window to be closed when ArcMap first starts. If the user closes ArcMap with my dockable window open, ArcMap remembers its state and opens it again when it is next launched.

The following code works to open or close the dockable window once ArcMap is open:

Dim pUI As ESRI.ArcGIS.esriSystem.IUID = New ESRI.ArcGIS.esriSystem.UID
pUI.Value = My.ThisAddIn.IDs.CenterlineDockableWindow

Dim docWin As ESRI.ArcGIS.Framework.IDockableWindow = My.ArcMap.DockableWindowManager.GetDockableWindow(pUI)
If TypeOf docWin Is ESRI.ArcGIS.Framework.IDockableWindow Then
    docWin.Show(bVisible)
End If

But I have tried calling this code all over the place and I can't get my dockable window to close at the start of an ArcMap session. (Addin extension startup, construction of the dockable window.) Help please!


texts: SQL databases with names longer than 31 characters

texts:
My organization has an SQL Server with many databases with names longer than 31 characters. These are not recognized by ArcCatalog (or ArcMap). We can't change the names of these databases, because they're important for a wide variety of uses outside of ArcGIS. Is there a workaround for this problem? We're unable to use ArcGIS as a regular part of our workflow until this matter is resolved.

This limitation is described here: http://desktop.arcgis.com/en/desktop/latest/manage-data/gdbs-in-sql-server/enterprise-geodatabase-limits.htm


texts: Two fields have same name in attribute table and not possible to get unique values?

texts:
I have run multiple processes in arcpy: convert rasters to feature classes, overlay multiple feature classes and intersect layers. I would like to keep all attributes of my data.

However, I've ended up with attribute table, which contain two fields with the same alias: gridcode (as I have converted two rasters to shp and overlaying them). The field names are actually different (gridcode and gridcode_1).

When I try to display my final map, the Symbology in Layer properties reads only gridcode values of one field. Or course, it is not the one I would like to visualize.

Did you experience not redible symbology? is it because of the same name of my fields? if yes, how can I avoid it? I tried to:

open the new .mxd document and load data,
copy my files to new database and load data,
qualify my field names in the arcpy environment settings

arcpy.env.qualifiedFieldNames = False

All without success in ArcGIS 10.4.

Here is some illustration of the same field names with different values (originated from different rasters):

In Layer Properties -> Symbology I can read only the values of the second field...

If I run print [f.name for f in arcpy.ListFields("iBuffSmkGFW")]
I've got back:

>>> [u'OBJECTID', u'Shape', u'FID_GFW_SVK_poly', u'Id', u'gridcode', u'FID_outSMKpoly', u'Id_1', u'gridcode_1', u'FID_buff_erased', u'ID_12', u'PARTS', u'CSZ', u'NAM', u'DTS', u'LEG', u'PSB', u'ZONA', u'VYHLASIL', u'LEGENDA', u'TYP_MCHU', u'ROK_VYHL', u'V_KN', u'POLY_AREA', u'NUM_POINTS', u'ORIG_FID', u'distance', u'Shape_Length', u'Shape_Area']


texts: Moving Python script 10.3 to Pro. How do I know the script ran in Pro and not 10.3?

texts:
I have inherited a Python script that mosaics many files in 10.3. I normally run using IDLE outside 10.3.
I don't code at all but am trying to learn so I can move the code to ArcGIS Pro to ensure we stay up to date. I have learned to convert what I have from python 2.7 to 3.6 successfully.
Based on what I have read it is better to run code outside of Pro to speed processes up if there is no need to have GIS open. Therefore I am wanting to run the code as such.
I have read as much as I can comprehend on conda environment and running the script through a .bat file. However if I simply go to my code and right click I have the option of: Edit with Idle, Edit with Idle (Pro) and Run with ArcGIS Pro. If I choose Edit with Idle (Pro) to open the script and click run, the process runs fine.
Did it run via Pro?
How would I know other than what I right clicked to start the process has the word Pro in it?
Does this mean I can skip the whole conda or .bat usage (both were giving me errors on start up so I  hope so!)?


texts: Getting rectangle from exporting image polygon from Google Earth Engine

texts:
I'm trying to export a polygon from an image with Google Earth Engine
but the result is an image with rectangle holes in it:

My code:
task_config = {
        'region': polygon,
        'crs': 'EPSG:32636',
        'crsTransform':[20, 0, 600000, 0, -20, 3400020],
        'fileFormat': 'GeoTIFF',
        'fileNamePrefix': fileNamePrefix ,
        'folder': destination,
        'image': cd,
        'description': 'imageToDriveExample_test',
    }
out = batch.Export.image.toDrive(**task_config)
process = batch.Task.start(out)
print(fileNamePrefix, 'is in {} folder'.format(destination))

There is no problems with my polygon


texts:
I am trying to recognize burnt areas based on some MODIS products and I just realized that I am missing a bunch pixels from the coastline masking. As you can understand that is an issue because I am missing data.

Is there a website/archive where I can find the pre-processed images, or is there a smarter suggestion on how to handle this issue?


texts: In my QGIS Python plugin, I use shapefile layers and I am having a problem rewriting existing shapefiles. Is it possible to delete a shapefile from disk using OGR?


texts: Dividing polyline layer in clusters with specific requirements in ArcGIS for Desktop?

texts:
For my work in ArcGIS 10.2 for Desktop I need to divide line layers into clusters/groups. Currently I am doing this manually, but I like to automate this. The line layers can consist of 50 up to 2500 segments (smaller lines). What I need to achieve is that the line layer is divided in a n of clusters (where n can be set by the user) which meet the following requirements.
In order of importance:

The first requirement is that a cluster should always consist of 8 or more segments.
The second is that the segments should be near each other.
The third is that the clusters should have a equal n of segments.

So to explain this order of importance a little bit more I have to examples with pictures:

First example of a line layer to be divided in 24 clusters with a average of 20 segments per cluster. The red arrow is a part of the line layer which consists of 4 segments. So this should form 1 cluster with several segments of the part with the green arrow, so that it is at least 8 segments, but preferable 20 segments.

Second example. In case the whole line layer is 60 segments to be divided in 3 layers, the ideal situation would be 3 clusters with each 20 segments which are connected to each other. But if there is a isolated part of the line layer which consists of 10 segments (1) this should be 1 cluster and the other part which consist of 50 segments should be divided in 2 clusters (2 & 3) of 25 segments (see picture)

I tried to achieve this task by looking at some arcgis tools but didn't found a solution yet. For example the grouping analysis tool, but up to now I was not able to customize it enough to meet my requirements. I also found this post which is kind of what I am looking for but not completely: divide polygons in equal number of groups. But as far as I understand this does not meet my requirements completely, especially the order of importance. Thereby the solution of FelixIP is hard for me to understand and therefor I am not able to judge if I can use this.

So, at this point it seems to me that my problem is a difficult mathematical problem to solve, especially with the standard tools in Arc. But maybe anyone does have some good ideas/methods (maybe with a customized python script) to get this task done or at least can get me on the right track?


texts:
I want to select polygons in WFS FeatureTypes (OpenLayers). I used the code of this example http://openlayers.org/dev/examples/getfeature-wfs.html . Then, when I select a polygon in my the layer nothing is selected, I don't no why. Could you help me please.

Here is the code :

<!DOCTYPE html>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<meta name="apple-mobile-web-app-capable" content="yes">
<link rel="stylesheet" href="OpenLayers/theme/default/style.css" type="text/css">
<link rel="stylesheet" href="style.css" type="text/css">
<title>WFS: GetFeature Example (GeoServer)</title>

WFS GetFeature Example (GeoServer)

WFS, GetFeature

Shows how to use the GetFeature control to select features from a WMS layer.

Click or drag a box to select features, use the Shift key to add
    features to the selection, use the Ctrl key to toggle a feature's
    selected status. Note that this control also has a hover option, which is enabled in this example. This gives you a visual feedback by loading the feature underneath the mouse pointer from the WFS, but causes a lot of GetFeature requests to be issued.


texts: PostGIS Spatial Query to calculate an average

texts:
I am currently working on a project that requires me to calculate average pollution levels for a large amount of point data. The image below shows the focus area (in green). My task is to calculate the average pollution for the postcode areas (polygons in black beneath the focus area) for any contained or part-contained in this area.

The point data and the areas both have geometries associated with them. I have been working on various queries for a while now, but everytime I enter a spatial element to the query it is bringing back a blank table:

SELECT p.id,
ROUND (AVG(n."2011"),2) AS Aveage_NO2_2011
FROM postcode_area p, no2_2011 n
WHERE ST_WITHIN (n.geom, p.geom)
GROUP BY p.id;

The aim is to produce a cholopleth map for the postcode areas of the mean NO2 levels. This should exclude any postcode areas that do not intersect or are not contained within the focus area.


texts: When I measure a points with trimble GPS can I make a shortcut on a BUTTON in ArcPad to measure POINT(capture point) from a GPS? I don't want to have to always take the little "pen" and click on a CAPTURE POINT. Instead I want to click it with finger on some of buttons on ArcPad. I find this much easier because I have to measure 400 points every day. Is it possible to customize that? Please answer. Thanks.


texts: Installing ArcGIS API for JavaScript 4.6 for use with ArcGIS for Server?

texts:
I am trying to use JS API v4.x on Federated ArcGIS Server, but I am having problem regarding setting up the JS API v4.x.

I am deploying arcgis javascript library and sdk v4.6 in an IIS server locally (no internet connection) using this tutorial. While following the tutorial I have figured out that it might be only for v3.x because

While configuring

Javascript API CSS2 URL

to

http://myhost.example.com/arcgis_js_api/library/3.16/3.16/esri/css/esri.css

I realize that there is no esri.css file found in v4.x, rather I found main.css and view.css. So for now I use main.css as Javascript API CSS2 URL.

Now I publish a testService in arcgis server. When I try to view the service unfortunately I see blank page. Below is my network log having javascript loading errors

It seems that the two javascript (ArcGISDynamicMapServiceLayer.js and ArcGISTiledMapServiceLayer.js) files are missing. I checked that these files are only present in v3.x not in v4.x. Now if I copy these file from v3.x to v4.x I got many other errors w.r.t. other javascript files loading issue.

Can we deploy v4.x locally (no internet) on server and, if yes, then am I following right tutorial or am I missing any step while configuring ?

I downloaded v4.6 from here

I have also posted same question to GeoNet


texts: Record Date and User for an edited feature

texts:
The client has a Feature Class in SDE 9.3.1.  When a feature in the feature class is edited the client wants to automatically record the date/time and who edited it in the feature class attributes.

I have found a few references to putting database triggers on the "A" table.  Also for creating a class extension.

Is there an plusses or minuses for doing either one?  Are there any other options that I am missing?

Thanks


texts: How to get QgsFeatureId with row and column in qtablewidget.(PyQGIS)

texts:
In a QGIS python plugin. I like to change value selected cell in qtablewidget to the typed value. Something like screenshot below.

But in changeattributevalue function. While column(second value) and string(third value) is really easy to get. I really can't find a way to get "QgsFeatureId"(first value) with row and columns of qtablewidget.
If I do something like below. It will always change wrong row.
layer.changeAttributeValue(long(table.selectedIndexes()[0].row()), table.selectedIndexes()[0].column(), changestring.text())

I tried to use QgsFeatureRequest() with unique column field, but I really don't know how to use this function with variables and scanning whole table seems ununnecessary.
(ex: request = QgsFeatureRequest().setFilterExpression( u' header[table.selectedIndexes()[0].column()] = table_data[0][table.selectedIndexes()[0].row()]' ))
Is there any way to get QgsFeatureId based on row number?


texts: v.extrude extusion failed - The following layers were not correctly generated

texts:
I am using QGIS Grass v.extrude tool for extrusion but it giving me this error (the bold text is error).

scale Scale factor sampled raster values default: 1.0 null_value
Height for sampled raster NULL values
**ERROR: Sorry <TER_8> is not a
valid option** C:\Users\User\Documents>v.out.ogr type="auto"
input="output5c4e838e8af54c7dae5ee537994bc46a"
output="C:\Users\User\AppData\Local\Temp\processing_f5800465ab8f4b9b8866d34ee24c0249\d26f9377bcd8450582d55381695f5de2\output.gpkg"
format="GPKG" --overwrite **ERROR: Vector map
<output5c4e838e8af54c7dae5ee537994bc46a> not found**
C:\Users\User\Documents>exit Execution of
<C:\Users\User\AppData\Local\Temp\processing_f5800465ab8f4b9b8866d34ee24c0249\grassdata\grass_batch_job.cmd>
finished. Cleaning up default sqlite database ... Cleaning up
temporary files... Press any key to continue . . . Execution completed
in 13.72 seconds Results: {'output':
<QgsProcessingOutputLayerDefinition {'sink':TEMPORARY_OUTPUT,
'createOptions': {'fileEncoding': 'System'}}>}

Loading resulting layers

**The following layers were not correctly generated.

C:/Users/User/AppData/Local/Temp/processing_f5800465ab8f4b9b8866d34ee24c0249/d26f9377bcd8450582d55381695f5de2/output.gpkg

You
can check the 'Log Messages Panel' in QGIS main window to find more
information about the execution of the algorithm**.


texts: ExecutionEngineException using ArcGIS 10.0 extension recompiled for 10.1?

texts:
I have a written an ArcGIS extension in C# .Net for version 10.0.  I have attempted to recompile this extension for 10.1 and that works.  But running the extension in 10.1 is causing ArcGIS to crash.  While debugging the code I'm getting an error saying "ExecutionEngineException was unhandled". This is not always happening on the same part of the code.  One time its a cursor, another time its setting symbology, etc.  its different every time.

I have read through the documentation here on how to upgrade and none of these solutions are helping.

Has anyone ever experienced this before?  I have no idea what else to try.


texts:
I've been using QGIS for sometime its a great software, it suits my needs in my project until I encounter this issue in Google Earth.

Are there any plugins or any "work around" method to be able to include layer styles when exporting layers to Google Earth format (KML)?

I am wondering how to export a styled layer (probably styled in QGIS) to Google Earth format that will include its color and especially labels.


texts: Finding left and right side of line in ArcGIS for Desktop?

texts:
i have road layer as line and polygon layer as building,i want to know left and right side of road in relation with buildings

Is it possible in ArcGIS for Desktop?


texts: Counting occurence of unique points across large grid using QGIS?

texts:
I am attempting to map out, in a 10x10 km grid, the occurrence of unique plant species. I have used the "Points in Polygon" feature to count and map the unique points across the grid, however I have a new need. I have a .csv file with >100,000 observations of plants, and I want to count how many grid squares each plant species occupies, but only count it once for each grid square. So say I have 200 total 10x10 km grid squares I want to be able to say "Species A occupies 10 different 10x10 km grids, Species B 100 different... etc.

At the moment my map looks like the below:

I am using QGIS v. 3.0.3


texts: Unable to replace Null values using Python parser of ArcGIS 10.0 Field Calculator?

texts:
I'm using the following python code to replace Null values by 0, using field calculator:

def nulls(p1):
 if p1 is None:
    return 0
 else:
    return p1

But nothing happens, Null values stay. I'm using ArcGIS Desktop 10.0.


texts: Adding a new Tool (Plugin) to Whitebox GAT - anyone else have trouble?

texts:
I am in the midst of adding a new tool to Whitebox GAT, which is merely copy of a current tool with some minor modifications to suppress messages output by the tool upon completion.  This tool's messages, which require clicking "OK" after it completes, is preventing the batch processing of thousands of files.

Has anyone successfully followed the instructions for adding a new plugin to Whitebox?  I have followed the instructions to a 'T', checking the work several times, but the new tool doesn't seem to be loading correctly.  In fact, after adding the new .jar file to the correct folder (plugins folder within the resources folder), Whitebox won't load at all.

Has anyone had similar problems?  Is there a known issue or a way to get this to work?


texts: ArcGISDynamicMapServiceLayer not refreshing security token

texts:
I have a secure service that's secured by arcgis tokens (ArcGIS for Server 10.2.2). When I start my Android application and load the layer, everything's fine:

ArcGISDynamicMapServiceLayer mapServiceLayer = new ArcGISDynamicMapServiceLayer(
                                                       mapServiceUrl, null, cred);
getMap().addLayer(mapServiceLayer);

The credentials are entered by the user in a login activity and then kept in memory (I need to be able to generate tokens myself to access a server object extension).
Problem is when the token expires, the map just vanishes. I guess it's something to do with the layer not being able to authenticate itself again, but I have no idea why.

I tried playing around with the UserCredentials, only setting username & password, only setting usertoken & tokenserviceurl or setting everything. Nothing helps. Listening to OnStatusChanged of the layer doesn't tell me anything either, it doesn't fire.

I'd be grateful if anybody could tell me what I'm missing.


texts: Is there QGIS plugin to allow 3d visualisation of geological borehole data similar to functionality of Target for ArcGIS?

texts:
I'm very new to QGIS, I have started using it as my new company is not willing to pay for ArcGIS and Target at this stage so I'm hoping QGIS can substitute not just in the interim but for good.

What I am looking for is a way to load in my borehole database and create 3d visualizations of the data, make cross sections and if possible model seams. Is there any capability within the QGIS world to undertake this kind of work?


texts: Migrating ArcGIS Server from 10.0 to 10.1 on Windows Server?

texts:
Due to the new system architecture of arcgis for server 10.1 I am first writing here to ask if anyone has successfully migrated from AGS 10.0 to 10.1 and what problems were encountered. I am currently serving data on Windows 2008 R2 with ArcGIS Server 10.0. I have about 20 map-client applications using aounrd 50 AGS services and no Fail-Save system. Around 400 People use the clients in my organisation.

As I am relatively new to ArcGIS server and the windows server environment (I was previously in an organisation which used Linux Ubuntu server,Apache, tomcat6, geoserver with PostgreSQL) I am quite worried about things not going to plan!


texts: Visualizing road line segments within specific borders

texts: I have a perhaps very simple ArcGIS question: How can I make the road line segments start or stop at the edge of the city's Census Block Groups?


texts: Point of Intersection for a Ray and Earth's Surface

texts: Say I have a ray vector originating from somewhere out in space. An example might be a ray of light from the sun. How can I calculate the point of intersection (if it exists) between the ray and the Earth's surface? I'm using Cartesian coordinates (ECEF) and I'd like the Earth's ellipsoid Geometry to factor into the calculation.


texts:
I'm trying to animate the opening and closing of particular businesses using yearly travel guides.  I've created a data base that contains all the addresses and all of the years they appear so for instance:

1965 Copper Lantern
1966 Copper Lantern
1967 Copper Lantern
etc.

When visualizing the data using Carto DB the animation is spotty and it seems that it is looking for information for every single month of each year.  How can I change this so that it only animates the entire year rather than each month in the year?

I am completely new to all of this.


texts: Filtering a layer by an extracted feature?

texts:
I am currently getting quite frustrated writing the base of a longer script. What I would like to do currently is to extract an attribute from one layer and select rows in another layer based on an expression which compares the first attribute' value with values in the second layer. Afterwards, I would like to select the rows and go from there.

The main issue now is that it appears as if the expression does accept the column in the second layer, but not the value of the attribute from the first layer with which it is supposed to filter.

So far I checked that both the column and the variable are encoded as UTF-8 as well as a variety of combinations in the expression. The selection works if I exchange the variable (gw) with a value, but this is not what I need.

I found some suggestions that this may not be possible generally, but I would love to hear whether this is actually the case and/or whether there exists a workaround.

Regarding the code, the if statement is only used to avoid going through all rows every time I test it.

mapcanvas = iface.mapCanvas()
layers = mapcanvas.layers()

epr=layers[0]
ged1=layers[1]
for g in epr.getFeatures():
    gw = g['gwid']
    if gw<436:
        print(gw)
        expr=' "gwno" = "gw" '
        selection = ged1.getFeatures(QgsFeatureRequest().setFilterExpression(expr))
        ged1.setSelectedFeatures([s.id() for s in selection])
        x=ged1.selectedFeatureCount()
        print(x)
    else:
        break


texts: QGIS 3.10 - Changing display name of layer

texts: Is there a way to change display name of layer without changing layer name ? The field 'displayed as' is disabled and based on the field 'layer name'.


texts: What style has been applied to a QGIS layer?

texts:
QGIS 3.4 - I have several different saved styles which I can assign to a particular layer depending on what I wish to emphasise at the time.
For example, for a Roads layer I might want to show roads in a bold red in one case, but as a faint black line in another.
Without using Python (this was discussed in an earlier question), where can I simply find the name of the saved style (the .qml file) that has been currently applied to the layer?


texts: How to join a WFS layer to a table in OpenLayers

texts:
So I have to bring up this old question
 How to join a WFS layer to a stand-alone table in OpenLayers

I recently have to get this working, I have to join a WFS layer data from GeoServer using postgis store. The WFS data will contain key attribute and the table data will also contain key attribute that will became the join key.

The table will be an exported result of MySQL database, so it is impossible for me to join on server side.

So how do I join it on client side?

I have an alternative approach that is export from MySQL then import to PostgreSQL/PostGIS and join in PGSQL, but I dont't think this a good way.


texts: Export as image with too many different (unused) colors

texts:
When I create a map, which uses 13 different colors (12 + gray for background), why uses(!!) QGIS more than 20000 different colors when saved as bmp, png or jpg?- I verified this behaviour with irfanview (image | information , used colors). As gif as an export-option is not available, how can I limit the number of used colors in the exported raster-files. reducing later in irfanview is not an option, because colors are also changed (e.g. replaced, dithered,...) not only eliminated.

I use QGIS 2.18.13 64bit under windows 10


texts: PyQGIS standalone - GDAL_DATA failure to retrieve gcs.csv using the QgsCoordinateReferencesSystem

texts:
I'm writing a standalone PyQGIS application. In order to set the project CRS, I'm using the QgsCoordinateReferenceSystem class. I tried all the possible methods to assign the crs I want (which is EPSG:32632, but I also tried with the standard EPSG:4326), and none is working (failure verified with isValid method). When I use QgsCoordinateReferenceSystem.createFromUserInput('EPSG:32632), I get the following error:

ERROR 4: ERROR 4: Unable to open EPSG support file gcs.csv. Try
setting the GDAL_DATA environment variable to point to the directory
containing EPSG csv files.

I therefore deduced that this could be the problem preventing every method I tried from working. However, the GDAL_DATA path is set in my batch file running the script by calling the o4w_env.bat, and it is correctly set to the default for OSGeo4W64 installation, which is C:\OSGeo4W64\share\gdal.
The file gcs.csv is correctly located in the pointed directory. Within my script, I repeatedly verify the GDAL_DATA variable, as well as GDAL_DRIVER_PATH, GEOTIFF_CSV and PROJ_LIB: they're all set to the default values for OSGeo4W64 installation, and are never changed within the script.
Since all the paths are correct, and the gcs.csv is actually located in the pointed directory, I can't really get where the issue might be rising from.


texts: Adding field of intersected polygons in points using ArcGIS Desktop?

texts: I have some points and polygons in an area. I want to add a field in those points that tell what polygons have been intersected by those points and not only what polygons but a specific attribute of those polygons.


texts: Batch Renaming Relationship Classes using ArcPy

texts:
I'm trying to rename about 100 relationship classes in a Geodatabase.
All the relationship classes are named under a naming convention and a standard part of that has changed, i.e:

abc_feature1_rel

abc_feature2_rel

Renamed to:

ddd_feature1_rel

ddd_feature2_rel

I would like to create a small script to automate this if possible, rather than doing it manually.


texts: In what situations would SpatiaLite be selected over PostGIS, and vice versa?

texts:
I know that SpatiaLite is a lightweight solution. Would it be a problem if I put it on a 5K pageview/day site? Is PostGIS too resources-consuming for such usage?

The dataset is something like < 100MB.

Are there any other factors you would consider in cases like this?


texts: How to offset labels on a web application from two different services

texts:
I have multiple layers that are labeled within our online web mapping application. Two (zoning and land use) are located in our Planning/Zoning ArcGIS Server 10.1 Service. The other (Parcels) is within our 10.1 Parcels service.

Problem I'm having is that the layers are stacked on top of each other (centroid of parcel). How might I go about adjusting the label properties so that they don't appear stacked when these layers are turned on?

Screenshot
the top label is from our parcels service, below that in the white mask is the future land use label from our planning/zoning service.


texts: Dissolve feature in geopandas based on multiple attributes

texts: It is possible to dissolve features in GeoPandas based on the attribute field. However, I would like to know how to dissolve features in GeoPandas using at least two attribute fields. Is it possible to do that?


texts: Clip geodatabase containing vector and raster data

texts: I have a fairly large file geodatabase in ArcGIS 10.1 containing both vector and raster datasets. Generally, I only want to work on a small extent at a time. Is it possible to clip a geodatabase to a smaller extent to reduce its size on disk?


texts: Receiving dojo.io.script error Error: Invalid URL?

texts:
I am trying to get a buffer circle on my map,when I click on map. I tried with the following code, but I got error:

  dojo.io.script error Error: Invalid URL

How can I avoid this error?

<!DOCTYPE html>

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"/>
    <title>Simple Map</title>
    <link rel="stylesheet" href="http://js.arcgis.com/3.14/esri/css/esri.css">


texts: Converting kml to wkt using geodjango or python?

texts:
in geodjango i found that i can use WKT to insert geometry such as:

pnt = GEOSGeometry('POINT(5 23)')

but it doesn't show how to do it if the data is KML, as my data is in kml format, so my plan is to convert KML -> WKT -> GEOSGeometry.

Is there a way to convert kml to wkt using geodjango or using any python library?


texts: check the "quality" for (poly-)lines (density of vertices)

texts:
I want to check the quality of digitized tracks. I suppose, that a track with a lot of regular vertices has got a good quality. And a track with less regular vertices has got a poor quality.

Maybe, I need something like a heat map for lines?


texts: Error when creating script: QgsExpressionContextUtils not defined

texts:
This is the piece of code that is failing:
##nomenclatura = string '1.1.E.3.52'
##pdfOutput = output string
from qgis.core import QgsProject
project = QgsProject.instance()
QgsExpressionContextUtils.setProjectVariable(project,'Manzana_actual',nomenclatura)
tx = pScope.variable('Manzana_actual')
layer = project.instance().mapLayersByName('Mzs,Qt,Chs')[0]
iface.setActiveLayer(layer)
#continues#

ERROR MESSAGE:

QgsExpressionContextUtils.setProjectVariable(project,'Manzana_actual',nomenclatura)
NameError: name 'QgsExpressionContextUtils' is not defined

I copy pasted all the code in the python console and it works, but fails when I try to save it as a script...


texts: pgr_nodeNetwork doesn't use the right data type for osm id in the newly created table

texts: I was using pgr_nodeNetwork() to generate a new routable network. http://docs.pgrouting.org/2.0/en/src/common/doc/functions/node_network.html. I found that the old_id (cooresponding to the osm id in the old table) in the new table uses integer as its datatype (see following), the docs says the data type for old_id is bigint though. any ideas to fix it?


texts: ArcGIS for Developers Free Development and Testing Account suspended/expired?

texts:
I signed up for an ArcGIS for Developers Free Development and Testing Account and when I signed into it today, it said it was suspended and or expired.

I thought the account was free for life.

Do I need to purchase a subscription like you need to do with the 30 day free trial account?

I have a story map that I need access to.

Is there any way to get my story map transferred to another account?


texts:
I have the following situation:

Postgres database with PostGIS
There is a table with a PostGIS geometry column. All non geometry data is managed (create, update, delete) by a webapplication.
QGIS can connect to the database.

Now the idea is to have the following workflow:

Create entries in the table in the webapplication. The geometry column is left empty.
Use QGIS to add a polygon to the entries created in the webapplication.   The polygons should be copied from a shapefile.

When I try to do this, QGIS does not allow me, to copy the polygons to an existing entry, but instead tries to insert a new entry in to the table. This is not feasible, there is some logic involved, how the non-geometry attributes need to be filled, and that logic resides in the webapplication. So I need QGIS to UPDATE an existing entry with the copied  polygon.

Is this somehow possible?


texts: ArcGIS Desktop cannot display simple TIFF image created with GIMP (graphic software)?

texts:
I have the following issue:
I used the graphic software program GIMP to create a really simple TIFF image - white background layer, a couple of black polygons on it.
For some reason I can't import this simple image into ArcGIS 10.3.1. Arc only displays the white background... Any advice?


texts: What is the difference between __geo_interface__ and to_json()?

texts:
I'm using geopandas extensively in my scripts and one of my colleague shown me the to_json() method. I was using the __geo_interface__ magic method previously and sometime the to_json() is not compatible with other tools like the GEE API:
using a geopandas dataframe, this doesn't work:
import geemap

gdf_ee = geemap.geojson_to_ee(gdf.to_json())

and this work:
import geemap

gdf_ee = geemap.geojson_to_ee(gdf.__geo_interface__)

According to the doc both are returning GeoJson, so can someone explain me the difference or lead me to the appropriate documentation ?


texts: Export PostGIS data from one database to another with multiple geometry fields (ogr2ogr)

texts:
I am trying to copy the data from one database to another database. Both the source and target tables have 2 geometry columns -- a polygon field and a point field. There are NOT NULL constraints on both of these columns.
My ogr2ogr command looks like this
ogr2ogr -f "PostgreSQL" -append -update -sql "select polygon_geom, centre_geom, id, category from sourceschema.table1" PG:"dbname=db1 host=host1 port=5432 user=user password=password" PG:"dbname=db2 host=host2 port=5432 user=user password=password" -nln targetschema.table1

However I can't get ogr to recognise the 2 geometry fields. The error i get is:
ERROR 1: ERROR:  null value in column "geom" violates not-null constraint

How can I copy this data across my 2 databases properly? Even if I export just one geometry column, the NOT NULL constraint on the other column will still prevent me from inserting data. Or do I just lift the not null constraints for the time I'm transferring data across?
EDIT: The source and target tables are not exact copies of one another - the target table has more columns than the source.


texts: Changing temperature range in thermographic map using QGIS

texts: I need to know how to set temperature range from thermographic map to be from 100-120° C using QGIS. In that case I would see just the temperatures from 100-120° C.


texts:
In R, anyone know a method for measuring correlation between raster and spatialpixels, or between two rasters?. I read something about Kulldorff but do not understand how to use it, and maybe it's not the solution.

Ok, I will improve the question. I would like to compare a set of points representing where certain people live, and the number of times people have suffered thefts. In some cases it has not been stolen, in other cases once stolen and in other cases, two or three. For each person the exposure period is one year. I would like to compare these data against a raster population density created by european environment agency, also against a raster containing the proximity in meters to a commercial area. how i can measure the correlation between points and rasters?. At the end I have to study the correlation of a set of data (SpatialPointsDataFrame) against various rasters.

i know classical techniques of inference, and it's not geostadistics are in principle but I wonder if there is something more advanced. I do not understand the correlation with population density where exactly is the point, I would like to understand for example the density (mean, maximum, minimum, percentile ... etc) in a circle. If I do this by iterative methods can reach the same conclusion, creating rasters that soften the density of population, with formula. i know the focal methods of r raster package. But what I want to know is if there is a method that estimates the circle. A person does not move just right next to your home, it has a radius of action in which he lives. That's the circle I want to know it's like a cluster