texts:
I need to install PostGIS on Solaris, but at the moment of installing I have this error:

  database=# create extension postgis; ERROR:  could not load library
  "/opt/csw/lib/64/postgresql/93/rtpostgis-2.1.so": ld.so.1: postgres:
  fatal: relocation error: file
  /opt/csw/lib/64/postgresql/93/rtpostgis-2.1.so: symbol
  GDALApproxTransform: referenced symbol not found

The installation steps I followed:

# pkgadd -d http://get.opencsw.org/now
# /opt/csw/bin/pkgutil -U
# /opt/csw/bin/pkgutil -y -i postgresql93_server
# /opt/csw/bin/pkgutil -y -i postgresql93_client
# /opt/csw/bin/pkgutil -y -i postgis
su - posrgres
$cd /opt/csw/bin/
$./initdb\-93 -D /opt/bads0001_data/datacsw/
$./pg_ctl\-93 -D /opt/bads0001_data/datacsw/ -l /opt/postgres/server.log -w start

Then I started postgres, created a database and created the extension:

Database = # create extension postgis;


texts: How to calculate forest area of a bitmap (jpeg) map?

texts: I have a map of 1:50,000 scale map in .jpg format. Can i calculate the land area of forest,lakes etc from arcmap.Anybody can give me the step to do it?  And I want to know what is the coordinate system for sri lankan 1:50000 ,80cmx50cm map?


texts:
I'm managing a large QGIS project file that connect to several postgis layers.

Since this QGIS project file is used by many people, we set up a authentication config using the QGIS authentication system. Each layer of the project comes with an authentication number (let's say 1111111).

Whenever I need to add a new layer to this project, I have to manually enter the authentification number in the project file. So I edit the .qgs project file with a text editor and add authcfg=1111111 in 2 places, first in the <layer-tree-layer>layer definition and then in the <datasource>.

I find this quite cumbersome and I'd like my customers could do it by themselves without editing the qgs project file or using pyqgis. Is there a graphical user interface way to add this authcfg=1111111 in any layer of a QGIS project?

When looking at the layer properties, we can see this information (in the Information tab, for instance dbname='mydb' host=xxx.xxx.xxx.xxx port=5432 sslmode=disable authcfg=1111111 key='layer' srid=31370 type=Polygon checkPrimaryKeyUnicity='1' table="carto"."layer" (geom)) but there is no way to edit it.


texts: QGIS Numerical Vertex Edit - anyone else finding it doesn't work?

texts:
The QGIS Numerical Vertex Edit plug-in used to work fine, but stopped working for me around about QGIS 2.6. I now use QGIS 2.8.1 Windows 64 bit.

The plug-in no longer seems able to see points or vertices on editable layers. Instead, it reports a Python code error: "AttributeError: 'NoneType' object has no attribute 'toBool'".

Uninstalling and re-installing the plug-in has no effect.

Is this just me being silly, or is it a problem others are finding too?


texts: How to setup 52°North WPS with GRASS backend under Windows and Linux?

texts:
I followed tutorials TutorialBackendGRASSWin and TutorialBackendWpsGRASSLinux to setup 52°North WPS with GRASS backend under Windows and Linux (CentOS7), but result of GetCapabilities request does not contain any GRASS algorithms.

My configuration is

GISRC_Dir   D:\Program Files\GRASS GIS 7.2.0\.grassrc72
Grass_Home  D:\Program Files\GRASS GIS 7.2.0
ModuleStarter_Home   D:\Programs\wps-grass-bridge\gms
Python_Home   D:\Program Files\Python2.7.9
Python_Path   D:\Program Files\Python2.7.9
TMP_Dir  D:\Programs\tmp\grass_tmp

and under linux:

GISRC_Dir   /home/houzw/.grass7/rc
Grass_Home  /usr/lib64/grass74
ModuleStarter_Home  /opt/soft/wps-grass-bridge/gms/
Python_Home  /usr/bin/
Python_Path   /usr/bin/python2.7
TMP_Dir  /home/houzw/tmp/grass_tmp

Any suggestions?


texts:
The geometry of the coordinates are defined inside a shapefile.
Without referencing a CRS the coordinates have only a little meaning.
Is the CRS defined inside the .dbf, or somewhere else?


texts: I want to plot gps pts on qgis (version 2.14.1). I have added the vector layer of SE Asian countries, and added the delimited text layer of my gps pts which included species name, lat and lon. Unfortunately the two layers dont overlap at all..... I have used the same projection system for both layers (WGS 84 Pseudo Merctor), and I have checked the gps pts using the coordinate capture function in qgis, it gives the similar gps pts for that area i have in the delimited text document. How can I make them overlap.....?


texts: QGIS connection to PostGIS errors intermittently

texts:
I am receiving an error message in QGIS about my layer in PostGIS being invalid or the connection to the database terminating.

dbname='x' host=x port=5432 user='x' password='x' sslmode=disable key='""' srid=27700 type=LineStringZ table="x"."x" (wkb_geometry) sql= is an invalid layer - not loaded

Erroneous query: SELECT * FROM "x"."x" LIMIT 1 returned 7 [server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request.]
Unable to access the "x"."x" relation. The error message from the database was: server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request.

I am using QGIS 2.14.15 64bit LTR on a Windows 7 laptop and PostGIS 9.6 on a remote Windows 2012 server, but received similar errors using 2.18 and PostGIS 9.4.

The connection to the remote server is still active as I have a ping test running but the response times change from 1/2ms up to ~680ms when trying to access a simple data layer.

The data in the PostGIS database is spatially indexed and the table is VACUUM ANALYZED and each table has a Primary Key. So I don't think its the way the data is stored.

The real problem is that it does not happen every time, if I start a new project and add the same layers in the same way QGIS loads the data successfully.

Has anyone encountered this before?


texts: How to read a raster value table (VAT) in QGIS?

texts:
By default, QGIS does not seem to recognize "Value Tables" (VAT) the way ArcGIS does.  So far I cannot find a way to represent the pixel values discretely, or apply a "legend" to the layer. Is there something that can be done to associate the VAT with the raster in QGIS? Ultimately I'd like to symbolize and see the joined values when I use the "Identify" tool on a pixel?

For example, I've downloaded a landcover GeoTIFF from the NRCS that contains a single "Pixel Value" field, which represents the type of landcover.  In addition to the GeoTIFF, the authors included a "Value table" (<filename>.vat.dbf), which essentially is "joined" to the raster to give a plain English description of the "Pixel Value", as well as RGB values.  There are 17 discrete values in the VAT, but a small sample looks like this:

Value   Count   Red Green   Blue    Land_Cover
0   299079  0.00000000000   0.00000000000   0.00000000000   Unclassified
11  3896533 0.27843137255   0.41960784314   0.62745098039   Open Water
12  86735   0.81960784314   0.86666666667   0.97647058824   Perennial Snow/Ice
21  4527275 0.86666666667   0.78823529412   0.78823529412   Developed, Open Space

This data can be downloaded from the "National Land Cover Dataset by State" at https://datagateway.nrcs.usda.gov/GDGHome_DirectDownLoad.aspx


texts: How to update extent via sql (st_geometry) from ArcGIS for Desktop?

texts:
how to update extent via sql (st_geometry) using arcgis 10.2

i've noticed that if one inserts a geometry, let's say a point, into a table via st_geometry, the corresponding table extent is not updated.

for instance:

INSERT INTO geo_table(shape) VALUES ( sde.st_geometry('point(-77.80 5.43)', 4686) );

does nothing tho geo_table's extent

is there a way to programatically or automatically update the feature extent?

My underlying db is oracle 11g.


texts: Seeking Metadata for MapQuest Light (OSM) Basemap?

texts:
Can anyone direct me to a link that has metadata for a basemap called MapQuest Light (OSM)?

To view the basemap, it can be found at this website:

https://mc.bbbike.org/mc/

Select the drop down and choose MapQuest Light (OSM).

I haven't been able to locate any metadata or any specifics on this basemap.


texts: Cumulative Rainfall with GPM between dates

texts:
I am trying to generate a cumulative rainfall map between two dates using the GSMaP satellite.
I don't know how to do the simple sum of the information in that band "hourlyPrecipRate".
Anyway, if someone comes up with another simpler idea or way to generate the same product, it is also welcome
Code im using
var lluvia = ee.ImageCollection('JAXA/GPM_L3/GSMaP/v6/operational').filterBounds(Uy)
                  .filter(ee.Filter.date('2020-09-01', '2020-09-15'));
print(lluvia.size());
var precipitation = lluvia.select('hourlyPrecipRate');
var precipitationVis = {min: 0.0, max: 30.0, palette:
      ['1621a2', 'ffffff', '03ffff', '13ff03', 'efff00', 'ffb103', 'ff2300'],};
Map.addLayer(precipitation, precipitationVis, 'Precipitation');


texts: How do I import Excel coordinates with letters into ArcMap?

texts:
I have an Excel document with lots of coordinates in the following format:

lat: 2.03° S
lon: 80.00° W

Is it possible to import this data directly into ArcMap or do I have forcefully to transform it into pure numeric before loading it?


texts:
I delineated my watershed, but I cannot go to Create HRUs. I get this Python error:
line 370, in finishDelineation
 line 3204, in createBasinFile


texts: How to insert rows into a geodatabase bypassing an active edit session

texts:
I'm developing an ArcMap addin with ArcObjects 10.3.1 SDK that needs to have an active edit session to work.

It creates new rows after a check process and stores them in a datatable into a file Geodatabase.

Like that:

// Initialize new row
errorRow = errorsTable.CreateRow();
// Fill row
...
// Commiting the new feature storage
errorRow.Store();
// Iterate over all check results then save edit session
((IWorkspaceEdit)m_featureWorkspace).StopEditing(true);
((IWorkspaceEdit)m_featureWorkspace).StartEditing(true);

My problem is I don't want the addin to rely on a programmatical save edits, since the user might be running other processes at this same edit session.

I then tried to use the method ExecuteSQL from IWorkspace interface in hopes it would turn to be a direct insertion bypassing the edit session, but with no avail.

string sqlStatement = string.Format(new
    System.Globalization.CultureInfo("en-US"), "INSERT INTO {0} VALUES (...);", ...);
((IWorkspace)m_featureWorkspace).ExecuteSQL(sqlStatement);

// Needs a save edits
((IWorkspaceEdit)m_featureWorkspace).StopEditing(true);
((IWorkspaceEdit)m_featureWorkspace).StartEditing(true);

Is there any way to programatically bypass an active edit session to insert rows into the database without having to mandatorily save a whole active edit session?


texts: Convert netcdf file to tiff (with spatial referencing information preserved)

texts:
I was trying to convert a netcdf file (~5 GB in size) to a tiff format using both Gdal_translate and ENVI. Was successful in ENVI but I'm missing spatial information. Using gdal_translate (gdal_translate - sds file.nc file.tiff), it looks like file is too heavy as it's taking long. I used QGIS too but there was a slight spatial shift in the two images.

I've checked similar past Q/Q but none seems to give me a solution. Any better idea out there?


texts: How do you get access to a Network Analyst layer item in ArcPy?

texts:
I have a Python script that I'm working on.  I have created a Closest Facility layer (in memory).  I add facilities.  I add incidents.  I perform the Solve.  These all complete.  The only problem is, there doesn't appear to be a way to access any of the results.

I have gotten a describe object off the Network Analysis layer.  I got the children of the network analysis layer.  I can get the name of each child, but that is the extent.  Each child is supposed to be a feature layer, but no layer operations work on any of them: "Error in executing tool".  I can get the dataset object for each layer.  Each dataset object calls itself a Feature Class.  I cannot get any Feature Class operations to work on these "Feature Classes" either.  I get the same stupid error.

The documentation on implementing Network Analysis work in Python is woefully incomplete.

How can I gain access to the results of a solve?  I just need something I can feed into the arcpy.GetCount tool, nothing else.


texts:
Using PostgreSQL 9.6 and osm2pgrouting 2.2 I am not able to let osm2pgrouting work.
Starting from the command line, I get always some mistakes. I think I tried everything, and am getting a bit frustrated. Can anybody help?

Path of osm2pgrouting: C:\Program Files\Postgresql\9.6\bin\
Path of the OSM file: C:\nederland_osm
 Name of the OSM file: netherlands-latest.osm

What would be he right command?
For instance I have tried:

osm2pgrouting -f C:\nederland_osm\netherlands-latest.osm -d pgr --port=5432 --schema=ospr -c C:\Program Files\PostgreSQL\9.6\bin\mapconfig_for_cars.xml


texts:
How should I use GnssLogger output with rtklib to compute the location?

rtklib (rekrcv) gets RTCM as input, and GnssLogger output is proprietary.

How do I connect these 2 tools?


texts:
I am trying to figure out the workflow from ArcMap to ArcGIS online/Collector. I am running ArcGIS 10.2.2, using a Samsung Galaxy Note 10.1 (Android 4.3, JB)

I am able to use the share as option in ArcMap and then see my map on ArcGIS online, but I cannot see it in the Collector.


texts: query doesn't return way based on related nodes

texts:
Way 445962072 has 5 related nodes. If I query on two of more of these nodes, the way isn't returned. The query I used is

node(id:8093775,8093776)->.allnodes;
way(bn.allnodes)->.ways;
foreach .ways -> .singleway (
  node.allnodes(w.singleway);
  way.singleway(bn)(if:count(nodes) == allnodes.count(nodes));
  out geom;
);

I checked the relationship in JOSM but I see nothing wrong.

Is there some kind of error in the overpass API or am I doing something wrong?


texts:
When I learned View Animation of OpenLayers I encountered a part of the code that I did not understand.

The source address is http://openlayers.org/en/latest/examples/animation.html.

  function flyTo(location, done) {
    var duration = 2000;
    var zoom = view.getZoom();
    var parts = 2;
    var called = false;
    function callback(complete) {
      --parts;
      if (called) {
        return;
      }
      if (parts === 0 || !complete) {
        called = true;
        done(complete);
      }
    }
    view.animate({
      center: location,
      duration: duration
    }, callback);
    view.animate({
      zoom: zoom - 1,
      duration: duration / 2
    }, {
      zoom: zoom,
      duration: duration / 2
    }, callback);
  }

What does "parts" and "called" mean? I changed "parts" value to 1 or 3 and did not see any change. It could also execute this method when I deleted the "callback".


texts: Getting Google Earth Plugin to work using OpenGeo suite-sdk

texts:
I am learning to make a web GIS using OpenGeo Suite-SDK. I have been trying to get the google earth plugin to work but I still fail to make it. I read from http://dev.horizon.opengeo.org/opengeo-docs/sdk-api/lib/plugins/GoogleEarth.html, that it can work if portalItems of gxp.Viewer is set up in certain way.

I would like to ask you where should I put portalItems? Should I replace items: with portalItems: ?

Thank you.


texts: Can someone help me identify this part of the map?

texts:
I'm sure 1 is a road, but what are those bumps on the side?
I'm guessing 2 is a footpath.
I have no idea what 3 is, if you don't know what it is, fine, let's leave it at that. I searched for what might be 4 and my best guess is that it is some kind of embankment.

It's a German map of Memel city around year 1921-1945

This is the place where I live now, I can literally see these trees still standing along side what is now paved road from my home window, the trees are huge now, probably 15 meters high, I found older maps of this location like 1890-1910 and the trees are still marked on the side of the road. It's quite interesting to find out more about the history of the locaction you are living in.

And to add more about #2, I know this location pretty good and I know that there is a drainage way or sewerage coming out right in to the river and I'm pretty sure it's that straight diagonal line right above and slightly to the left of where the #2 is marked, or maybe my distance calculation is wrong and this is not that drainage way I'm talking about.


texts: I have a large number of raster files I'm working on. I need to figure out how each of the files was processed from. I have a composite land cover map and would like to view the file names and locations that were used to create the composite. Does anyone know of a way to display such information? I am doing most my work in ERDAS.


texts: Geostatistical Analyst raster export looks completely different

texts:
I'm having trouble trying to re-create how a Kriged layer looks when interpolated using Geostatistical Analyst. I like the level of generalization (smoothness) of the filled contours in the "temporary" GA layer prior to export, but when I "Export to Raster" I get a jagged pixelated raster.

It doesn't seem to make a difference whether I use a large (50m) or small (20m) cell size. Here's an example, with both the GA and raster layers at the same contour interval.

Are there other settings I should be changing for export?

Geostatistical layer (smooth contours):

Raster export (jagged contours):


texts: How to get the map canvas CRS in EPSG code?

texts:
This is probably a simple request but I cannot find a way around it:

how can I read from python the map canvas CRS?

I know how to set it up:

canvas = self.iface.mapCanvas()
canvas.mapRenderer().setProjectionsEnabled(True)
canvas.mapRenderer().setDestinationCrs(QgsCoordinateReferenceSystem(EPSG_CODE))

But I want to do that ONLY if I need it:

canvas = self.iface.mapCanvas()
canCRS = (????)
wgsCRS = QgsCoordinateReferenceSystem(4326)
bBox = canvas.extent()

if canCRS == wgsCRS:
  # get get lat long of canvas extent
  lon = bBox.xMinimum()
  lat = bBox.yMinimum()
  lonMax = bBox.xMaximum()
  latMax = bBox.yMaximum()

  return lon, lat, lonMax, latMax

else:
  # set map canvas CRS and get lat long of the extent
  canvas.mapRenderer().setProjectionsEnabled(True)
  canvas.mapRenderer().setDestinationCrs(wgsCRS)
  lon = bBox.xMinimum()
  lat = bBox.yMinimum()
  lonMax = bBox.xMaximum()
  latMax = bBox.yMaximum()

  return lon, lat, lonMax, latMax

How do I get the map canvas CRS in EPSG code so I can compare it with QgsCoordinateReferenceSystem(4326)? Which method should I use?


texts:
Can't define options for source attribution. What is the right way to do this?

Tried this two approaches> (My attribution does not change: is open and with default labels )

 var tile_photo = new ol.layer.Tile({
        source: new ol.source.TileWMS({
            attributions: [
                new ol.Attribution({
                    html: 'TEXT',
                    collapsed:true,
                    tipLabel:'My attribution'
                })
            ],
           ...............

        })
});

and

source: new ol.source.TileWMS({
            attributions: [
                new ol.Attribution({
                    html: 'TEXT',
                    options: {
                        collapsible: true,
                        label: 'A',
                        collapsed: true,
                        tipLabel: 'yooo'
                    }
                })
            ],
.........


texts:
My requirement is that, say I'm given a MGRS grid (100mX100m), I now need the IDs of all the 8 MGRS grids around the one that was given.

One way that is being suggested is as follows.

Compute the lat-long for the given MGRS block
Move 100m in each of the eight direction and find the MGRS block of new lat-long

Though the above method is full-proof (or so to speak), is highly inefficient for my use case.

Is there any other method?

I'm OK, with little bit of hard-coding or maintaining a reference dump (but not too huge, like for all the MGRS).


texts: QDockWidget not showing content at first sight

texts:
I'm loading the QDockWidget and it does load fine and has the content but it seems that doesn't have a fixed size that avoids it's content to be hidden once loaded.

this is how it looks when is loaded:

and this is how it looks when manually drag it open (and how should look when loaded):

code:

    self.mdo = QMdiArea()
    self.buttons = QDockWidget('buttons', self.mdo)
    self.buttonsreen = QWidget()
    self.buttonsreen.resize(400,300)
    self.buttonsreen.setWindowTitle('direccion')

    self.btnfront = QPushButton('adelante', self.buttonsreen)
    self.btnfront.setToolTip('avanza una foto')
    self.btnfront.resize(self.btnfront.sizeHint())
    self.btnfront.move(200, 0)
    self.btnfront.clicked.connect(frontbutton)

    self.btnback = QPushButton('atras', self.buttonsreen)
    self.btnback.setToolTip('retrocede una foto')
    self.btnback.resize(self.btnback.sizeHint())
    self.btnback.move(0,0)
    self.btnback.clicked.connect(backbutton)
    self.buttons.setWidget(self.buttonsreen)
    self.iface.addDockWidget(Qt.RightDockWidgetArea, self.buttons)

How is it forced to open with that specific size and how do I avoid other widgets to hide the buttons?


texts: Google Earth Engine: set band as property without reducing

texts:
I have a function that takes an ImageCollection and sets a mean value as a property for another ImageCollection.
var DHW = HS_SSTA_7d.map(function(im) {
                    var res = im.reduceRegion(ee.Reducer.mean(), reefs_500, 500);
                    // calc mean to be called and set as property
                    return im.set("sst_mean", res.get("sst"))});

I then use this to filter out values great than 1 from my ImageCollection.
 var DHW_non_null = DHW.filter(ee.Filter.notNull(["sst_mean"]))
                    .filterMetadata("sst_mean", "greater_than", 1);

Is there a way of setting the band value as a property without reducing it, so it can be filtered? Basically I want to remove any images/pixels which are great than one. I tried to set the band as a property using the two methods below but it didn't seem to work.
 var DHW = HS_SSTA_7d.map(function(im) {
                    return im.set("sst_mean", im.get("sst"))});

 var DHW1 = ee.ImageCollection(HS_SSTA_7d_AsAList.map(function(im){
     var sst = ee.Image(im).get('sst');
     return ee.Image(im).set("sst_mean", sst);
     }));

Is the right way of doing things, or is there a way of filtering your data without setting the band values as a property? A link to my full code ishere


texts: Cartodb: How can I prevent edge-spanning polygons from wrapping in the wrong direction?

texts:
When using Cartodb to layer polygons (craters on Mercury) on top of a user-defined (via Mapbox) basemap, features (craters/polygons) that span the edge of the basemap are extended into bands that wrap the planet/map and exclude the crater they should encircle.

Is there an elegant way to fix this? Here's a link to the visualisation: Edge Spanning Polygon Anomalies


texts:
I have a SpatiaLite Layer in QGIS with an automatic increment. It worked well yesterday, counting the primary key without me doing anything about it. Today it has a problem and doesnt save. (error-message at the end of the post.) I think it has something to do with the primary key, because if I write it manually or delete the prefilled field (by clicking on the X in the red circle) it creates the primary field correctly and I can save the object.

Do you know, what can be the reason of this behavior? Why it worked one day and didnt the other?
Error:
Konnte Änderungen am Layer Layername nicht festschreiben

Fehler: FEHLER: Ein Objekt nicht hinzugefügt.

  Datenanbieterfehler:
      SQLite-Fehler:unbekannte Ursache
    SQL: INSERT INTO "Layername"("Attribut1",,"Attribut2","Attribut3","Attribut4","Attribut5"[...]) VALUES (GeomFromWKB(?, 4647),,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)


texts:
The OpenLayers TransitionEffect='resize' property is not working while using GeoWebcache service of GeoServer

var demolayer = new OpenLayers.Layer.WMS(
    "Eg", "http://localhost:8080/geoserver/gwc/service/wms",
    {
             layers: 'Eg',
             format: 'image/gif' ,
             tiled: true,
             tilesorigin: [29.06213671874999, 28.912181118327]
            },
            {attribution: '&copy;copy rights',
             tileSize: new OpenLayers.Size(256,256)},
            { transitionEffect: 'resize'
            }

          );


texts:
I need to alter all of the field names through multiple feature classes. I have a pretty good idea of which tools to use but I'm not sure how to loop them through each feature class and each field. This will be completed on a file gdb. I've tried it different ways and usually get a invalid parameter error on the alter field tool.

arcpy.env.workspace = r'C:\Users\Desktop\Geodatabase.gdb\'

arcpy.env.overwriteOutput = True

fcList = arcpy.ListFeatureClasses()

for fc in fcList:

    fieldList = arcpy.ListFields(fc)

    for field in fieldList:
        arcpy.AlterField_management(fc, field, field.name.upper(), "")


texts: mapCanvas.saveAsImage not functioning as expected in QGIS 1.8

texts:
I have a plugin for exporting maps as PNG images.  I believe this code was working correctly within 1.6 (but I cannot guarantee I haven't made another change that would have broken it there, too).

Basically, I load a set of base map features and then loop through a set of point layers that get applied and the whole thing is exported as an image.  I'm not getting the full canvas at all, but only a single attribute loaded from the base map and nothing from the point layers.  (bad result, expected result)

In the process of debugging this, I discovered a curious fact.  If I include a QMessageBox.information right before I do the export, it works correctly!

Doesn't work:

    self.mapCanvas.resize(QSize(394,350))
    self.mapCanvas.zoomToFullExtent()
    currentImagePath = theExportPath + folder
    currentImageName = attribute.replace(' ', '_') + ".png"
    self.mapCanvas.saveAsImage(currentImagePath + "/" + currentImageName)

Does work:

    self.mapCanvas.resize(QSize(394,350))
    self.mapCanvas.zoomToFullExtent()
    QMessageBox.information(self.iface.mainWindow(),"Debug","Break")
    currentImagePath = theExportPath + folder
    currentImageName = attribute.replace(' ', '_') + ".png"
    self.mapCanvas.saveAsImage(currentImagePath + "/" + currentImageName)

I tried to add a simple self.iface.mainWindow() in place of the message box but that didn't do the trick.  I'm thinking there is some kind of refresh I could do, too, but I tried mapCanvas.refresh() and mapCanvas.updateMap() and these in combination with mainWindow() but could get nothing to work.

Did this change in 1.8?  Any suggestions to make it work?  Including the QMessageBox call will get me going but I have to press "OK" for each map to be exported.  With all the export combinations, I'd be doing this more than 1000 times!

Thanks!

B


texts: Looping through a folder with Cell Statistics

texts:
I have a folder with Day 1 Min, Day 1 Max and Day 2 Min, Day 2 Max...Day X Min, Day X Max rasters in it. I want to loop through this folder and use cell statistics on them to sum each day's min/max values (i.e. Day 1 Min + Day 1 Max).

I tried the following and got no results. Any pointers? How do I ensure that Cell Stats is summing the same days and not across multiple days?

MainFolder = r"C:\Users\uma.bhandaram\Desktop\2015\RasterCon2015"
for (path, dirs, files) in os.walk(MainFolder):
    for dir in dirs:
        env.workspace = os.path.join(path, dir)
        listRstrs = arcpy.ListRasters("Con.tif")
        for raster in listRstrs:
            rasterlist = []
            rasterlist.append(raster)
            outCellStats = CellStatistics(rasterlist, "SUM", "DATA")
            outCellStats.save(os.path.join(path, dir) + "Check.tif")


texts: Querying PostgreSQL DB with Google "get.bounds()" coordinates

texts:
I am trying to only display markers on a Google Map that are in the current map bounds and then update the markers when the map moves. The difficulty I am running into is querying my database to pull out and return the data to the front end.
Right now it is just returning an empty array.
I'm not super familiar with DjangoGIS but from following a raft of SO guides and the docs I believe I am on the right track...
Here is my database query (using Django):
def marker_info(request):

    template_name = 'testingland/electra.html'
    neLat = request.GET.get('neLat', None)
    neLng = request.GET.get('neLng', None)
    swLat = request.GET.get('swLat', None)
    swLng = request.GET.get('swLng', None)
    ne = (neLat, neLng)
    sw = (swLat, swLng)

    xmin = sw[1]
    ymin = ne[0]
    xmax = sw[1]
    ymax = ne[0]
    bbox = (xmin, ymin, xmax, ymax)

    geom = Polygon.from_bbox(bbox)

    qs = mapCafes.objects.filter(geolocation__coveredby=geom)[0:20]
    return JsonResponse([
            [cafe.cafe_name, cafe.cafe_address, cafe.geolocation.y, cafe.geolocation.x]
            for cafe in qs
    ], safe=False)

And here is the Ajax call that sends the getBounds() data to the backend:
$.ajax({
                type: 'GET',
                url: '/electra/marker_info/',
                data: {
                  'neLat': parseFloat(lat0),
                  'neLng': parseFloat(lng0),
                  'swLat': parseFloat(lat1),
                  'swLng': parseFloat(lng1)
                },
                success: function(data) {
                  setTimeout(function(){

                  console.log(data);

                  }, 3000);
                }
              });
            });


texts:
Previously on the following post:

How to get an extent for Raster using python

A user edited the original Python script by adding the following code:

from arcpy.sa import *

Why did he do this and what exactly is it doing?
I also received an error when I tried running the original script w/o the edit.


texts: GEE in Colab and trying to find CDL JSON collapsable tree

texts:
I have used the Google Earth Engine (GEE) code editor for a while now but I am attempting to shift over to being able to use GEE in Colab.

In GEE code editor I was used to using the Console on the right hand side of the screen to print things. For example, if you load in NASS CDL layers and simply say print a layer like and it would display a collapsable tree in the console with all the properties of the image, like this:

In GEE code editor:

//Select the year out of the years available
var cdl_20xx = ee.Image(ee.ImageCollection("USDA/NASS/CDL").filter(ee.Filter.eq('system:index', '2018')).first()).select('cropland');
print(cdl_20xx);

Resulting in something like this:

But in Colab when I try to do the same thing in Colab it doesn't give me all the information in the string of info it does output and it's difficult to read since it's not formatted in the collapsable tree like in the GEE code editor.

In Colab:

# Import the CDL layers
cdl = ee.ImageCollection("USDA/NASS/CDL")
cdl_20xx = ee.Image(cdl.filter(ee.Filter.eq('system:index', '2018')).first()).select('cropland')
print(cdl_20xx)

Resulting in something like this:

Is there anyway in Colab to recreate this type of collapsable tree found in the GEE code editor?


texts: How to split multiple overlapping points in ArcMap 9.2?

texts: I am using ArcGIS (ArcMap with Info license) 9.2. I have many points that have the same XY coordinates. Is there any method to apply any sort of buffer by which they'll get desegregated at different coordinates??


texts: Predict/estimate point values for unsurveyed areas based on vegetation type

texts:
I have point data from deer surveys and would like to predict values for areas not surveyed based on vegetation type (Grass, Disturbed, Oak, Pine, Mixed etc.)

So far I have dissolved my vegetation layer to combine adjacent polygons and used Spatial Join to combine this layer with my point data. I'm now trying to predict values for polygons with Null values for the pop field (deer seen) and pop_avg field (pop/3 survey nights) based on vegetation type (text field). I'm not really sure what my next step should be if anyone has any suggestions.

Would I need to do the prediction analysis in a program such as R or python to later bring back to map in ArcGIS?


texts: Add halo to label in QGIS print composer with a specific font (using HTML)

texts:
I am using HTML code to buffer a label in QGIS Print Composer, as described in Question 84324.
Sadly, this code also changes the font and I can´t change it back using the font size dialog. I´m not sure what it does, it might just add serifs that I can´t remove, since the font DOES change when I use the font size dialog, but still the output font in the label looks very different from the original "MS Shell Dlg 2" font (compare labels "1 Germany" and "2 and 3 Germany").  I have tried playing around with the code to change the font but couldn´t get the effect I want.

What I actually want: Label "1 Germany", but with a white buffer and in this exact font (MS Shell Dlg 2, size 24)
Code for Label "2 Germany":
2 - Germany

Code for Label "3 Germany": 3 - Germany
How do I set the specific font "MS Shell Dlg 2" with a white halo?
EDIT: Final code as suggested by Thomas:
Germany


texts:
I am getting an error message when atempting to create a connection in ArcCatalog (I'm working under the 10.0 version). The message is : Failed to Connect to the specified server. No ArcSDE server licence found.
Then I Check the Service esri_sde and it has not started, so I try to start it then I get this error message : The ArcSde Service(esri_sde) service on Local Computer started and then stopped. Some services stop automatically if they have no work to do.
I've tried deleting the service then creating it all over again, checked the registry, launched CCleaner.. Rebooted the computer, still the same error
When I check the log files, I got this in the giomgr_esri_sde.log :

Sat Jun 14 16:15:23 2014 - ** Spatial Database I/O Manager **
Sat Jun 14 16:15:23 2014 - SDE System Startup Initiated . . .
Sat Jun 14 16:15:23 2014 - Validated System Paths.
Sat Jun 14 16:15:23 2014 - SDE IOMGR going into background . . .
Sat Jun 14 16:15:23 2014 - System Parameter table 'SERVER_CONFIG' Read.
Sat Jun 14 16:15:24 2014 - Initialized Shared Memory Segment.
Sat Jun 14 16:15:24 2014 -
Error (-327), No ArcSDE server license found.

And in the sde_esri_sde.log :

ArcSDE 10.0  for PostgreSQL Build 685 Fri May 14 12:05:43  2010

Connected to instance . . .
DBMS Connection established...

Error (-327), No ArcSDE server license found.

I don't understand this licence problem! I have already registered and I do have the licence. What could be wrong ?


texts: $area calculation incorrect for equal area projections in QGIS

texts:
I have shapefiles for multiple countries in Europe, with places as individual polygons in each file.

I want to use the field calculator to add a column for each polygon's area, but every time I run the "$area" calculation the number returned is much less than it should be. They are typically off by two orders of magnitude.

I have put these files in every equal area projection I can think of (focusing on ones that use meters as units instead of lat/long), and the numbers are still incorrect. This happens both with OTF enabled and disabled, and when the map units are in km and meters. I've also had this issue both when I define the project CRS or just the CRS for one layer.

I've tried:

-UTM (different zones for each country) EPSG:32231 and EPSG:32631
-EPSG:3408, NSIDC EASE-Grid North
-EPSG:2163 - US National Atlas Equal Area
-EPSG:53012 - Sphere_Eckert_IV
-ETRS89 LAEA (EPSG:3035)


texts: Drawing a polygon in Google Earth using coordinates for each point

texts: Is there an easy way to draw land plots in Google Earth using coordinates for each point of the polygon?


texts: I'm trying to capture all the non-overlapping polygons indicated below using Shapely (given polygons A,B & C).  Moreover, I'm hoping to do so without iteration, testing for intersect etc. The accepted answer to this question expresses the PostGIS method but it would seem that 'union' means different things to different people.


texts:
When I'm using PostGIS for transforming coordinates from WGS 84 (EPSG 4326) to Web Mercator (EPSG 3857) the result for POINT(-180 0) is POINT(-20037508.3427892 -7.08115455161362e-010) and for POINT(180 0) it is POINT(20037508.3427892 -7.08115455161362e-010).

As I understood the Web Mercator projection there is a square that displays a stretched sphere. So when converting from 4326 to 3857 the WGS globe coordinates will be transformed to square raster coordinates. There is a specific formula for that, but the absolute result depends on the given width (height) of the raster square.

At PostGIS it seems there is a width of 40075016.6855784 assumed. Is that just a magic number defined by PostGIS developers or is it a kind of standard value? Is there a standard for -180 => -width / 2 and +180 => +width / 2 or would -180 => 0 and +180 => width also be "OK"? I mean at the end it's just a translation, isn't it?


texts: Converting ArcGIS raster colormap file (*.clr) to QGIS style file (*.qml)

texts:
I have an ArcGIS colormap (*.clr) and I want to open it in QGIS to apply a predefined style.

The *.clr file is really simple, only has four columns representing [value] [red] [green] [blue], as this example:

19 161 161 161
21 152 181 129
22 114 168 144
23 124 142 173

Is there a way to read these columns and convert them in a QGIS style file (*.qml)?


texts:
I frequently check point coordinates for features against mapping and elevation data, which as a workflow is as simple as applying labels to the points and then using Go 2 next feature to cycle through them.
However, the label is always the last thing to render. Typically, I would want to cycle to the next feature after only some of the background context has loaded, but I need to make sure the right point is at the right feature, so have to wait until the label finally loads.
Is there any way to prioritise the draw/render of labels to be first? Or something else that that's causing the labels in this scenario to take so long to show up?


texts: Update Z values of polygon veritices with multiparts and donuts

texts:
I am trying to update Z values of the vertices of the polygon shape. The script bellow works for polygons without multiparts and donuts. If I run this script for polygon shape that contains multiparts and donuts, I get error. How can I make it work?

My script:

import arcpy

fc = r"C:\Scratch\fcTest.shp"

# Get Spatial Reference of dataset
desc = arcpy.Describe(fc)
sr = desc.spatialReference

with arcpy.da.UpdateCursor(fc, ["SHAPE@"]) as cursor:
    for row in cursor:

        # Get Geometry
        geom = row[0]

        # Create an empty array object
        arr = arcpy.Array()

        # Read points, if Z is found to be zero reset it to 1
        for part in geom:
            for pnt in part:
                if not pnt:
                    arr.add(None)
                    continue

                if pnt.Z == 0:
                    pnt.Z = 1.0

                 # Add updated point to Array
                arr.add(pnt)

        # Construct new polygon geometry from array whilst setting spatial reference and indicating it has Z
        newpoly = arcpy.Polygon(arr,sr,True)

        #Update row
        cursor.updateRow([newpoly])

Error:

 Traceback (most recent call last):
 File "C:\Scratch\fcTest.py", line 21, in <module>
    if pnt.Z == 0:
  AttributeError: 'NoneType' object has no attribute 'Z'
   >>>


texts: Earth Engine API (Python) Retrieves script found at a given path as a module not working

texts:
Earth Engine API says that require(path) returns an object that represents exported members from the required module.

When I try to import ee-palettes with:

palettes = require("users/gena/packages:palettes")
palette = palettes.misc.tol_rainbow[9]
print("palette",palette)

I get this error:

NameErrorTraceback (most recent call last)
<ipython-input-14-2d55998c0e3e> in <module>()
      1
----> 2 palettes = require("users/gena/packages:palettes")
      3 palette = palettes.misc.tol_rainbow[9]
      4 print("palette",palette)

NameError: name 'require' is not defined

Maybe is it only working with JavaScript because in the Playground Editor it works ?


texts: What do I need in order to show offline map (tile cached based) of area from OSM using Openlayers?

texts:
I want to make an offline map with certain zoom levels of an area from OSM (preferably keeping the styles of OSM).
Client will use OpenLayers , If needed I can install Geoserver/Mapserver and MS-SQL Express.
What will be the easiest way to such a thing ? Do I need to use XYS layer type or local WMS?
How do I automatically cache the area I need ?


texts: error on arcpy.FeatureSet() load from feature service: cannot open table for load

texts:
I am trying to pull data from a feature service into a feature set, and the following was working perfect:

fsURL = baseURL + query
fs = arcpy.FeatureSet()
fs.load(fsURL)

but all of a sudden, this same, unchanged code now throws the error:

"RuntimeError: RecordSetObject: Cannot open table for load"

The feature service is in a secure rest end point, that I have working by generating a secure token, and when I print out the URL I want to hit, I can see the data I need, but for some reason now get that error.  I had this working previously, and as far as I know no code in this area, no changes to the database,  and no software has changed to cause this to now not work.

I've researched this, and found other similar issues, with either no resolution, or discovered a software version change, which is not the case here.


texts:
I installed GeoServer on server 172.20.100.13 and i also publish my OpenLayers application on same server. when i make the request to this server for accessing the page like, (http://172.20.100.13/Myapp/layers.aspx), then WMS and WFS Layers does not display over Google Map. But the same application with geoserver installed on localhost works fine.

As i understand from different forums, I need to configure Proxy.cgi with IIS to fix this problem and then use it as:
Openlayers.ProxyHost = "/cgi-bin/proxy.py?url"

I want to know, Am i right or wrong in my understanding OR i am making a mistake.

If i am right, Then can anybody please tell me how i configure Proxy.cgi with IIS ?  If some usefuk link available to fix this, then it will be very good for me.


texts:
Does anyone know open source CAD software (like edit, update cad files and attach external information, create topology etc.)

Researching on internet also (Going through Kosmo Desktop, DraftSight etc.)


texts: Converting coordinate decimal degree of polyline to UTM using ArcMap

texts:
Currently I have a polyline shapefile that has decimal degree coordinate (Geographic Coordinate System), however I am going to change it to UTM (Projected Coordinate System) using ArcMap.

Does ArcMap has a tool to convert this coordinate system?


texts: Using Spyder IDE to develop python for Grass GIS, get 'ImportError: No module named grass.script'

texts:
I am trying to use Spyder IDE to develop a python script using python library from grass-6.4.3. I run the script below, and get

ImportError: No module named grass.script

I am using python 2.7, installed in Grass, Spyder, + native install (C:\python27) and my OS is 64-bit Windows 7.

This seems to be a common problem, but I have tried all the recommended fixes outlined below. I have even tried installing on a laptop running 32-bit windows 7 and get the same error.

I read the Grass wiki: page:https://grasswiki.osgeo.org/wiki/GRASS_and_Python#External_Python_editors_.28IDE.29

Then I tried to follow this Q&A to the letter: Problem with python script to control GRASS GIS from outside - How to import grass.script under Win 8.1?

My python script:

import sys
import os

gisbase = os.environ['GISBASE'] = 'C:\OSGeo4W64\apps\grass\grass-6.4.3'
gisdbase = os.path.normpath('C:/Users/Ryan/grassdata')
location = 'newLocation'
mapset = 'Ryan'
GISRC = os.path.normpath('C:/Users/Ryan/AppData/Roaming/GRASS6/grassrc6')
LD_LIBRARY_PATH = 'C:\OSGeo4W64\apps\grass\grass-6.4.3\lib'
PATH = 'C:\Python27';'C:\Users\Ryan\grassdata';'C:\Users\Ryan\AppData\Roaming\GRASS6\grassrc6';'C:\OSGeo4W64\bin';'C:\OSGeo4W64\apps\grass\grass-6.4.3';'C:\OSGeo4W64\apps\grass\grass-6.4.3\lib';'C:\OSGeo4W64\apps\grass\grass-6.4.3\etc\python';'C:\OSGeo4W64\apps\grass\grass-6.4.3\etc';'C:\OSGeo4W64\apps\grass\grass-6.4.3\bin';'C:\OSGeo4W64\apps\Python27';'C:\OSGeo4W64\apps\Python27\Lib\site-packages';'C:\OSGeo4W64\apps\msys';'C:\OSGeo4W64\apps\grass\grass-6.4.3\scripts'
PYTHONLIB = 'C:\Python27'
PYTHONPATH = 'C:\OSGeo4W64\apps\grass\grass-6.4.3\etc\python'
GRASS_SH = 'C:\OSGeo4W64\apps\msys\bin\sh.exe'

sys.path.append(os.path.join(os.environ['GISBASE'], 'etc', 'python'))
sys.path.append('C:\OSGeo4W\bin')
sys.path.append('C:\OSGeo4W64\apps\grass\grass-6.4.3\etc')
sys.path.append('C:\OSGeo4W64\apps\grass\grass-6.4.3\etc\python')
sys.path.append('C:\OSGeo4W64\apps\grass\grass-6.4.3\lib')
sys.path.append('C:\OSGeo4W64\apps\grass\grass-6.4.3\bin')

import grass.script as grass
import grass.script.setup as gsetup

gsetup.init(gisbase, gisdb, location, mapset)

I have added my environment variables manually into system settings (copied here):

GISBASE = C:\OSGeo4W64\apps\grass\grass-6.4.3
GISDBASE = C:\Users\Ryan\grassdata
GISRC = C:\Users\Ryan\AppData\Roaming\GRASS6\grassrc6
GRASS_SH = C:\OSGeo4W\apps\msys\bin\sh.exe
LD_LIBRARY_PATH = C:\OSGeo4W64\apps\grass\grass-6.4.3\lib
PATH = C:\Python27;C:\Users\Ryan\grassdata;C:\Users\Ryan\AppData\Roaming\GRASS6\grassrc6;C:\OSGeo4W64\bin;C:\OSGeo4W64\apps\grass\grass-6.4.3;C:\OSGeo4W64\apps\grass\grass-6.4.3\lib;C:\OSGeo4W64\apps\grass\grass-6.4.3\etc\python;C:\OSGeo4W64\apps\grass\grass-6.4.3\etc;C:\OSGeo4W64\apps\grass\grass-6.4.3\bin;C:\OSGeo4W64\apps\Python27;C:\OSGeo4W64\apps\Python27\Lib\site-packages;C:\OSGeo4W64\apps\msys;C:\OSGeo4W64\apps\grass\grass-6.4.3\scripts
PYTHONLIB = C:\Python27
PYTHONPATH = C:\OSGeo4W\apps\grass\grass-6.4.3\etc\python'

I have added a file called 'grass.pth' to: C:\OSGeo4W\apps\python27\lib\site-packages. The file contains:

C:\OSGeo4W\apps\grass\grass-6.4.3\etc\python
C:\OSGeo4W\bin

I have started grass interactively to create a 'grassrc6' file, which is located here: C:\Users\Ryan\AppData\Roaming\GRASS6\grassrc6

I am not sure what else I can try, I am certain something must be wrong with the environment variables, but I wouldn't know what to look for.

Also, is it necessary to define the environment variables in both the python script, and manually in system settings?


texts: How to typecast from MULTIPOLYGON to MULTIPOLYGONM (force XY multipolygon into XYM)

texts:
I need to merge several databases, where the destination table has a constraint checking for MULTIPOLYGONM in the geometry column.

At some source tables, the geometry column is in the XY form (MULTIPOLYGON), others have the correct XYM form (MULTIPOLYGONM).

How can I force MULTIPOLYGON into MULTIPOLYGONM? Is this what ST_Force_3DM is supposed to do?


texts: Matching OBJECTID with value using VBA in ArcMap?

texts:
I got a building layer. And i got a table that contains 2 fields named SDE_OBJECT_ID and DOOR_NO. This table is not spatial table, it's Oracle table which i can join with my building layer if i want and i can use building layer's OID field with this table's "SDE_OBJECT_ID" field. What i try to do is to select a building with my mouse and then running this tool to show all the door numbers that is located in this Oracle table. There can be 1+ door numbers so i am listing them in my listbox as you can see.

The code works if i change

Dim FeatOID As String
FeatOID = "SDE_OBJECT_ID = '" & pFeature.OID & "'"

to

Dim FeatOID As String
FeatOID = "SDE_OBJECT_ID = 48565"

i mean it works if i type an OBJECTID number but it doesnt work while i try to grap the OBJECTID of the selected feature.

I also tried to do this

pQueryFilter.WhereClause = "SDE_OBJECT_ID = '" + pFeature.Value(pFeature.Fields.FindField("OBJECTID")) +"' "

but it doesn't work...

Here is my code:

Private Sub CommandButton1_Click()

Dim pMxDoc As IMxDocument
Set pMxDoc = ThisDocument

Dim pMap As IMap
Set pMap = pMxDoc.FocusMap

Dim pFeatureLayer As IFeatureLayer
Set pFeatureLayer = pMap.Layer(2)

Dim pFeatureSelection As IFeatureSelection
Set pFeatureSelection = pFeatureLayer

Dim pFeatureCursor As IFeatureCursor
pFeatureSelection.SelectionSet.Search Nothing, False, pFeatureCursor

Dim pFeature As IFeature
Set pFeature = pFeatureCursor.NextFeature

Do Until pFeature Is Nothing
'MsgBox pFeature.Value(pFeature.Fields.FindField("OBJECTID")) 'it works, shows the OID of the selected feature
 MsgBox pFeature.OID 'it works too
        Set pFeature = pFeatureCursor.NextFeature
    Loop

Dim pTableCollection As ITableCollection
Set pTableCollection = pMap

Dim pTable As ITable

For i = 0 To pTableCollection.TableCount - 1   'i am selecting the Oracle table
Set pTable = pTableCollection.Table(i)
Next i

Dim FeatOID As Long
FeatOID = pFeature.OID

Dim Query As String
Query = "SDE_OBJECT_ID = '" & FeatOID & "'"

Dim pQueryFilter As IQueryFilter
Set pQueryFilter = New QueryFilter

pQueryFilter.WhereClause = Query

Dim pCursor As ICursor
Set pCursor = pTable.Search(pQueryFilter, False)

Dim pRow As IRow
Set pRow = pCursor.NextRow

While Not pRow Is Nothing
        'MsgBox pRow.Value(pRow.Fields.FindField("DOOR_NO"))
        ListBox1.AddItem (pRow.Value(pRow.Fields.FindField("DOOR_NO")))
        Set pRow = pCursor.NextRow
    Wend

End Sub


texts: How to copy layer(s) to clipboard in QGIS 3.0?

texts:
In QGIS 2.18 there was plugin "Copy layers and groups to clipboard". It was allowing just in two clicks to copy/paste layer(s) with style and etc. from one project to another.

Is there something similar in QGIS 3.0?

Animation below shows the plugin in action:


texts: When I save a project to a folder, I get this error message

texts:
I opened QGIS, started a new project, and loaded rasters. Then I saved the project to a folder I had already created. I got the following error message. The same exact message appeared when I closed QGIS, then booted it up again, and opened the same project!

An error occured during execution of following code:
sys.path.append('/Users/greg/Documents/Greg's stuff/GIS/QGIS_projects_I_made')

  File "", line 1
    sys.path.append('/Users/greg/Documents/Greg's stuff/GIS/QGIS_projects_I_made')
                                                ^
SyntaxError: invalid syntax

  Python version:
  2.7.2 (default, Oct 11 2012, 20:14:37)  [GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)]

  QGIS version:
  2.0.1-Dufour 'Dufour', f738351

  Python path:
  ['/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing',
  '/Applications/QGIS.app/Contents/MacOS/../Resources/python',
  '/Users/greg/.qgis2/python', '/Users/greg/.qgis2/python/plugins',
  '/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins',
  '/Library/Frameworks/SQLite3.framework/Versions/B/Python/2.7',
  '/Library/Frameworks/GEOS.framework/Versions/3/Python/2.7',
  '/Library/Python/2.7/site-packages/numpy-override',
  '/Library/Frameworks/GDAL.framework/Versions/1.10/Python/2.7/site-packages',
  '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip',
  '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7',
  '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin',
  '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac',
  '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages',
  '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python',
  '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk',
  '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old',
  '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload',
  '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC',
  '/Library/Python/2.7/site-packages',
  '/Applications/QGIS.app/Contents/Resources/python/plugins/fTools/tools']


texts:
I have a map of stores for a retailer. I am trying to form clusters (of these stores) such that each member of a cluster is at most 5km  away from any other member and any non-member is at least 10 km from any member. I also would like to create a field in the point dataset indicating to which cluster a specific store beongs to. What would be the easiest way to do this?
Thanks


texts:
I have this spatial object:

> polys
Simple feature collection with 24 features and 2 fields
geometry type:  POLYGON
dimension:      XY
bbox:           xmin: 4530000 ymin: 3517000 xmax: 4536000 ymax: 3521000
epsg (SRID):    NA
proj4string:    +proj=laea +lat_0=52 +lon_0=10 +x_0=4321000 +y_0=3210000 +ellps=GRS80 +units=m +no_defs
   Id total                       geometry
1   0     7 POLYGON ((4530000 3517000, ...
2   1     3 POLYGON ((4531000 3517000, ...
3   2     8 POLYGON ((4532000 3517000, ...

It is a polygon geometry type. I would like to save it as a raster file but I still can not manage!

I tried to create a raster with r <- raster(ncols=6, nrows=4) and then to x <- rasterize(polys,r,getCover=TRUE,progress="text") but it can not make it.

Any ideas?


texts: Is it possible to default an output directory for R Scripts in QGIS 3.4.4?

texts:
I am currently running R Scripts through the Processing R Provider plugin on QGIS 3.4.4.

I was wondering if it is possible to to set a default file path for your vector output that is the same as your project home in the QGIS project you have open?

e.g. ##Output=output vector ("Project directory") - I know this doesn't work but hopefully it gives a better idea of what I'm after.

This is so you do not have to browse to your project file every time you want to save your output.


texts: Programmatically exporting composition as image from QGIS?

texts:
QGIS Print Composer has tool "Save As Image" and I found appropriate function in QGIS source code exportCompositionAsImage. Is it possible to get access to existing Print Composer from Python console and perform this operation - export composition as image with composer settings.

UPDATE #1: Thanks to @ndawson. I'm using printPageAsRaster function for printing different combinations of layers created with layerCombinations plugin:

from layerCombinations import classFactory
lc = classFactory(iface)
lc_manager = lc.manager
combinations = lc_manager.combinationsList
composition = iface.activeComposers()[0].composition()
composition_items = composition.items()
for cmb in combinations:
  for item in composition_items:
    if item.type() ==  65641: #this is the type of ComposerMap
      lc_manager.applyCombinationToMap(cmb, item)
  image = composition.printPageAsRaster(0)
  image.save('/home/dr/' + cmb +'.png','png')


texts:
I have a list of zip codes (nearly thousands) which I want to show in qgis. After researching I found that I need to geocode them first into Lat/Long then I can use them to create a layer for qgis.

I have the zip codes in an excel file and I have imported it in sql server 2008.

Here is the table :

Zip
90001
90002
90003
90004

Is there a plugin or an easier way to show these zip's in QGIS?


texts:
I want to get specific users data from OpenStreetMap. I use Overpass API, but I get an error:

overpy.exception.DataIncomplete: ('Data incomplete try to improve the
query to resolve the missing data', 'Resolve missing nodes is
disabled')

The solution from here says to get nodes by the get_nodes(resolve_missing=True) function and parameter, however now I get the error

overpy.exception.OverpassTooManyRequests: Too many requests

Code:
api = overpy.Overpass()
result = api.query("[out:json];way(user:'{}')({}, {}, {}, {})(changed:'{}T{}Z', '{}T{}Z');out;".format(user, max_coords['south'], max_coords['west'], max_coords['north'], max_coords['east'], start_date, start_time, end_date, end_time))
for way in result.ways:
    way_nodes_list = []
    nodes = way.get_nodes(resolve_missing=True)
    for node in nodes:
        way_nodes_list.append((float(node.lon), float(node.lat)))


texts: Extract raster information based on polygon features

texts: I have a population dataset in raster format (each pixel has a value showing number of people in that pixel) and a polygon shapefile with 10 districts. What I need, is to calculate population for each district. I thought it would be easy but I'm having difficulties... I use ArcGIS 10.3. I tried to turn raster to polygon, so that every square resembles a pixel. Then I tried to spatially join the two shapefiles, However, the numbers are wrong.


texts:
Once I load a shapefile, double check my CSR, then Raster>Georeferencer> , nothing happens.  I know this is the point that I should load a file to georeference.  Again, nothing happens.  I have removed all QGIS installs, reloaded both 3.4.14 and 3.8.3 with no luck.  An aquaintance suggested that there may be issue with the  program running against GDAL/OGR 2.4.3.  What ever that means.
What should I do to get the Georeferencer to work?
QGIS version
3.4.14-Madeira
QGIS code revision
QGIS code revision
Compiled against Qt
5.11.2
Running against Qt
5.11.2
Compiled against GDAL/OGR
2.4.3
Running against GDAL/OGR
2.4.3
Compiled against GEOS
3.8.0-CAPI-1.13.1
Running against GEOS
3.8.0-CAPI-1.13.1
PostgreSQL Client Version
11.5
SpatiaLite Version
4.3.0
QWT Version
6.1.3
QScintilla2 Version
2.10.8
Compiled against PROJ
5.2.0
Running against PROJ
Rel. 5.2.0, September 15th, 2018
Active python plugins
AreaAlongVector;
AttributeAssignment;
FeatureGridCreator;
Hotlink;
ImportPhotos;
mmqgis;
qgsAzimuth;
quick_map_services;
shapetools;
SpreadsheetLayers;
db_manager;
MetaSearch;
processing


texts:
I have a geoprocessing service which creates a PDF in this directory on ArcGIS Server:

C:\arcgisserver\directories\arcgisoutput

I can access the file just fine through file explorer, but I need to provide a URL to a web application. I have tried

 http://server_name/arcgis/rest/directories/arcgisoutput/file_name

but I cannot seem to access the arcgisoutput directory through a URL. How do I get to arcgisoutput through a URL?


texts:
I have created a polygon shapefile and the nodes can be seen in edit mode:

and here is the symbology as I have tried to set it (I wanted no fill and red outline):

The polygon doesn't appear on the backdrop.  What am I doing wrong?


texts: Filter layerlist in snapping dock of QGIS3 to show only layers selected in the layer-dock (TOC)

texts:
I would like to filter the layerlist in the "Snapping and Digitizing Options"-Dock so that only layers are shown which are selected in the TOC of the QGIS-Layer-Dock.

At the moment I use a workaround which searches the UI components like

self.iface.mainWindow().findChild(QDockWidget, 'Snapping and Digitizing Options')

This solution seems a bit hacky to me so I like to ask if someone has a better idea to filter the layerlist in the Snapping-Dock?

The goal is to filter 5 or 10 layers at the same time, not only one like it can be done in the filter textfield at the bottom of the snapping-dock.
Here is my code:

    def filter_snapping_list(self, reset):
    global filter_List
    if self.dlg==None:
        self.dlg = self.iface.mainWindow().findChild(QDockWidget, 'Snapping and Digitizing Options')
    snapping_mode = self.dlg.findChildren(QToolButton)[2].text()

    if snapping_mode in ["Advanced", "Erweiterte Konfiguration"]:

        self.treeview = self.iface.mainWindow().findChild(QDockWidget, 'Snapping and Digitizing Options').findChildren(QTreeView)[0]
        self.treecount = self.iface.mainWindow().findChild(QDockWidget, 'Snapping and Digitizing Options').findChildren(QTreeView)[0].model().rowCount()

        for i in range(self.treecount):
            if reset == False:
                if self.iface.mainWindow().findChild(QDockWidget, 'Snapping and Digitizing Options').findChildren(QTreeView)[0].model().index(i,0).data() in filter_List:
                    self.iface.mainWindow().findChild(QDockWidget, 'Snapping and Digitizing Options').findChildren(QTreeView)[0].setRowHidden(i, QModelIndex(), False)
                else:
                    self.iface.mainWindow().findChild(QDockWidget, 'Snapping and Digitizing Options').findChildren(QTreeView)[0].setRowHidden(i, QModelIndex(), True)
            else:
                self.iface.mainWindow().findChild(QDockWidget, 'Snapping and Digitizing Options').findChildren(QTreeView)[0].setRowHidden(i, QModelIndex(), False)

    else:
        self.iface.messageBar().pushMessage("Error", "Set Snapping-Mode to Advanced!", level=Qgis.Critical, duration=3)

def get_filter_layers(self):
    selectedLayers = self.iface.layerTreeView().selectedLayers()
    if len(selectedLayers)<1:
        self.iface.messageBar().pushMessage("Error", u"No Layers chosen in the TOC !", level=Qgis.Critical, duration=3)
    else:
        global filter_List
        filter_List=[]
        for i in selectedLayers:
            filter_List.append( i.name() )


texts: Calculating areas of polygon located inside target polygon in ArcMap?

texts:
I am using ArcGIS Desktop 10.3.

I have two polygon shape files that represents the building footprints and the plot. I want to calculate the plot ratio (area of built/area of the plot). I used spatial join with sum function, but summing up the area of the polygons that located inside one plot is not calculated correctly. Any idea how to do that? the last column is the actual value the one before last is calculated by spatial join.


texts:
I succeeded with @eblonde in the discussion (problem with polygon smoothing in R) to smoothing polygons in R.

Code:

inter1= read.table("c:/inter2.csv", header=TRUE)
#add a category (required for later rasterizing/polygonizing)
inter1 <- cbind(inter1,
                cat
                = rep(1L, nrow(inter1)),stringsAsFactors = FALSE)

#convert to spatial points
coordinates(inter1) = ~long + lat

#gridify your set of points
gridded(inter1) <- TRUE

#convert to raster
r <- raster(inter1)

#convert raster to polygons
sp = rasterToPolygons(r, dissolve = T)
#
# Splining a polygon.
#
#   The rows of 'xy' give coordinates of the boundary vertices, in order.
#   'vertices' is the number of spline vertices to create.
#              (Not all are used: some are clipped from the ends.)
#   'k' is the number of points to wrap around the ends to obtain
#       a smooth periodic spline.
#
#   Returns an array of points.
#
spline.poly <- function(xy, vertices, k=3, ...) {
  # Assert: xy is an n by 2 matrix with n >= k.

  # Wrap k vertices around each end.
  n <- dim(xy)[1]
  if (k >= 1) {
    data <- rbind(xy[(n-k+1):n,], xy, xy[1:k, ])
  } else {
    data <- xy
  }

  # Spline the x and y coordinates.
  data.spline <- spline(1:(n+2*k), data[,1], n=vertices, ...)
  x <- data.spline$x
  x1 <- data.spline$y
  x2 <- spline(1:(n+2*k), data[,2], n=vertices, ...)$y

  # Retain only the middle part.
  cbind(x1, x2)[k < x & x <= n+k, ]
}

#addition transformation to distinguish well the set of polygons
polys <- slot(sp@polygons[[1]], "Polygons")
output <- SpatialPolygons(
  Srl = lapply(1:length(polys),
               function(x){
                 p <- polys[[x]]

                 #applying spline.poly function for smoothing polygon edges
                 px <- slot(polys[[x]], "coords")[,1]
                 py <- slot(polys[[x]], "coords")[,2]
                 bz <- spline.poly(slot(polys[[x]], "coords"),40, k=3)
                 bz <- rbind(bz, bz[1,])
                 slot(p, "coords") <- bz

                 # create Polygons object
                 poly <- Polygons(list(p), ID = x)
                 return(poly)
               }),
  proj4string = CRS("+init=epsg:4326")
)

#plot
par(mar = c(0, 0, 0, 0))
Al = readShapeLines("DZA_adm0.shp")
plot(Al, col = "gray")
#plot(sp, border = "gray", lwd = 2) #polygonize result
plot(output, border = "red",  add = TRUE) #smoothed polygons

My problem now I need to be represented on a map, in fact I'm looking methodology to clear the area outside my shapefiles.

Is that possible to do in R?


texts:
I am writing a python script to be added to a toolbox and I do not know how to call an existing tool to be a parameter.

import geocoder  ##geocoding library
import csv
import arcpy     ##ArcGIS python module
import arcgisscripting
arcpy.env.overwriteOutput = True
gp = arcgisscripting.create()##creating geoproccessing object
env = arcpy.GetParameterAsText(0)
gs = arcpy.GetParameterAsText(1)  ##csv containing thousands of rows to be        reverse geocoded
cc = gp.SearchCursor(gs) ##creating arcpy searccursor to open and read csv
z=0
for add in cc:           ##looping thru all rows in csv
    Company = str(add.Company)
    Address = str(add.Address)
    City = str(add.City)
    State = str(add.State)
    Zip = str(add.Zip)
    geo = geocoder.google(str([Address,City,State,Zip]))
    addr = geo.latlng       ##returning xy for each row
    print addr
    if addr:
        x = addr[1]
        y = addr[0]
        firstrow = "Company"+","+"Address"+","+"X"+","+"Y"+","+"\n"
        line = str(Company)+','+str(Address)+','+str(x)+','+str(y)+','+'\n' ##line of info for new csv
        z+=1
        with open("Interm.csv", 'ab') as csvfile:  ##creating/opening/closing csv
            if z==1:
                csvfile.write(firstrow)
            else:
                csvfile.write(line)   ##writing line to csv
                print line
fc = arcpy.GetParameterAsText(2)
newpath =  arcpy.GetParameterAsText(3)#arcpy.CreateFeatureclass_management(env, fc, arcpy.GetParameterAsText(3),"","","",arcpy.GetParameterAsText(4))
arcpy.AddField_management(newpath, "Company", "TEXT")
arcpy.AddField_management(newpath, "Address", "TEXT")
cursor=arcpy.da.InsertCursor(newpath, ["Company","Address", "SHAPE@XY"])
outcsv = "Interm.csv"
curcsv = gp.SearchCursor(outcsv)
for geom in curcsv:
    addr = geom.Address
    comp = geom.Company
    X = float(geom.X)
    Y = float(geom.Y)
    newRow = (str(comp),str(addr),(X,Y))
    cursor.insertRow(newRow)
    print newRow

when i add the script to the toolbox and use arcpy.GetParameterAsText for createfeatureclass tool

 this is what shows when i set the parameters

then this shows up when I open the script to use

So what i want to do is have the create feature class tool parameters open in my script tool...


texts: Extracting all intersections from polyline shapefile using QGIS?

texts:
I would like to extract all the intersections from a polyline shapefile and print their addresses as text using QGIS.

Is there a straightforward way to do this?

My polyline has address information.

It is a "roads" file, and I don't need to compare it to other layers.


texts: How do I get the scale of the map item in my Layout(composer) in Qgis3?

texts:
I want to get the scale of my Layout that I created. For this I thought of using the QgsLayoutItemMap class. The problem is that the scale method in QgsLayoutItemMap always returns 0.0. I know I am doing something wrong but I don't know what. Here is the code I am using:

projectInstance = QgsProject.instance()
projectLayoutManager = projectInstance.layoutManager()
item = projectLayoutManager.layoutByName("asd")
tail = QgsLayoutItemMap(item)
tail.scale()


texts: Raster Mosaic changes values to 0 for some input rasters

texts:
For a while I was having an issue where the values for the first two inputs in the raster mosaic tool were not being carried over into the final product. This confused me for a couple hours and while I could find other people asking the same or similar questions online, I couldn't find anyone give a concrete answer into what was causing ity and most of the help threads were left unanswered.
I was able to find an answer to my specific issue, so I thought I would post both the problem, and the answer here to provide anyone with similar issues a potential solution.
The steps that I was taking are: Using the Create Raster Dataset tool I create an empty raster, see below.
I then use the Mosaic tool using the five rasters I wish to combine as the input rasters and the empty raster as my target raster, see below.
The resulting raster (while keeping the same shape as the five individual rasters) has lost the information for the first two rasters (sections 1 and 2) and it replaced all of the values with 0!
This pattern continues if you remove the two rasters where the information is lost and only include the upper three rasters. See below.


texts: Slope calculation workflow on pixel level

texts:
I know I cam calculate slope values based on DEM raster but I want to know how slope is calculated on pixel level. What values are taken into account when calculating slope on one pixel?
Can anybody explain me workflow on micro level?


texts: Objects in this class cannot be updated outside an edit session inside ArcFM?

texts:
I'm trying to add a feature class in ArcMap 10.2.1 that is an ArcFM Feature Class by using a python script.

I am working inside an ArcFM session which is required to edit the layer I am working with, however it is complaining about me not being in a session...

This is my script:

import arcpy

# fc is a point feature class
#
fc = r"Database Connections\DATABASE.sde\ACE.Electric_Network_Features\ACE.Transformer"
cursor = arcpy.da.InsertCursor(fc, ["SHAPE@XY"])
xy = (22000,99000)

Here is my exception:

Runtime error
Traceback (most recent call last):
File "<string>", line 9, in <module>
RuntimeError: Objects in this class cannot be updated outside an edit session [ACE.Transformer]

Am I missing a step?  I've tried looking up how to make an edit session for ArcFM in code but I have not been successful in finding this information...


texts: Kriging predictions for presence only data with Maxent

texts:
I was doing some geostatistical analysis (variogram+kriging) for a "presence only" type data in a species distribution modeling context. Since, we know that when estimating the (empirical) variogram, the attribute is basically assumed to be a realization of continuous random variables (although an attribute can occur in counts too). If the attribute is just the presence, and no sub-categories then all the values at all positions will be same (say 1, if we denote a presence by 1). Hence the variogram can not be calculated, not even the indicator variogram.  One of the approaches to deal with such data pseudo absences or background data were generated using some algorithm e.g. Maxent etc (see e.g. [1, 2]). The pseudo absences are generated taking many factors into account and stacked/combined with actual data. This is equivalent to merely generating random positions (x, y coordinates) and giving them an absence status (say 0s). The new data is now a binary data with two categories, presence 1 and absences 0.
How many absences (as compared to actual data) should be generated and how to decide it?

Reference

Tomislav Hengl, Henk Sierdsema, Andreja Radović, Arta Dilo, Spatial prediction of species’ distributions from occurrence-only records: combining point pattern analysis, ENFA and regression-kriging, Ecological Modelling, Volume 220, Issue 24, 24 December 2009, Pages 3499-3511.
https://cran.r-project.org/web/packages/dismo/vignettes/sdm.pdf


texts:
I created a coverage layer ( polygon) for an atlas. It contains rectangle polygons which define the boundary of sheets (somehow irregular indexing along my layer).
when I print the atlas without changing the scale of my map (scale 1:1600), I have the same overlap that I defined in my coverage layer (sheets polygon).
But when I force to map to specific scale (1:1000) I lose the overlaps between the sheets.
How can I change the coverage layer scale to 1:1000?

I know that I can use the option of best fitting scale, but I need to force my coverage scale to specific scale.


texts: How to edit virtual field definitions in QGIS?

texts:
I have a virtual field in QGIS. The values are updates depending another column with a concatenate CASE statements.

I would like to edit this statement but I cannot see it.

I have attempted to use the field calculator and choose the virtual field, but the statements just disappear.


texts: create a model that allows the user to set parameters in algorithms

texts: I am trying to create a model in the graphical modeler of QGIS in which the user can configure the parameters of some algorithms, as in the Model Builder. Is it possible in QGIS?


texts: Cropping large DEM data file and save as separate file using ArcGIS for Desktop?

texts: How do I crop a section of the US map I am working on from the larger DEM data and save as a separate file on ArcMap 10.2?


texts: Counting distinct values in a field of a table stored in pgdb

texts:
I need to calculate total count of distinct values of a field . That field contains many duplicate values also. The table which contains that field is stored in pgdb.
I want things done in vb .net. Any help is appreciated.


texts: Sample strategy to model continuous variable from conglomerate ground sample units

texts:
I´m using data from the Brazilian national forest inventory to model forest canopy metrics with Landsat imagery. The sample units have this conglomerate configuration (picture), which creates a problem for me because the Landsat pixel is 30 m and the sample unit is 160 m wide. From what I see, I have two options to extract pixel values from the sample units: the most obvious is to average the pixels values over the sample unit (~160 m circumference) and the other would be using the "sampleRegions" command on google earth engine and sample all pixels inside this 160 m circumference.
My question is, which sampling strategy is more appropriate? The latter approach is even valid to model continuous variables?


texts: Method to replace inefficient building of lists using searchcursor

texts:
I am new to search cursors, and have them working to build a list of lists - but there must be a better way. Is there a quick way to slice just the three columns (found in field_name_list) that I want from a layer's attribute table?

Here is my current code:

updateData = []

with arcpy.da.SearchCursor(layer_file, field_names=field_list) as toSearchCursor:
            for row in toSearchCursor:
                templist = [row[0], row[1], row[2]]
                updateData.append(templist)

Edit:

Addressing comments on readability, I supposed my original method could be improved while still being readable - as the row object should only contain the data from the columns I wanted, in the order I want, right?

import arcpy

updateData = []
field_list = ['col1','col2','col3']

with arcpy.da.SearchCursor(layer_file, field_names=field_list) as toSearchCursor:
    for row in toSearchCursor:
        updateData.append(row)

Cleaner, and simpler, and still set to work right?

Also, the list comprehension could be made more clear using differently named variables:

import arcpy

field_list = ['col1','col2','col3']

with arcpy.da.SearchCursor('mydata', field_list) as sCursor:
    data = [row for row in sCursor]


texts: Preprocess OSM streets to see if query points fall "on" them

texts:
I am interested in the following query:

Given a set of query points ($\leq 10$), how many of them have distance at most $s$ meters to the closest point on the closest street.

What's the most efficient way of writing / pre-processing this query?

1) Pre-process the roads (in osm2pgsql) by replacing each road by a Buffer of $s$ meter width. Then do stabbing queries using ST_Contains.

2) Replace each query point by a circle of radius $s$ and query if any road is intersected by a query circle.

3) Other Approaches?


texts: Incorrect result while adding points along geometry in QGIS

texts:
I'm trying to add points along lines every 3 metres but I'd like the starting/ending point at certain non fixed distance. When I use the tool 'Points along geometry' inside Graphical Modeler. I don't want a fixed distance for 'start/end offset", the distance is variable. I want to use a field called "offset" containing the pre-calculated distance for every line.

When I select the column "offset" with the distances in it, QGIS doesn't recognise or ignores the values. Instead of adding points at the predefined value, It's adding the double of distance at the starting point and adding the endpoint at the end of the line which I don't want.

Am I missing something?

Is there any other way to do this?

With QGIS or PyQGIS?

Any ideas?

As far as I can see, there is no option to use this tool above to solve my problem. Someone suggested using Python within QGIS. I'm a beginner so I'm not quite confident about the code. I only have a few lines but I know that it needs to add a lot more.

I have a layer with lines and I want to add points along the lines with 3 metres equidistant. In addition, I have a column on the attribute table with the distances for start and end offset for each line which I would like to use.

What I have:

from qgis.core import (QgsFeature, QgsGeometry, QgsVectorLayer, QgsMapLayerRegistry, QgsField)

inputLayer = iface.activeLayer()

feat = layer[0].getFeatures().next()

for feat in inputLayer.getFeatures():
     dist = feat['offset'] # this is the field name with distances
     geom = feat.geometry()
     l = 0
     while l < geom.length():
        p = geom.interpolate(l)
        print(p)
        l += dist


texts: Open-source projects that use DotSpatial?

texts:
I'm intrigued by what I see with DotSpatial, mainly for its C# interface with GDAL.  I've downloaded the source (and the 3.5 x86 package) and I'm a bit stuck with using the GDALHelper class to initialize the GDAL library.

(I think it should be just a call to GDALHelper.Configure() but I'm hitting errors when I do that.)

I figure that's probably going to be the first of many questions with the DotSpatial, and was wondering if there are any good open-source projects (applications) that use it so that I could see how it's set up in practice.


texts: Batch Renaming of Shapefiles using ArcGIS Desktop?

texts:
I have 100 shapefiles that share the same initial 44 characters. I would like to remove those initial identical 44 characters. The unique portion of the shapefile is the line number, i.e. Line_1006_1007. I want to rename the shapefile with the line numbers. Additionally, I want to remove the .kml before the .shp in the name. Here are three examples of the shapefile name below.

"Lines_P_10345_-_600_Mile_Project_Collection_Line_1006_1007.kml.shp"

"Lines_P_10345_-_600_Mile_Project_Collection_Line_921_920_906.kml.shp"

"Lines_P_10345_-_600_Mile_Project_Collection_Line_3130.kml.shp"

I am using ArcGIS 10.4 with all of the extensions available.


texts: Conversion of multispectral image to grey scale

texts: I have a composite with four bands NIR, Red, Green and Blue. I would like help on which weight values to use when converting it to a single band which will then be used to classify vegetation. I am using Image Analysis in ArcGIS.


texts: Choosing parameters for SAGA Wetness Index?

texts:
I've been working with SAGA GIS to calculate the Topographic Wetness Index of an alpine catchment. I am using the tool Terrain analysis > Hydrology > SAGA Wetness Index because, compared to Terrain analysis > Hydrology > Topographic Wetness Index (TWI), the output is not a one-pixel wide film but a (to me) more realistic broader network of streams.

My input is a DEM (with sinks filled) that was derived from airborne LiDAR data and has a resolution of 1x1m. I don't have a Weights raster which is an optional input. Now my problem is that there are six parameters that shall be chosen before the calculation:

Suction (default = 10)
Type of Area (default = square root of catchment area; other options total catchment area or specific catchment area)
Type of Slope (default = catchment slope, other option local slope)
Minimum Slope (default = 0)
Offset Slope (default = 0.1)
Slope Weighting (default = 1)

Unfortunately, I didn't find much information about them and I am unsure how to decide which ones to use for my site. Both cited publications (Boehner et al 2002 and Boehner & Selige 2006) lack an explanation of these parameters and the SAGA tool itself has hardly any description (see http://www.saga-gis.org/saga_tool_doc/6.3.0/ta_hydrology_15.html).

The latter, for example, says that for Suction "the lower this value is the stronger is the suction effect" but what is this suction effect and how strong should it be in my area?

References:

Boehner, J., Koethe, R. Conrad, O., Gross, J., Ringeler, A., Selige, T. (2002): Soil Regionalisation by Means of Terrain Analysis and Process Parameterisation. In: Micheli, E., Nachtergaele, F., Montanarella, L. [Ed.]: Soil Classification 2001. European Soil Bureau, Research Report No. 7, EUR 20398 EN, Luxembourg. pp.213-222. http://eusoils.jrc.ec.europa.eu/ESDB_Archive/eusoils_docs/esb_rr/EUR22646EN.pdf.
Boehner, J., Selige, T. (2006): Spatial prediction of soil attributes using terrain analysis and climate regionalisation. In: Boehner, J., McCloy, K.R., Strobl, J. [Eds.]: SAGA - Analysis and Modelling Applications, Goettinger Geographische Abhandlungen, Goettingen: 13-28. http://downloads.sourceforge.net/saga-gis/gga115_02.pdf.


texts:
I am trying to show my own custom tiles and I am having trouble with the display of the tiles and their sizing.
The Entire game map is corresponding to x16384,y16384
Which I confirmed with the imgaeOverlay, displaying the entire map from one image of 1024px/1024px which shows the entire map while dropping a tree to the correct coordinates.
But the resolution is terrible so I am trying to display it with tiles

But the tiles are displayed way too small. The first layer L7(zoom0) which is only one image is shown as one tiny image(tile) while zoom level 1(L6) is showing the 4 images of this level a bit closer.
Presumable cause it's showing 1/16 and 4/16 of a grid?
The tree is also way out of bounds with the tilelayer.
The count of my map source files(game files) goes up each zoom level (L7-L1) x*4 (1,4,16,64....)
Question: How can I change the grid pattern? So that the one image of zoom 0 and the 4 images of zoom level 1 both correspond to y16384 x16384 while taking 100isch% of my map div?
I had to change the map names from how you see them I'm above the image into the following folder/naming structure, maybe this is part of the issue?

map/{1}/{0}/{0}.png
map/{1}/{0}/{1}.png
map/{1}/{1}/{0}.png
map/{1}/{1}/{1}.png

<script>
    var map = L.map('map', {
        crs: L.CRS.Simple,
        minZoom: 0,
        maxZoom: 7,
        tileSize: 1024,
        });

    var bounds = [[0,0], [16384,16384]];
    //var image = L.imageOverlay('map/source/MAP_L7_y000_x000.png', bounds).addTo(map);
    L.tileLayer('map/{z}/{y}/{x}.png').addTo(map);
    map.fitBounds(bounds);
    map.setView( [000, 000], 0);

    //test marker
    var tree = L.latLng([ 6231.0166015625, 10161.369140625 ]);
    L.marker(tree).addTo(map);
</script>


texts: How to use SAGA Kriging in Sextante for QGIS?

texts:
Hello,
I tried to use SAGA (Ordinary Kriging) via SEXTANTE in QGis. The Sextante log tells me the following problem. Does anyone have a solution for my problem? By the way I'm usually a SAGA user but I wanted to change to QGis.

Grid: [not set]
Variance: [not set]
Points: HERBST_Nuptake_Fert120
Attribute: NUPTAKE
Create Variance Grid: yes
Target Grid: user defined
Variogram Model: Spherical Model
Block Kriging: yes
Block Size: 100.000000
Logarithmic Transformation: yes
Nugget: 0.000000
Sill: 10.000000
Range: 100.000000
Linear Regression: 1.000000
Exponential Regression: 0.100000
Power Function - A: 1.000000
Power Function - B: 0.500000
Maximum Search Radius (map units): 1000.000000
Min./Max. Number of m_Points: [4.000000] - [20.000000]

error: executing module [Ordinary Kriging]

C:\Programme\Quantum GIS Lisboa>saga_cmd io_gdal 1 -GRIDS "C:\Dokumente und Einstellungen\user\sextante\tempdata\test.tif.sgrd" -FORMAT 1 -TYPE 0 -FILE "C:\Dokumente und Einstellungen\user\sextante\tempdata\test.tif"

##   #####

###  ##

# ## ##  #### #

##### ##    #

#   ##  ##### #

library path:   D:\Programme\SAGA_Beta\saga_208\modules
library name:   io_gdal
module name :   GDAL: Export Raster
author      :   O.Conrad (c) 2007

go...

Load grid: C:\Dokumente und Einstellungen\user\sextante\tempdata\test.tif.sgrd...

failed

error: Grid file could not be opened.


texts:
I have been looking for a way to try and make the output of the Kernel Density function in ArcGIS for Desktop make a little more sense to our administration.

I ran the function on a sample dataset with 500 points, and the 'density' where only 1 point was within the search radius was given a value of 6.2342 at the peak. I then divided the entire raster by this value.

The scale is now at least in relation to the peak value found at one point.

Is this methodology sound?
Has anyone found better ways to label the scale that go beyond 'more dense, less dense'?

EDIT: Just wanted to reference How to interpret GRASS v.kernel results? as the method for checking the values of the output is beneficial.  This helps to clarify how these values are computed and provides a way to validate results which helped me to understand the assigned values.


texts: get log of internal functions called by qgis

texts:
Is there a way to know which internal python functions are used by QGIS?

e.g., when I click on "add vector layer" button I would like to know the functions that are called by QGIS.

It would simplify greatly the automation of tasks with QGIS.


texts: Snap line layer to network in QGIS or PostGIS

texts:
I have GPS data I've taken of bus routes, and now I'd like to snap it to my road network. Both layers are line layers in a PostGIS DB. I'd like to use either QGIS or PostGIS, but if I have to go with GRASS or ArcMap, that's OK, too.
Thanks!

To clarify, I'm trying to snap lines to lines, not points to lines.


texts: Error reading database file from: /Applications/QGIS.app/Contents/Resources/resources/srs.db

texts:
I've suddenly started getting the following error using QGIS 2.0.1 on Mac:

Error reading database file from:
/Applications/QGIS.app/Contents/MacOS/../Resources/resources/srs.db
Because of this the projection selector will not work...

This results in my map not rending at all and the application frequently crashing. What is causing this and how do I fix it?


texts: importing point attributes from a txt file

texts:
I am currently trying to add labels (attributes, names, labels, whatever you may call it) to points that i added via the vector layer -> import txt as layer.

So I imported a WCS-layer and wrote a txt file that contains tab separated data:

QGIS (Nodebo) did put points on the map, however i would like to know how to get QGIS to use the 'NAME' column to label the respective points.
Any ideas?


texts: Looking for web and desktop tools with GML support

texts: I am a graduate student and a novice in GIS field. I have few GML files that contain vector polygon data and I want to see them in a map format. The problem is that I do not have access to ArcGIS/Grass GIS software installed in my machine. I am wondering if there are online GIS website where I can upload my file and visualize it. Also is there any simple and small size free/open source software that I can install on my computer?


texts: Importing a PostGIS and a Delimited Text layer in QGIS, not overlapping

texts:
I'm a beginner in QGIS, and I have a PostGIS database and a CSV file I would like to visualize.
I followed the instructions in this question and the answers, but it doesn't work for me, my two layers are still not overlapping.

Here is what I'm doing:

I create a new project, and in the project properties, in CRS, I "enable 'on the fly' CRS transofrmation" and select "Google Mercator".
I add a PostGIS layer. In the "Properties" ("General") of this layer, the specified layer is "EPSG:900913 - Google Mercator". In "Metadata", I have:

  +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs

Finally, I add a Delimited Text layer. This one is in Swiss Coordinates, so when adding it, Google Mercator is proposed, but I change it to "CH1903+". In "Metadata", I have:

  +proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333333333 +k_0=1 +x_0=2600000 +y_0=1200000 +ellps=bessel +towgs84=674.374,15.056,405.346,0,0,0,0 +units=m +no_defs

I'm choosing Google Mercator because when I first added the PostGIS layer, it was automatically selected.

What am I doing wrong here?

Here are examples of data from my sets:
CSV (Swiss coordinates):

  533288    152585

  533230    152625

  533066    152647

  533057    152660

  533110    152607

  533143    152627

  533162    152571

  533103    152560

PostGIS (Google Mercator coordinates) (supposedly overlapping more or less):

  731632.384716794;5863923.31681192

  731351.09395362;5864059.81606372

  731351.452782778;5864091.19255148

  731202.814656544;5864134.45924451

  731322.906745951;5864210.56763595

  731128.278515869;5864216.17023219

  731337.333643971;5864149.17870271

  730796.011530197;5864247.06311145

  731613.06159501;5864003.29715222

  730454.864224799;5863712.64413468


texts: Which projection for Yamuna River shapefile covering Uttarakhand, Uttar Pradesh?

texts:
I am looking for a common projection for a shapefile of the Yamuna River to cover Uttarakhand, Uttar Pradesh (Allahabad) as I need to calculate an area.

How do I find what projection to use?


texts: What is use case for ArcGIS Layer package?

texts:
I am aware of MapPackages MPKs which pack the mxd-project and data and symbology together in order to easily distribute mapping projects. Layer packages are however just the individual layers packaged with data and layer properties. So basically MPKs without any project settings.
So what are the advantages of LPKs over MPKs?


texts: I am using Bing Aerial imagery within QGIS through the OpenLayers plugin. How can I find the dates of the images that are within the map canvas?


texts: Why is arcpy.FeatureClassToFeatureClass_conversion with an event layer as input creating an empty output?

texts:
I have a line with begin and end node XY data (IHS_NET_EDIT_DISSOLVE) and would like to create a point feature class representing the begin and end nodes.  With the following code I am able to successfully create the XY event layers, but the resulting feature classes are empty:

arcpy.MakeXYEventLayer_management(IHS_NET_EDIT_DISSOLVE, "START_X", "START_Y", "lyrBeginNodes")
arcpy.MakeXYEventLayer_management(IHS_NET_EDIT_DISSOLVE, "END_X", "END_Y", "lyrEndNodes")

print("Begin Node Layer Count: " + str(arcpy.GetCount_management("lyrBeginNodes")))
print("End Node Layer Count: " + str(arcpy.GetCount_management("lyrEndNodes")))

arcpy.FeatureClassToFeatureClass_conversion("lyrBeginNodes", outputPath, "BeginNodes")
arcpy.FeatureClassToFeatureClass_conversion("lyrEndNodes", outputPath, "EndNodes")

print("Begin Node FC Count: " + str(arcpy.GetCount_management("BeginNodes")))
print("End Node FC Count: " + str(arcpy.GetCount_management("EndNodes")))

As you can see from what's printed, the layer counts look good, but the feature classes are empty:

  >>>
  Begin Node Layer Count: 2452
  End Node Layer Count: 2452
  Begin Node FC Count: 0
  End Node FC Count: 0>>>

What am I doing wrong here?  I imagine it has to do with how I'm referencing the layers as input, but I don't know how else to make it work.


texts: Removing null value in labels of ArcMap?

texts:
Following this question:

Label expression in ArcGIS gives TypeError coercing to Unicode need string or buffer NoneType found?

I used this python expression in order to create a stacked label from two field: 'name3' and 'results':

"{}\n{}".format([name3], [results])

the problem is that some of the labels contain "None" values that i don't want to represent in the map:

How can i remove the None values and still use the python phrase

I don't want to use VB phrae-i know that in VB the None values disappear from the map and still i prefer to use python.


texts: Leaflet and ArcGIS Geoprocessing Service

texts:
Does anyone know of an example of a leaflet map with a geoprocessing service? Is it possible? What would the code look like?

I know ESRI Leaflet allows feature layers and map layers but I can't find anything on geoprocessing services.


texts: QGIS: Using Filter expression for Drive Down Lists in Value Relation Widget

texts:
I have a vector layer and want to enable the user to pick values from drop-down lists. The values of the drop-down list change depending on the chosen value of the previous field(s). It works perfectly if the value changes depending on the value of one field. In my case, it is depending on two fields actually.
Therefore I tried added this in the filter expression
 "HWFDB-Massnahmenart"  =  current_value('hwfdb_massnahme_art' )  AND  "HWFDB-Layernahmen" = current_value('geplant_bestand_umgesetzt')

And it did not work, the drop-down is not appearing even though both geplant_bestand_umgesetzt and hwfdb_massnahme_art are filled.

Then I passed the exact value of the geplant_bestand_umgesetzt instead current_value('geplant_bestand_umgesetzt') and it worked like this.
"HWFDB-Massnahmenart"  =  current_value('hwfdb_massnahme_art' )  AND  "HWFDB-Layernahmen" = 'PL_RETENTION'

Why does the first option not work? Am I missing something?


texts: Calculate distance from a Point within a Polygon to its edge

texts:
Let's say we have the following point and polygon:

poly = Polygon([(0, 0), (2,8), (14, 10), (6,1)])
point = Point(4,4)

Because point lies within poly, the distance from the first to the latter will be zero (poly.distance(point) will return 0.0).

Is there a way to instead calculate the distance to the nearest edge?

Note: Effectively the same question as this, but desire a solution in Python, ideally with Shapely.


texts: QGIS and arcmap compatibility in image georeferencing

texts: I have georeferenced an image in QGIS but when I imported it to arcmap 10.0 it saying "In consistent extent". Any one know how to solve it?


texts: PostgreSQL 'BEFORE INSERT' TRIGGER Problem with QGIS

texts:
In PostgreSQL I created a simple PL/pgSQL trigger function like this:

CREATE OR REPLACE FUNCTION set_rv_default_farben() RETURNS trigger AS
$$
BEGIN
    IF NEW.parent_rv IS NULL THEN
        IF NEW.anz_rohre = 12 THEN
            NEW.farben := '{1,2,3,4,5,6,7,8,9,10,11,12}';
        ELSIF NEW.anz_rohre = 24 THEN
            NEW.farben :='{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24}';
        END IF;
    END IF;
END;
$$
LANGUAGE plpgsql VOLATILE;

CREATE TRIGGER rv_farben_def_trig BEFORE INSERT ON rohrverbund EXECUTE PROCEDURE set_rv_default_farben();

In QGIS, when I add a feature to layer rohrverbund with attribute parent_rv left NULL as well as anz_rohre set to 12 and try to save edits for this layer I get an error message like (partial in german, but I try to translate ...)

Could not commit changes to layer rohrverbund

Errors: ERROR: 1 feature(s) not added.

  Provider errors:
      PostGIS error while adding features: FEHLER:  Record »new« hat noch keinen Wert [... has no value]
    DETAIL:  Die Tupelstruktur eines Records ohne Wert ist unbestimmt. [tuple structure of a record with no value is undetermined]
    CONTEXT:  PL/pgSQL-Funktion set_rv_default_farben() Zeile 3 bei IF [line 3 at IF]

What am I missing? The recommendation and all examples I found use BEFORE INSERT and NEW.attribute, better use AFTER INSERT and OLD.attribute?


texts:
I have managed to get my WMS layers working in OL3.
Now I want to style them, as they are all set as blue on the server side and I can't change that.
I know the common answer seems to be WMS is an image and you can't style it like a vector but there are examples of people doing complicated dynamic styling with SLDs so it must be possible to use an SLD to change the layer colour - depending on the server?

I have had a look at one examplebut that is OL2.9 and for WMS.post layers and I don't know what they are.

My rough ol3 code is here so you can see where I am at


texts: Silverlight application and Geometry Data

texts:
I have a table in SQL server 2012

TABLE [Feature](
    [GUID] [unique identifier] NOT NULL,
    [Geom] [geometry] NOT NULL)

in this table record my feature.

I need create an application with Silverlight that all of my feature show in application. Users need Edit (add, delete, update) features from the Silverlight application

I can show my feature data in grid-view. but still I can't find any component to show my feature data.

is Exist any component for show/add/delete feature?
how I can show list of feature in Silverlight application?