texts:
I want to run a model with a python script, including the parameters, because I can't "translate" the model easily into a script.

I have tried to run a copy of the processing log after running the model, (from the console and the editor):

processing.run('model:myModel', {'form1':'P:/Form1.xlsx','form2':'P:/Form2.xlsx','form3':'P:Form3.xlsx','coordinatesystem':QgsCoordinateReferenceSystem('EPSG:25832'),'native:mergevectorlayers_4:Border 1':'memory:','native:mergevectorlayers_6:Border 2':'memory:','native:mergevectorlayers_7:Cirlces':'memory:','qgis:createpointslayerfromtable_1:Baum':'memory:'})

Something happens, but the layers do not show up. I tried F5 but nothing changed.

I have found this piece of information, but it is for QGIS2

How to run the graphic modeler from the python console in QGIS?

How can I trigger the execution of a model with its parameters in pyGIS and get the layer window updated?


texts: Edited metadata disappears in ArcCatalog

texts:
I'm quite new to GIS (being a student) and I have to edit the metadata for a couple of layers in my personal geodatabase. The problem I have is when I'm editing the metadata for the rasters it keeps disappearing after I click save. It looks good first (I edit all under the item description tab such as title purpose etc). Then as soon as I've saved and I click on another dataset and go back to my freshly edited raster it's all gone. Nothing is saved.

When I edited the metadata for the vector layers it worked just fine and it's saved and still there. The metadata template I'm using is FGDC CSDGM.  Do any of you know whats going on? Have I done something wrong with my rasters? Or is there something wrong with ArcCatalog?


texts: Using Erdas for land cover land use change detection

texts:
New to Erdas but I have to do a project and I have chosen to do a landcover land change detection. I have two Landsat 5 images, five years apart from each other.

What is my next step?

I imagine I need to do all the preprocessing and after that, I am thinking of using raw image difference and NDVI.

I have Atcor, will that be what I need to convert my DNS into reflectance?


texts: Why are there missing values in the American National Standards Institute (ANSI) Codes for States

texts:
On the US Census Website there is a list of American National Standards Institute (ANSI) Codes for States, the District of Columbia, Puerto Rico, and the Island Insular Areas of the United States?

The first three rows of the table read:

Alabama         01    AL
Alaska          02    AK
Arizona         04    AZ
...
Wyoming         56    WY

There are other holes as well.

What happened to code #3?


texts: Error trying to create mssql layer in geoserver

texts:
with mssql 2008 and the latest geoserver with the mssql store plugin, I can create a dbo connection with a mssql database and list the tables. When I try to create a layer with one of the tables which has a "GEOM" field in the format POINT (3550951.71343219 5889701.66379654) I always get the same error when saving the layer...

Caused by: java.io.IOException: Error occured calculating bounds for PUZZLE_LAYERVIEW_2 at org.geotools.jdbc.JDBCDataStore.getBounds(JDBCDataStore.java:1258)

What is the problem with the bounds? I have entered the correct EPSG code = EPSG:31467. Is the problem really with the bounds or with mssql geometries? An sql query layer works ok in ArcGIS.


texts: Labelling contours within polygon using QGIS?

texts:
I have two layers, one which contains a polygon, and one which contains contours.
Unfortunately, they have different projections.

I want to label the contours with their elevations BUT I only want the labels to be displayed within the bounds of the polygon (a site buffer), rather than all over the map.

Is it possible to do so? Will I have to make both layers the same projection, and clip the contour layer?

I've read through some of the other related answers here, but none seem to be right for what I am trying to do.


texts:
How can I get the specified quadrant of a label using PyQGIS?

The print statements below return 1 and 0 no matter which option I pick in the dialog.

palyr = labeling.settings()
print(palyr.placement)
print(palyr.QuadrantPosition())


texts: Mask area of GeoTIFFs surrounded by 0 Data

texts:
I've a larger amount of GeoTIFFs which basically look like:

The area of interest is the rectangle in the middle.
Black shows 0-Data.
My goal is to fill the left and right sided areas (round) with 0-data as well.

My idea is to only "look" at a half of the image which then would describe the area to be filled with 0-data as if surrounded by 0-data fill with 0-data. (The rectangle then should be ignored as it's not surrounded by 0-data on the right hand side).

So much for theory. If this sounds doable my question is if somebody knows of a tool with CLI support which already provides this kind of calculation/workflow?


texts:
I need to find a relief map of Russia. Where such a map can be found and downloaded?

Or how to create such a map?

I have found a site, but the scale is too small.


texts: Retrieve coordinates of selected feature with the ArcGIS API for JavaScript

texts:
I am currently working with the the  ArcGIS API for JavaScript and I have delved into ArcGIS API for JavaScript currently for a weeks, so I am not that familiar with the ArcGIS API for JavaScript.

For now I managed to create a webapplication with a nice Map and a layerlist, so I managed to learn about the basic widgets of ArcGIS API.

However I included code in which whenever I click on an object of the layerlist it will  show an popup and execute a certain function. For my function, I would like to have the location of the selected feature in coordinates (presumably in WGS84 coordinates). I was therefore wondering how I would be able to retrieve the coordinates of the selected feature, in the attributetable of the feature, there are no longitude and latitude columns for example, so I was wondering in which other way I would be able to retrieve the coordinates of the selected feature and being able to store it into a variable. (Whether there is a widget for that for example)

I currently use the JavaScript API 4.10 version.
EDIT: The layer is a feature layer.


texts: Error Finding proj.db using GDAL 3.0 With MapInfo v.15

texts:
I am using GDAL 3.0, MapInfo v.15, Visual Studio 2015, and c#.

Recently I updated from Gdal 2.2 -> 3.0. Since then when I use aerials to create a pdf report and then upload to S3, I receive the following error message originating from DeliverablesManager.exe when running the app in MapInfo:

 Sorry, an error occurred:
 System.ApplicationException: Error occurred while converting TargetProperty.TAB to GeoJSON:
 ERROR 1: PROJ: createGeodeticReferenceFrame: Cannot find proj.db
 ERROR 1: PROJ: proj_create_from_database: Cannot find proj.db

I have confirmed proj.db exists in the Program Files GDAL folder. I have confirmed the application in Visual Studio is pointing the projlib environmental variable to the projlib folder which contains the proj.db. I have confirmed the proj_6_0.dll and proj.exe exist in the GDAL folder.

I did notice MapInfo contains proj4.dll, not proj6.dll which leads me to question whether or not GDAL 3.0 can run with MapInfo v15. I did add proj.db and proj_6_0_.dll to the MapInfo folder containing proj6.dll (C:\Program Files (x86)\MapInfo\Professional\UT\reproject\Exceptions) and restarted my computer but the error persists.


texts: QGIS 3.4 - Find all layers not using the project CRS

texts:
I have a large project and I recently reorganised my data. This included reprojecting some of it. I have updated the data sources for all of my layers however there are some layers which are still using the old CRS.

Is there a way to identify all layers in my project which are not using the project CRS? Or else to list all layers using a specific CRS?


texts:
I am using Leaflet 0.4.4,

I have a KML I would like to overlay on the map, how do I go about doing this?

Edit: I am already aware of https://github.com/CloudMade/Leaflet/issues/14, which directs you to download a plugin from http://psha.org.ru/b/leaflet-plugins.html.

I was hoping to have a demonstration of the implementation of how to add a KML overlay.

Edit [Solved]:
I found the demo, here it is:

<script type='text/javascript'>
    var map = new L.Map('map', {center: new L.LatLng(58.4, 43.0), zoom: 11});
    var osm = new L.TileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png');
    var track = new L.KML("KML_Samples.kml", {async: true});

    track.on("loaded", function(e) { map.fitBounds(e.target.getBounds()); });

    map.addLayer(track);
    map.addLayer(osm);

    map.addControl(new L.Control.Layers({}, {'Track':track}));
</script>

You also need to make sure that you need to enable cross-origin resource sharing, I did this in PHP with:

  <?php
      header("Access-Control-Allow-Origin: *");
  ?>

The problem I was having was the Access-Control-Allow-Origin. Thanks all


texts: How to load multiple WMS layers at once in QGIS?

texts:
Does anyone know how to load multiple WMS layers at one time in QGIS?

The attached screenshot shows all the layers available for a particular URL. Loading them all individually takes an age. In ARC you can select the top layer (containing all sub-layers) and it adds them all in hierarchical structure. QGIS seems to just crash.

QGIS version 2.16 on Windows 7.

The url is:

"http://environment.data.gov.uk/ds/wms?INTERFACE=ENVIRONMENT--9089254f-d465-11e4-9265-f0def148f590&"


texts: Can you use a large file directory of jpgs for without georeferencing

texts:
I have a large map data set of 256x256 jpg images. The file directory is organized by /map_type/zoom/x/y.jpg. I have 12 zoom levels and each zoom level directory has 2^(2*zoom level) images.

I have been researching how to display map data using GeoServer and almost everything I have read says that I need to georeference the images. This would not be practical with the methods I've seen because I have such a large data set.

Is there a way to display the map data based on the file location? I found a similar tile structure on wiki called Slippy Maps but after skimming through it, it sounds like they convert vector data to tiles. All of this is kind of confusing to me. Some clarification on how map data is created and served up would be very appreciated.


texts: How to add a message bar to custom canvas?

texts:
There is a simple code to add message bar to main window in QGIS:

iface.messageBar().pushMessage("Hello","World")

My question is how to add bar to my custom canvas canvas = QgsMapCanvas() in standalone application?
Is there possibility to display it on the bottom of canvas?


texts: Misaligned GADM shapefiles and the NE dataset

texts:
I am very new to using GIS programs, so please excuse me if this is a trivial question.

I'm having the following problem:
When adding a GADM shapefile layer for Uganda onto the Natural Earth set of maps, the GADM Uganda map is shifted by about 11 km east compared to the NE map (a small difference but quite visible).

Following instructions in the answers to other people with similar problems I enabled "on-the-fly CRS", set both the layer CRS (in the GADM layer) and the project CRS to WGS84, but that did not change anything.  It looks like both the NE set and the GADM shapefiles have the same projection (WGS84), which is how it's specified in the metadata of both the GADM and NE layers. In this case of course setting the CRS to WGS84 shouldn't change anything. What could I look into next to try and fix this problem?


texts: I have a field that posts CURYEAR but I am trying to write an FME Attributesetter that would post the CURYEAR minus 1. So technically the year prior to the captured date. Does anyone know how to scrip that?


texts: How to clip grid (based on points) leaving whole cells only using ArcGIS 10.1 for Desktop?

texts:
I am trying to clip a polygon grid based on a point layer as well as another polygon.

Basically I have a polygon grid and a layer of points that fall in the center of most of the cells. I want to keep only the grid cells that have a point within them. In addition, I have a county boundary polygon (partially shown in orange) that I want to use to further clip the grid, but I want to keep whole cells only. It's OK if the cells fall partially outside of the county boundary as I want to make sure I have full coverage of the entire county.

I am slightly familiar with ModelBuilder if that is the best way to go.


texts: Standalone External QGIS Application using python

texts:
I am creating a standalone external Application of QGIS using python and i am following the tutorial mentioned in the link http://download.osgeo.org/qgis/doc/workshops/foss4g2007_qgis0.9_workshop_en.pdf

I compiled my UI as well as the resource file and also set QGISHOME , Python path and the path for the dll files. And run my py file using OSGeo4W Shell. just the python file is running and nothing appears other than that what is expected (Viewer should opens, browse for shape files, and do some basic actions like zoom in, zoom out, pan etc.). There is no any error message also. The code is very lengthy to share here.


texts: Exporting to KML from ArcGIS for Desktop?

texts:
I'm attempting to export a series of points that cover the continental U.S. as well as some of it's territories to KML.  When I export to KML and open it in Google Earth, the data loads in, what seems to be, an intermediate location between the regions.  However, I want the data to load/zoom in on the continental U.S.

Can I change the load point/center point in ArcGIS for Desktop before exporting to KML or would I have to change the load point within the KML code?


texts: Joining parcel/building attributes based on coordinates

texts:
I downloaded a building footprint shapefile for a city and imported it as a vector layer in QGIS. I was hoping to see street address information in the attribute table, but there was none. I subsequently downloaded and imported a shapefile containing the land parcels for the same city (which DO have street addresses), and it overlays nicely such that buildings appear within parcels.

I would like to join the attribute tables such that my building footprint file contains addresses; however, there is no common key on which I can join (I see a Shape_STAr and Shape_STLe but can't figure out what these are).

Is there a way for me to (programmatically via a framework or otherwise) determine which buildings fall inside a parcel based on the coordinates such that I could join the data in the manner I desire?

I've done some Google searches but can't figure out where to start.


texts: problem transforming pgr route to a line - unexpected extra lines from St_MakeLine

texts:
I have created a line geometry from a pgr_dijkstra querry and I am getting an unexpected looking line in qgis.  The following image illustrates the problem:

The magenta line is the line created from mapping the route from my table where I have created a line geometry using the following code:

update analysis.routing
set
routeline = (select st_makeline(pgr.geom) ,
from (select * from pgr_dijkstra('ways',61789,64493)) as pgr)

The dotted red line is the line created in qgis from calling the same select statement in the DB manager and adding the results to canvas:

select * from pgr_dijkstra('ways',61798,64493)

Does anyone have any recommendations on how to fix this problem with ST_MakeLine.  That is what appears to be the problem.  It looks like ST_MakeLine is connecting additional points which is adding the additional lines above that are not part of the pgr network.  Thanks for your help.


texts: Find and split Multipolygons in spatialite

texts:
I have a spatialite table with more than 1100 Polygons. The geometry type in that table is multipolygon. There are only some real Multipolygons inside and I need only polygons. How can I find the multiparts? How can I split the multiparts?
Also are there some polygons without geometry. What is the way to identify them?
I want to do that work in the database but could do it also in QGIS.


texts:
I am trying to code gdal_polygonize source.png -f "GeoJSON" destination.geojson with the java-bindings of gdal. I don't know how to make gdal.Polygonize(...) create the "DN"-Fields one obtains when you use gdal_polygonize. Here is my code so far:

public static void gdalPolygonize(String[] args){

    gdal.AllRegister();
    ogr.RegisterAll();
    args = gdal.GeneralCmdLineProcessor(args);

    Dataset hDataset = gdal.Open(args[0], gdalconstConstants.GA_ReadOnly);
    Band rasterBand = hDataset.GetRasterBand(1);
    Driver driver = ogr.GetDriverByName("GeoJSON");
    DataSource dataSource =  driver.CreateDataSource("C:\\Users\\User\\Desktop\\destination.geojson");
    Layer outputLayer =dataSource.CreateLayer("destination");
    gdal.Polygonize(rasterBand, null, outputLayer, 0);

}

the created polygons in the geojsonfiles look like this:

{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 7858.0, 964.0 ], [ 7858.0, 965.0 ], [ 7859.0, 965.0 ], [ 7858.0, 964.0 ] ] ] } }

but they should look like this:

{ "type": "Feature", "properties": {"DN": 2}, "geometry": { "type": "Polygon", "coordinates": [ [ [ 7858.0, 964.0 ], [ 7858.0, 965.0 ], [ 7859.0, 965.0 ], [ 7858.0, 964.0 ] ] ] } }

So the difference it the "DN" in "properties".


texts: Is it possible to share CARTO datasets with password?

texts:
It's my understanding that only CARTO maps can be password-protected, not datasets. I'm currently using the datasets like so:

const source = new carto.source.Dataset(dataset);
const style = new carto.style.CartoCSS(cartoLayerCss);
const layer = new carto.layer.Layer(source, style, {
  ...
});

this.client
      .addLayer(layer)
      .then(() => {
         ...
}

Am I forced to

make the dataset private
create a map out of it
set a password on that map and
bind the pw-protected map via vis.json?


texts: Do any one have books or study material for ARC GIS Desktop Associate , i can also buy used books .


texts: How can I extract raster values around points?

texts: I'm using ArcMap 10. I have a point dataset and a .flt raster. For each point I want the sum of the raster values that lie within a certain radius of each point. i.e. I want to extract values within a given radius around each point and then sum them for each point. I just can't work out how to do it!


texts: How to configure GeoServer for web hosting on window xp?

texts:
I want to access my data (shp, img, kml, tiff file) through IE, Google chrome or Mozilla, via local hosting (then through LAN). How to configure the GeoServer, so that the client (IE, chrome) can access the data and can perform some operations like add, update, delete and store the points, lines and polygons on the map.

I have windows xp 32-bit, GeoServer 2.2.2, PostgreSQL 8.4, PostGIS 1.5.
I am new to GIS. I have tried extensive search for the solution, but I am unable to configure my GeoServer.

It is requested to please give a step by step solution for the problem.
Thanks for your suggestions and comments.


texts: Using primary keys with ArcSDE (Oracle)?

texts:
Is it possible, more advisable to assign a primary key to the OBJECTID column in a featureclass in SDE.  I am using Oracle and some of my flat tables (junction tables) need to SEE a primary key in the featureclass table in order to model a M-M relationship correctly.

By default ,no primary keys are made by Oracle when you insert and SDE layer (which makes sense as you are doing this all through ESRI tools anyway) although I know SDE creates an index in SDE, but I did not want to cause any kind of corruption if I start meddling with things on the Oracle side - is there any danger of this?

Before submitting this question I also did a little more reading around the subject, and I seem to be finding that it is bad practice to use OBJECTID as a form of primary key in any case - so would I be better off creating my own primary key field and then let Oracle maintain this with triggers and sequences?  If I do this, effectively behind SDE's back, will I upset SDE and all it's metadata etc?

UPDATE

I have found this nugget of info from Neil Clemmons - what do you think?

  Using the OID may not be a good choice. For instance, let's say you
  have a road centerline feature class related to a maintenance table
  using the OID field. If you decide to merge two centerlines into the
  same feature, ArcMap does this by deleting the two original features
  and creating a new one. Depending on how you have the relate setup,
  the records in the related table could be deleted. At the very least,
  the new feature would not be related to any records in the table
  because it has a new OID. If you based the relate on another unique
  field, the new feature would retain the attributes of one of the
  original features and the relationship with the table would be
  maintained.

and more Neil Clemmons advice...

  You shouldn't use the OID as a foreign key. This field is created and
  handled by the ArcGIS software and is present so that a unique
  identifier is always available for the ArcObjects functions that need
  one. You have no control over the value of this field. If you need
  such a field for use as a foreign key, you should create one and
  populate it yourself. This way, the value will stay with a feature
  throughout the lifetime of that feature.


texts: How to operate with vectorized data in QGIS?

texts:
I'm new in QGIS and recently I have found out how to use its tools for analyzing DEM images. My purpose was to find steep slopes on surface and mark them.
Firstly I did Fill Sinks operation. Then used Ruggedness Index to get a slope steepness map. In the end I convert raster image of Ruggedness Index to vector shapefile. An the output file has about 208000 polygons with a coloumn that shows a percantage of slope or a sort of.
Finally I wanted to merge these polygons according to percentage to get only three types of slopes (0%-30%; 30%-60%; 60%-99%). But when I tried to use field calculator or dissolve tool it took lots of time to complete the task.
What you would recommend me to do? Is there any way to decrease the quantity of polygons or any other tools to do calculations faster?


texts: Make Atlas zoom over all the selected element at once in QGIS 3.6.2

texts:
With the "is_selected" function and a virtual field created with the field calculator, it is possible to make Atlas zoom over the selected elements, one each time.
Is it possible to make Atlas zoom over all the selected elements at once?


texts: Sentinel-1 GRD: which intensity to use (VV, VH, or combination of these)?

texts:
I have Sentinel-1 IW GRD images; for each capture date, one geotif with the VV and one with the VH values. I assume these are intensity values for the co-polarization and cross-polarization bands.
To perform image segmentation (estimating parcel boundaries), I was advised to use the SAR intensity values. Should I use VV, VH, or a combination of these (maybe squared sum: VV^2 + VH^2)?

I have tried using both and their squared sum, but the resulting image segments do not correlate well with what I see on the S2 rgb-images.

Thanks!


texts: Calculating "sun time" on areas with high mountains? Topography available

texts:
I'm wondering how to proceed if you want to calculate how a location on land will get direct sunshine at a given time on a given date (compared being in the shadow of the mountains)? The area is very dense with high mountains, and located well above the polar circle (69 degrees north). This means the path of the sun will vary greatly (from polar night (below horizon for a few months), to midnight sun (above horizon)).

I have the topography of the area available.
I can (probably) get the path (or highest point) of the sun on a given day.

I have absolutely no clue how to tackle this problem.

Ideas? Is this possible with free GIS tools (QGIS)?


texts: Seeking tool(set) for creating community map?

texts:
When you move to a new place, it's very useful to have maps tailored to your interests available at the click of a mouse or tap of a smart phone. The following projects are great examples of more personal local maps:

Map of independent bookshops (seemingly a dying breed) at the national level
Map of independent shops in Peterborough:
Best of all, the 'urbal map' of a wide range of urban features and activities, based in Leeds.

These resources are fantastic, adding independence and providing a counter to the homogeneity of massive worldwide maps such as Google and Bing.

How can I best implement this on a small scale for a local organisation?

For example maps are needed to locate fruit trees for an urban agriculture project such as abundance.

The criteria are as follows:

Low price or free
User friendly, allowing more than 1 person to contribute
Scalable
(preferable but not essential) levels of security so sensitive information is only viewable by some people

The options I have considered for such a tasks, along with +s and -s are:

QGIS Cloud: + works on very accessible GIS, free.    - seemed glitchy, not necessarily user friendly or easy to add new features for new users
Create geojson files and serve them from Github, using OpenLayers on the client side to process the files, allowing different layers to be added/removed
(I have actually experimented with this on, adding a couple of shop polygons not yet on OSM or Google Maps) + simple, lightweight and free,    - not user friendly - must edit geojson files externally
Geoserver: I've used this before, and enjoyed it until AWS, my remote server, started charging me + scalable, user interface, security levels - potential costs,   - overkill for a small project.
MapQuest Open + uses pre-existing OSM data,   - seemed limited in terms of functionality

Which of these would you recommend?

Have I missed any better options from the list?

And how should I organize different tools to work harmoniously together in the final solution?

Will try to keep people updated with progress on this as I think there is a real need for development of interactive local and community maps.


texts:
Has anyone noticed that this example http://openlayers.org/en/latest/examples/export-pdf.html
hangs if you try to print more then once?

I am using the same code and does it for me as well. I have tried to figure out why it does it but no luck. The problem seems to arise when resetting the map to the original size and extent. For me if I omit that part it works but it keeps zooming out which I don't want.


texts: Driving Zone Computation using Web Processing Services

texts:
I am currently evaluating different OGC Services(WFS,WMS and WPS) for driving zone computation.  As I am new to WPS services, I would like some suggestions regarding which OGC services to implement.

I am thinking through these issues right now:

If I use WPS to calculate driving zones, is it better to integrate this computation as Web Processing Service or to directly compute it in the App Server?  Would the client be overwhelmed or exhausted with delays in computation?

Is there any way to deal with driving zone computations that exceed some predefined computation time limit, like couple of seconds?

Also is there any issue if my background map layer is in different road network than the road network where driving zone computation is being performed?

Please correct me if my concept is misleading.

Thanks


texts: QGIS 2.18 Python Error When Using Vector/Raster Tools

texts:
I used to be able to use QGIS 2.16 Vector and Raster tools successfully however at some point I started receiving the following error when running tools (and sometimes when QGIS starts up). I am unable to run ANY tool however I can run scripts through the Python console (for example: read/write to text file). I thought that uninstalling 2.16 and reinstalling 2.18 would solve this error but it didn't. Does anyone have any guidance?

An error has occurred while executing Python code:

AttributeError: 'module' object has no attribute 'GetEnvironmentVariableW'
Traceback (most recent call last):
  File "boot_com_servers.py", line 44, in
  File "C:/PROGRA~1/QGIS2~1.18/apps/qgis/./python\qgis\utils.py", line 607, in _import
  File "os_integration\windows\shell_extension.pyc", line 9, in
AttributeError: 'module' object has no attribute 'GetEnvironmentVariableW'

Python version: 2.7.5 (default, May 15 2013, 22:44:16) [MSC v.1500 64 bit (AMD64)]
QGIS version: 2.18.0 Las Palmas, 0332f5a

Python Path:
C:/PROGRA~1/QGIS2~1.18/apps/qgis/./python/plugins\processing
C:/PROGRA~1/QGIS2~1.18/apps/qgis/./python
C:/Users/Anon/.qgis2/python
C:/Users/Anon/.qgis2/python/plugins
C:/PROGRA~1/QGIS2~1.18/apps/qgis/./python/plugins
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\matplotlib-1.3.1-py2.7-win-amd64.egg
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\nose-1.3.3-py2.7.egg
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\tornado-4.0.1-py2.7-win-amd64.egg
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\backports.ssl_match_hostname-3.4.0.2-py2.7.egg
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\certifi-14.05.14-py2.7.egg
C:\PROGRA~1\QGIS2~1.18\bin\python27.zip
C:\PROGRA~1\QGIS2~1.18\apps\Python27\DLLs
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\plat-win
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\lib-tk
C:\PROGRA~1\QGIS2~1.18\bin
C:\PROGRA~1\QGIS2~1.18\apps\Python27
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\PIL
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\jinja2-2.7.2-py2.7.egg
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\markupsafe-0.23-py2.7-win-amd64.egg
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\pytz-2012j-py2.7.egg
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\win32
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\win32\lib
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\Pythonwin
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\Shapely-1.2.18-py2.7-win-amd64.egg
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\wx-2.8-msw-unicode
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\xlrd-0.9.2-py2.7.egg
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\xlwt-0.7.5-py2.7.egg


texts: Open source GIS tool for mapping health data

texts:
Im looking for an open source desktop gis tool that can be used for visualization and exploratory analysis.

I want it to be interactive and perhaps display two or more maps at the same time to allow for comparative analysis.

I know CommonGIS allows for this, but are there any others?

thanks!


texts: Transforming x/y co-ordinates of 'custom' map to 'real' long/lat co-ordinates?

texts:
I have in front of me a 'custom' map of an area I like to visit. It's just a representation of the area, so there's no real connection between the points on the 'custom' map (a) and how they would relate on a 'real', geographically correct map. As an example, think of how a ski resort map represents a ski area whilst looking nothing like a real map.

I'd like to take this custom map and, given some relationships between notable points on it and their actual lat/long co-ordinates, create a [x/y --> lat/long] co-ordinates map. Ideally, the more points I can relate to real lat/long co-ordinates, the more accurate this map should be.

The end result would allow me to take a lat/long co-ordinate (e.g. from GPS) and pin-point that location to a point on my custom map.


texts: Is it possible to add a gvSIG document on Html?And if yes, how?

texts:
I have completed a project in gvSIG and now I would like to be able to open it from my webpage, like a hyperlink or path or something.Can I really do that somehow? And if yes, could you please explain how?

Thanks a lot.

Eva


texts:
I'm new to interpolations.

I'm looking for documentation to understand how inverse distance algorithm works and how to code it.

My intention is to code IDW algorithm in JavaScript to see if it is feasible in performance meaning.


texts: How to change a point of an arrow on Print Composer?

texts:
To create an arrow on the Print Composer I've used this:

qC = QgsComposition(iface.mapCanvas().mapRenderer())
arw = QgsComposerArrow(QPointF(0, 0),QPointF(10,10),qC)

However, I can't find an attribute or method to change any of the two points.

I've tried with:

arw.setRect(QRectF(QPointF(0,0),QPointF(0,20)))

but it seems to change the precision and swaps the arrow head to the other end with every change. The same happens using .setSceneRect() . It seems to me this is not the way to go. Can anybody help me with this?


texts: Using vmin and vmax does not change anything for my plots

texts:
I have this code here for plotting 2 variables with different values

Min:0 Max:33
Min:0 Max:13

 import geopandas as gpd
 import pandas as pd
 import matplotlib.pyplot as plt

 pm10_base = gpd.read_file('~/Desktop/wrfpy/benmap/BenMAP/Shapefiles/pm10/baseline.shp')
 pm10_euro = gpd.read_file('~/Desktop/wrfpy/benmap/BenMAP/Shapefiles/pm10/euro4/Control.shp')

 # set the value column that will be visualised
 variable = 'D24HourMean'
 # set the range for the choropleth values
 vmin, vmax = 0, 35
 # create figure and axes for Matplotlib
 fig, ax = plt.subplots(1, figsize=(8, 10))
 # remove the axis
 ax.axis('off')
 # add a title and annotation
 ax.set_title('PM\u2081\u2080 (Baseline)', fontdict={'fontsize': '20', 'fontweight' : '4'}, y=1.08)
 # Create colorbar legend
 sm = plt.cm.ScalarMappable(cmap='autumn_r', norm=plt.Normalize(vmin=vmin, vmax=vmax))
 # empty array for the data range
 sm.set_array([])
 # add the colorbar to the figure
 a = fig.colorbar(sm)
 a.ax.tick_params(labelsize='large')

 # create map
 pm10_base.plot(column=variable, cmap='autumn_r', linewidth=0.8, ax=ax, edgecolor='0.8')

 # Add Labels
 pm10_base['coords'] = pm10_base['geometry'].apply(lambda x: x.representative_point().coords[:])
 pm10_base['coords'] = [coords[0] for coords in pm10_base['coords']]
 for idx, row in pm10_base.iterrows():
     plt.annotate(s=row['LGU'], xy=row['coords'],horizontalalignment='center')

 plt.savefig('/Users/jacob/Desktop/wrfpy/benmap/test.png', bbox_inches = 'tight', pad_inches = 0)

Now, I have set the vmin and vmax to 0 to 35, which is exactly the minimum and maximum value for my first data pm10_base['D24HourMean'].

Now, I use the same code with a different variable to plot the second one

I did not change vmin and vmax, to plot another set of data that has a different (LOWER) minimum and maximum.

I want the same scale to represent the next data. however, it seems like it does not follow as seen in the plots below.
The result should be that the second plot has the same scale, but has different colors based on the scale set.

Any tips?


texts: Re-sloping given DEM to pre-determined slope in ArcGIS?

texts:
I have a set of topographic contours of a mine and like to re-slope those areas alongside the river to a pre-determined slope, say 22˚; and 27˚ for water pond wall. The existing slopes along the river and the water pond vary from 5˚ to 32˚.

Does anyone know any tools in ArcGIS 10.1 can be used to perform this specific task?


texts: I have a .qgis contour plot.  I would like to convert this to a .kml file. How specifically would I go about doing this?


texts: Count number of pixels within polygon that have a particular range of values in Earth Engine

texts:
I am working with the Global Forest Cover Change (GFCC) rasters for 2000 to create a forest quality score for 0.01 degree tiles (the percent of the tile with +50% forest cover, divided by the percent of the tile with +10% forest cover).
var gfcc00 = ee.ImageCollection('NASA/MEASURES/GFCC/TC/v3')
      .filter(ee.Filter.date('2000-01-01', '2000-12-31'))
      .select('tree_canopy_cover');

var gfcc2000 = gfcc00.reduce(ee.Reducer.mean());

For simplicity, I wanted to produce per-tile counts of pixels with +50% FC and +10% FC. I did so by reclassifying the raster so that only the values that fall in this range are 1s, else zero.
var fifty00 = ee.Image(1)
          .where(gfcc2000.gte(50).and(gfcc2000.lte(100)), 1)
          .where(gfcc2000.lt(50), 0)
          .where(gfcc2000.gt(100), 0);

Then I used a reducer function, to sum up the pixel values.
var count50 = tiles1.map(function(feature) {
  return feature.set(fifty002.reduceRegion({
    reducer: ee.Reducer.sum(),
    geometry: feature.geometry(),
    scale: 30
  }));
});

I expected the image reducer to give me an integer value for each tile, but instead, it's a decimal value. Why is that? How do I get an integer value? Full code here.


texts: How to calculate F_NODE and T_NODE fields in a street shapefile

texts: I have developed a Streets shapefile from papermaps and using GoogleEarth. Can someone tell me a very simple method to bring values in F_NODE and T_NODE fields in my attribute table, so that I can ultimately develop Turn Tables and use my network for route optimisation?


texts: Generate multiple polygons based on JPEG image?

texts:
I have a number of image files depicting polygons (the original shapefiles are lost). Is there a way to automatically create new polygons in GIS, based on the form of the shapes visible in the image?
Ideally this would include distinguishing bettween different colours, e.g. by adding information to the attribute table for each color category.


texts: OpenLayers: Error message 404 (Not Found)

texts: I've created a map using openlayers contains osm, google layers and some vector features, On loading it shows two errors like:  GET http://tile.openstreetmap.org/0/0/1.png 404 (Not Found). How to prevent this , I've googled it, and i can't understand what is the exact problem and how to solve this please help me.


texts: Use Google Direction API result to display route in OpenLayers

texts:
I need to show route between 2 points in OpenLayers. I have received the route details from Google Directions API. The API has given start location / end location, Steps and overlay_polyline (encoded) data.

The overlay_polyline shows right path using url 'https://developers.google.com/maps/documentation/utilities/polylineutility' , but as this is encrypted I extracted coordinates from Steps array as lat/long and added a vector layer on OpenLayers map but in this way many points are left in between and road curvature is not considered.

Output of my API (which formats Directions API output):

{
  "end_address": "100 Universal City Plaza, Universal City, CA 91608, USA",
  "end_location": {
    "lat": 34.1358593,
    "lng": -118.3511633
  },
  "start_address": "1313 Disneyland Dr, Anaheim, CA 92802, USA",
  "start_location": {
    "lat": 33.8160897,
    "lng": -117.9225226
  },
  "distance": {
    "text": "35.1 mi",
    "value": 56511
  },
  "duration": {
    "text": "49 mins",
    "value": 2924
  },
  "Locations": [
    {
      "lat": 33.8160897,
      "lng": -117.9225226
    },
    {
      "lat": 33.8160679,
      "lng": -117.9225314
    },
    {
      "lat": 33.8155824,
      "lng": -117.9235917
    },
    {
      "lat": 33.816278,
      "lng": -117.9242395
    },
    {
      "lat": 33.817613,
      "lng": -117.924097
    },
    {
      "lat": 33.8179964,
      "lng": -117.9235637
    },
    {
      "lat": 33.8179846,
      "lng": -117.9223305
    },
    {
      "lat": 33.8207878,
      "lng": -117.9230963
    },
    {
      "lat": 34.0256221,
      "lng": -118.2059515
    },
    {
      "lat": 34.1294658,
      "lng": -118.3475583
    },
    {
      "lat": 34.1307998,
      "lng": -118.3485738
    },
    {
      "lat": 34.1338819,
      "lng": -118.3515888
    },
    {
      "lat": 34.1358593,
      "lng": -118.3511633
    }
  ],
  "overview_polyline": {
    "points": "qukmEvvvnUz@l@\\n@H|@KvAI`BsB@Ee@O?e@BoAC_@H}@?_@??S?_@?ACCe@_@[OGm@BiEAs@_@Bm@HyEhAaC|@eCv@eF_BgB]wAHmAb@oJdIeCxB}@nAmI~H{JtKgOfPg@b@qDnGsAvDoAvEeC~PeBhKoAhEqDrIwa@b_AyCzGyBdEqFnJqB~DeFxMiOh_@gVdk@oCxEiD~EgDpEkHhKa@x@wAxDc@nBcDzNaDxNkCbIgFfL_JrOmG~M{MxZkN~ZgC`GiFjLaDpGgDzEkDbEiE|FqBlDgIzQoRlc@aIrQuEjK{CrGaD`GmDbHcCnG}GhNaUnj@kDhIwBrFaK|TkG`MqRp`@iEdJoC|GkBfE_GpL_FfIuFtH}GrHySlSuE|EmEjGgFjKwFxLeHfK{FrGqC|BmFvDyIvF}D`Cuu@be@ySvN{ThNe\\fRo]fSmR~KoNrIkDzCeCrC{I|Mu^xj@gSxZyAbBmC`C}AfA{DvBoC~@sNzC_L`CaFdAoEpAsHxDqM~IyCzBuCjCeGfGgShS{H`IyCnEoD~FyB~CgCfCkElEom@tk@{DjC}BhAmCvAqDjCkVbUsCvCoH`JuGjIuF~JeE`FwF`FgA`AcCvCkChFyBfG{JhY}AdFuAnHo@rCw@rBuBhEMTy@jBcMp^}BjH[pAqAjJWrI@zo@m@nJu@vEgAbEuJ~YkHrTsD`Lq@pC@h@}BzI}Mn`@wF~O}DjJqDzFoAzA]PiChC{C|BwBbAgFdAeDDsGk@qHTsEK_Dg@aKw@wJDuFRwCXqDr@gEtAoEjBsItDkBnBiAfCc@~Bg@bHyCp]a@|Ge@zKPtFWhCa@jBu@rBqChFoLrTgEjHyF`IoFbFgKpIeDrCkEbG_NzSaDnHcB`GkK~a@sFhQ_DlJwChJ_CfHkCtGmDfMqGx\\wE~ZuBlP_BjLwAbGiAzCkGzNmJnWcDlHcOxVeDbFcCrCqFjE{MdHwBjA_C`BiCpCoAnB_HhMcDnFkB|BqE`EcEfCuOvHsDlBkBxAiBrB{B~Dy@`Cs@zCa@pDKlFInGe@vEYtAwAfEeFxJ{M`XkDzGeAzAqDtD{AhAqAl@sCt@qLxCoRpDeErAmD`BaEbCqC~BqEzEaBnB}FnHmB|BkBdBsG|DcElDsFvFkCdCM?qBdB_ChB_IdFmDdFiA~@gA~ASBe@KiB_AcAU_BKo@@"
  }
}

There is a difference for other searches when I draw a line using locations array and using overview_polyline in the polylineutility. overview_polyline is accurate.

Is there a better way to show route in OpenLayersor? How can I use this overlay_polyline property in OpenLayers?


texts: Is it possible to transform utf grid documents into shape files? I only have the utfgrid files and wish to use the shape files to render outlines on a map.


texts: OpenLayers - Vector Layer and Google Maps - vector layer and google layers don't seem to be in sync when zooming on Chrome

texts:
I am working with a Google Layer and a vector layer in OpenLayers. I was wondering if anyone else noticed any problems with Chrome displaying Google Maps layers on OpenLayers? It seems that when I zoom, it is much slower than doing Google Maps by itself (say, at the google maps site). And when I zoom with a Vector Layer that has features, they don't zoom in sync with the google map. It seems like I zoom, and the vector layer will get more zoomed in much faster than the Google maps layer. I tried it in firefox and it seems to work much much better (still notice it if you zoom in super super fast, but it is barely noticable). I also noticed that the google layers have some kind of strange space between the tiles, like a 1px split between each map tile.

For example this code will do it:

http://openlayers.org/dev/examples/spherical-mercator.html

But it works fine in Firefox. Does OpenLayers and Google Maps just not work well in Google Chrome?


texts:
I am trying to open an .asc file (pick, for example, that one for 2014) from the German Federal Ministry of Transport and Digital Infrastructure. It contains information on the annual solar radiation. There are a few threads on problems with asc files but none of them helped me with this case. I tried Raster-Conversion-Translate (Convert Format) but that did not help either. The gdal command this windows genereates is

gdal_translate -a_srs EPSG:3044 -of AAIGrid __path__/grids_germany_annual_solar_Globalstrahlung_DE_2014.asc /Users/***/Desktop/dsada.asc

I got the following error.

ERROR 4: `/Users/***/Desktop/grids_germany_annual_solar_Globalstrahlung_DE_2014.asc' not recognised as a supported file format.

GDALOpen failed - 4 `__path__/grids_germany_annual_solar_Globalstrahlung_DE_2014.asc' not recognised as a supported file format.

I am using QGIS 2.8 on a Mac OS X with 8 GB of memory.


texts:
I created a GeoDjango model using RasterField(). I have been trying to upload the raster using postgis. Here is how I load the raster

raster = GDALRaster('rasters/data/my_image.tif', write = True)
r = Rast(name = "Hello", image = raster)
r.save()

Everything works fine until I try to save the object and get

  django.db.utils.OperationalError: cannot allocate memory for output buffer.

I am not sure how to solve this. The raster is a single image that is around one gb. When I look at my usage during this process I notice that almost all of my 32gb of ram is being used for some reason. Can this be chunked or is there an alternative to saving this?


texts: Need help in Symbology for ArcGIS JS API 3.2/3.3

texts:
I am displaying various symbols in my application and initially all are displaying at once (looks like bulky) so how do I set symbol levels in ArcGIS so that according to zoom level symbol size will increase or it will auto-fit according to resolution. Please check the screenshot for various levels.

I am researching on my side and ArcGIS help. (I think visible scale range will work but I am not sure and total layers are five so should I set same levels for all layers?

Update :

I can not change the default extent (because that layers data is coming dynamically (We have data across the world so setting to specific extent is not possible))

Software : ArcGIS Server/Desktop 10.1 , ArcGIS JSAPI 32./3.3


texts: Make legend in QGIS only show features in the view extent?

texts:
I am trying to create a legend in QGIS 2.18.22 so that it only shows the features that are in the current map extent in the print composer. I have been selecting the 'only show items inside current atlas feature' tick box however nothing changes.

I still end up with a massive legend like this even though only a fraction of those features are visible.

I am reluctant to clip the layer to the current view extent to solve the problem that way as when I scan to another part of the map I will have to do the same thing again and I may need to make multiple maps off this layer. Alternatively I could also remove the classifications for each legend item that isn't visible under properties in the main map view however again every time I make a map in a different area I would have to repeat this.

What is the solution to this problem?


texts: How to force ArcGIS server to create KML?

texts:
Attempting to serve arcgis server (AGS) 10 sde data to Google Earth (GE).
I don't have any problem opening the service or the network link in GE on my desktop.
When I try to open in ipad device nothing happens.
Finally today I got a message "kmz not supported on iphone".
My network links generated by AGS are all kmz.
Is there a way to force AGS to use kml instead?
...or has anyone been successful with AGS service on an ipad?

EDIT:  I do have specific reasons for using GE. I hope to negate those  with some time. However everything I have built to this point has been flex. (I was informed that we now have ipad devices).
So either rebuild all my widgets in java, or find a solution that allows kml on the ipad.
Update: I get an error if I try to open kmz,
if I unzip it and put the kml in my network link folder it just doesn't work.
if I try to publish a network link with the kml ags says no kmz found.
I guess I am on to rebuild all my widgets in java.


texts: QGIS print layout (large size printed image)

texts: I have been asked to create large size images to be the printed with a good quality to look at. The images could be with dimensions of 1 meter in height or width, but even larger. I must create these large images starting from maps that are created online ( I do not say the source to avoid advertisement) and those images can be only downloaded as jpg images. The dimensions of the maps, in pixels, can vary depending on the map but each pixel corresponds to 10m in the map, while the horizontal and vertical DPI resolution is 96. In the layout composer of QGIS I have tried to set the sizes of the image even at 2m and then I saved the image as a tiff with dpi = 300, starting from an image of 1456x611 pixels. I obtained an image of 23622x9502. Of course the file is quite big, but this is not the problem. What I wonder is if the printed image could come out pixelated or with a good printing quality. And which settings can actually give a good print quality to be used in QGIS when images should be so large


texts: Expression to Transform XY coordinates to LatLong in QGIS

texts:
I have a Point Layer referenced in a projected CRS (UTM) with X, Y and Elev fields that represent coordinates of some points I have surveyed. I would like to have in the same layer Lat and Long fields coordinates from those XY values without projecting my layer to an Geographic CRS. Would someone help with the expression I could use?
QGIS v3.10


texts: How to use GRASS v.kernel to calculate point densities along a network?

texts:
In a road network, I need to select the segments where a minimum of 5 dots occur (1 dot = 1 address) over a distance of 100 m (the image attached illustrates my question). I'm trying to use GRASS v.kernel for this, with a uniform distribution but I do not know how to configure it. Using these parameters:

v.kernel -v input=MY_LOCATIONS net=MY_NETWORK output=MY_OUTPUT stddeviation=100 distmax=1 mult=200 node=split kernel=uniform

I do get segments as a result with values going up where more dots occur, but I do not know hot to interpret them.

In the image attached: segments such as indicated by the green circle are what I am looking for.


texts: Uploading GPX Files to GPS (Garmin) in QGIS

texts:
I am fairly new to QGIS and GIS in general so it's hard to tell what I'm doing wrong.

I am using a GPSMap 64st and can't seem to successfully upload any GPX files to it through QGIS.

I am able to select the correct data layers in the GPS Tool, can select my GPS device, and am using the USB port. Everything looks good and then I press 'OK' and the window closes but nothing happens. No error message, but when I check my GPS nothing is on it.

I have tried 'Edit Device' and adding in a new device as described here:
 Quantum GIS – using a USB GPS device.

But it hasn't worked either. Also somewhere else I saw to change the commands provided in the link to use gpsbabel instead of %babel and that hasn't worked for me either. I also have separately downloaded the babel software just in case although I thought you should have that automatically installed with QGIS?

I'm using QGIS 3.4.14 although I tried in 3.10 too with no luck.

I am able to successfully download data from my GPS, although I usually just use the 'Load GPX File' in GPS tools and select the files directly from my Garmin in the file explorer window, I'm not sure if this is normally how you're supposed to do this.

I also have successfully uploaded the very same GPX files to my GPS using other programs (Ozi and DNRGPS) but I would like to be able to do this using QGIS.


texts: Updating feature attribute in QGIS plugin?

texts:
I am writing a plugin for QGIS (v2.12).

There have been quite a few similar questions on this forum, but they don't seem to work for me.  My plugin does the following:

get the vector layer
check that it is a line shapefile.
get the raster layer
look at the vector layer, if there isn't a attribute named 'slope' add it.
step through each line in the shape layer and compute the slope.
change the attribute value for that line to the computed slope.

My problem is the last step, I can compute the slope, set the attribute value for that field, but it never appears in the attribute table after the plugin completes.

Here is the relevant code, the logMessages are all valid, the # comments are things I have tried.  I like setAttribute the best.

selectedVectorLayer.startEditing()
for line in selectedVectorLayer.getFeatures():
    slope = self.getLineSlope(line, rasterData)
    columnid = selectedVectorLayer.fieldNameIndex('slope')
    QgsMessageLog.logMessage("id: {} segment: {} Slope: {}".format(line.attribute('id'), line.attribute('segment'), slope) , 'LineSlopes', QgsMessageLog.INFO)
    #line.changeAttributeValues(line.id(), columnid, slope)
    #attrib = {0: line.id(), 1: line.attribute('segment'), 2: slope }
    #selectedVectorLayer.dataProvider().changeAttributeValues({line.id(): attrib})
    line.setAttribute('slope', slope)
    QgsMessageLog.logMessage("id: {} segment: {} Slope: {}".format(line.attribute('id'), line.attribute('segment'), line.attribute('slope')) , 'LineSlopes', QgsMessageLog.INFO)
selectedVectorLayer.commitChanges()

I'm thinking that there has to be something simple that I have overlooked.


texts:
I would like to know if there is any equivalent on QGIS for the ArcGIS function 'Features to Polygons':
https://desktop.arcgis.com/en/arcmap/10.3/tools/data-management-toolbox/feature-to-polygon.htm
The basic QGIS does not have it (There is a function called lines to polygons but it just closes the first and las vertex), but I wonder if there is any other way using a plugin, macro, python script or other free software to do the same as the ArcGIS 'Features to Polygons'.


texts:
We're migrating from a working 'tilecache' server to a new 'tilestache' server.

I have been chasing my tail for 2 days now trying to figure out how to get tilestache-seed to cache some tiles. I'm failing miserably and neither the tilestache docs nor google are helping at all. It must be me.

I have a configuration that looks like this:

{
    "cache": {
        "name": "Disk",
        "path": "/opt/tiles",
        "umask": "0000",
        "dirs": "safe"
    },
    "logging": "debug",
    "layers": {
        "staging": {
            "provider": {
                "name": "url template",
                "template": "http://example.com/common/services/imagegen/?mapservice=cities&cs=102113&crs=102113&layers=6&format=png&bbox=$xmin,$ymin,$xmax,$ymax"
            }
        }
    }
}

A typical tilestache-seed command line looks like this

./seed -c tilestache.json -l staging -b -65.167510000 47.589390000 -65.167490000 47.589410000

Note: seed is a symlink to tilecache-seed.py - PIA to type the full path so much :)

Note also that 'imagegen' is a proprietary application that sits in front of ArcIMS to manage other things about the image generation. Nothing magic, just additional capability that is irrelevant in this particular case.

Running the command line and nothing at all happens. No output at all from tilestache-seed. It is not making a call to the URL in the config file - I can see that because imagegen writes the generated image to an output directory on the web server, and there's nothing being written in response to seed being run.

If I manually massage the seed command line and substituting the -b parameters into the proper spots in the URL and paste that in a browser, I generate an image just fine.

So why isn't seed doing what I think it should be doing?

I figure there must be a way to see what's going on inside seed. Well, no command line option to turn on "verbose" mode. Ah, I can use the Test cache and turn on verbose there. No, that changes nothing - no output of any sort.

Note that the example in the tilestache docs for the Test cache appears to be in error:

"verbose": True

throws an error when running seed.

"verbose": true

fixes the error, but doesn't generate any additional output.

Can someone provide me guidance, please, on a) what might be wrong with my configuration and/or b) how to turn on some sort of diagnostic mode so that I can debug this further? I'm not a python guy, though that's a skill I probably ought to acquire.

Thanks!

Bo

PS: Any reference to 'tilecache' should read 'tilestache' - been typing the former for too many years :)


texts: How to add feature class from ESRI personal geodatabase (.mdb) in QGIS

texts: How do you add a feature class in a ESRI personal gdb in qgis. I understand this can be done through the option add vector layer and select geodatabase. But what after that ? It doesn't allow me to browse through .


texts: Set NEW master authentication password not working

texts:
I've having an issue with the master authentication password. When trying to set a new password it will never let me click "OK".

No combination of upper case/ lower case/ symbols/ number etc. seems to work.

I've tried on version 3.4 Madeira and on 3.5 Coruna and still no success. If possible i'd like to remove the requirement for a password altogether.

Does anyone have any ideas?


texts: Adding a fixed infobox showing an image when clicking on a feature

texts: Each of my data points have a different image. The images are uploaded to a web server and on CARTO I created a column with the url {{image_url}}. This works fine when showing the images on hover event - but I need the images to be shown when clicking the data point on a FIXED infobox.


texts:
I am currently working on PgAdmin, and the pgrouting extension, in order to get the length and the path of the shortest path between every LNG terminal over the world (I have them as a table of points).
Thus I created a wolrdwild grid, that avoid lands as the boats carrying the LNG has to go only through the sea.
I have the LNG terminals as a table of points.
I linked every terminal (point) to the grid with st_shortestline, so I got a table shortestline.
Then I got the completed network by merging the shortesline table and the grid table. So this network links every LNG terminal over the world.

This network being created, I processed the topology as :

ALTER TABLE network
ADD COLUMN source integer,
ADD COLUMN target integer,
ADD COLUMN cost double precision,
ADD COLUMN x1 double precision,
ADD COLUMN y1 double precision,
ADD COLUMN x2 double precision,
ADD COLUMN y2 double precision;

UPDATE network
SET x1=st_x(st_startpoint(geom)),
y1=st_y(st_startpoint(geom)),
x2=st_x(st_endpoint(geom)),
y2=st_y(st_endpoint(geom));

CREATE INDEX network_idx ON network USING gist (geom);

SELECT pgr_createTopology('network', 0.000000001, 'geom', 'id');

Then I got the "network_vertices_pgr" table.
I wanted to process the pgr_dijkstra algorithm from one terminal to another, and for every terminal. It would give me the shortest path between every pair of LNG terminal.
So I created a mediator table called "table_correspondance" telling me, for every LNG terminal point, to which id from the network_vertices_pgr table it corresponds with.
Then I processed pgr_dijkstra with the id of one terminal as Source (id known with the table_correspondance) and the id of another terminal Target (also known with the table_correspondance).

Unfortunately, I realised the algorithm was working only for somme source/target couple. Several couple of terminal points (about 75% of them) just give void results, and I can't figure out why.
For instance, the following instruction give a void result :

SELECT seq, id1 AS node, id2 AS edge, cost
FROM pgr_Dijkstra('SELECT id, source, target, cost, x1, y1, x2, y2 FROM network', 20, 50, FALSE, FALSE);

I used pgr_kdijkstra to see on QGIS the Source/Target couples whose the paths were accurately processed. First I thought it was because of the grid that had isolated lines leading to deadends, that could give void results.
But I noticed on QGIS that, for the same source with pgr_kdijkstra, some targets were processed whereas other target, very close geographically, were not processed. And the grid around them was continuous.
When I run the pgr_analyseGraph, it returns OK, there is,apparently, no problem with the network.

I realised the global code many times, but I always get this problem.
I also checked my "table_correspondance" (representing every LNG terminal point), and it's accurate : each point matches with a point in the "network_vertices_pgr" table (representing every point of the network).

If it's not a problem with the network structure nor a problem with source/target points, I really can't figure out why it's not working.

The only thing that could be a problem, but I couldn't really understand why if it was :
When I create the topology with the network table and pgr_createTopology, some lines have empty "source" and "target" values.
But pg_dijkstra requires to get ride of the lines having null values in the Source column to process. So I deleted them.

Would you have any idea why it would keep not working for me?


texts: Google Streetview Action, different EPSG in QGIS

texts:
I'm administrating about 30 QGIS users (migrating from Mapinfo) and they want to open google streetview using an Action (through layer properties). However I'm using EPSG 3007, not Lat/Long (EPSG 3857?). I dont want to reproject.

I would like the Action to open a browser with
http://maps.google.com/maps?q=&layer=c&cbll=57.718,11.958 (or whatever lat/long the cursor is at the moment), regardless of there being a streetview. No problem if the streetview turns out to be out of bounds and black as they likely won't try streetview out in the ocean. Streetview snaps to roads anyway, right?

I don't want to use a plugin (I know there are good ones to use), because I have several other Actions active through the Identify-tool.


texts: Create an enterprise geodatabase - Administrator username and password are required

texts:
I am trying to create an enterprise geodatabase in oracle 11g, using the create enterprise geodatabase tool  in arcmap 10.2.
I have properly installed the oracle client needed and I am able to create a database connection (both as sys and system users).

However, when I am trying to execute the tool create enterprise geodatabase, it fails.
I asks for administrator username and password as shown in the image.

Any ideas about how this could be resolved or debugged ?


texts: How to overlay a TMS with a GeoTiff for querying in OpenLayers?

texts: I'm using OpenLayers to display a set of TMS tiles I have on my webserver. Plain and simple, I was wondering how I would go about overlaying a set of GeoTiff files I have over the tiles so that when I click somewhere on the map, it would give me the information from the tiff files (altitude and such).


texts: Combining multiple attributes of a single layer

texts:
I'm making a map that consists of 500x500m grids. These grids have four attributes that are of importance to me, of which 2 attributes are "linked".

Three of these attributes ("Nature", "Protection" and "Calculating") are binary (0 or 1), and the fourth ("Calculated_Points") are decimal values.

When I say two of these values are linked I mean to say that when one binary value ("Calculating") is equal to 1 there is a value in the decimal attribute ("Calculated_Points"). If "Calculating" equals 0, there is no value in "Calculated_Points".

What I need to display on my map is rather straight forward, but I can't seem to get it into ArcMap.

For all cases where "Protection" equals 1 I want to fill the grids with a dotted transparant pattern.
For all cases where "Nature" equals 1 I want a dark green fill.
For all cases where "Calculating" equals one, I want to display a sliding color scale based on the value of "Calculated_Points", grouped in 5 categories. (0-100; 100-250; 250-500; 500-750; >750)

I know there is the option to map Multiple Attributes, but I can't seem to get it done with categories of my decimal attribute.


texts: When do GeoJSON feature collections need feature ids?

texts:
I've seen feature collections with feature ids for each feature.  I've seen others with no featureid.

When do you need it?


texts: Problems with Define Projection Tool in ArcGIS 9.3.1 SP2

texts: I have problems with Define Projection tool. I have Windows 7. and ArcGIS 9.3.1 with SP2. I have to define projection (spatial reference is undefined) for standard Croatian tif+tfw rasters and both ArcMap and ArcCatalog crash during that action. I am using MGI Balkans 5 coordinate system, which already exists in software. Project Raster tool works fine, for now.


texts: Cannot add or draw non point features in Collector

texts:
I've come across an issue with Collector. I'm in the process of developing editable online maps for a Biologist to collect field data, but I cannot add any features other than point features in the field. Adding the polygon or line features in AGOL's map viewer works fine, but I am unable to do this in Collector. Whenever I attempt adding one of these features, I get the red colored errors “No valid Length” (for lines) or “No valid Area” (for polygons) below the symbol. See the photos below. An example of my web map is here: http://arcg.is/14yDm1

I’m using an iOS iphone 5s and its updated. I’ll try asking ESRI at the conference if all else fails.


texts: SetColorInterpretation() for a GeoTiff using GDAL not working

texts:
I have a single band image which I would like to copy to a 3 bands of a new image and set the ColorInterpretation to red, green and blue respectively.  I have tried two approaches, one using the GTiff driver, explained below, and the other using the VRT driver.

My code is;

from osgeo import gdal
import os

IM = "path/to/image.tif" # single band image

### read image ###
ds = gdal.Open(IM)
X = ds.RasterXSize
Y = ds.RasterYSize
band = ds.GetRasterBand(1).ReadAsArray()

### write to 3 bands ###
driver = gdal.GetDriverByName("GTiff")
outPath = os.path.join(os.path.split(IM)[0], "test_image.tif")
outIM = driver.Create(outPath, X, Y, 3, gdal.GDT_Int16)
for i in range(1, 4):
    outIM.GetRasterBand(i).SetRasterColorInterpretation(2 + i)
    outIM.GetRasterBand(i).WriteArray(band)
    print outIM.GetRasterBand(i).GetRasterColorInterpretation()
outIM = None

The output is:

1
0
0

I have also tried using the SetColorInterpretation().

My question is, how do I set the ColorInterpretation metatag using the GTiff driver?


texts: Cannot Overlay PNG onto Map with OpenLayers

texts:
I am trying to create an OpenLayers.Layer.Image and incorporate it into my map. I have this block of code:

map = new OpenLayers.Map ({
            div: "dvMap",
            theme: null,
            projection: new OpenLayers.Projection ("EPSG:4326"),
            maxResolution: 360 / 512,
            center: new OpenLayers.LonLat (-80.92, 40.51),
            zoom: 6,
            layers: [
                 new OpenLayers.Layer.TMS ("TarigmaOSM",
                                           "http://" + maphost + "/cgi-bin/tilecache/tilecache.cgi/",
                                           {
                                                serviceVersion: "1.0.0",
                                                layername: "osm",
                                                type: "png",
                                                attribution: "Data CC-by-SA OpenStreetMap"
                                           }),
                new OpenLayers.Layer.Image ("WeatherImage",
                                            "http://localhost:8080/data/get/weather/radar?stationID=2&productID=2&anticache=" + (new Date ()).getTime (),
                                            new OpenLayers.Bounds (-78.977468899814, 38.770277779319, -84.7329398692738, 41.9763540510698),
                                            new OpenLayers.Size (600, 550),
                                            {

                                            })
            ]
        });

When I run this, I get my TarigmaOSM layer (base map) just fine, but I don't even see the request for the image layer file in Firebug, nor do I get any problems. Does anyone have any idea what's going on here and/or what I'm doing wrong?


texts:
I've created a Watershed raster data set (using the Watershed Tool) for a certain area. Within that watershed raster, there are 8 basins that appear

I'm trying add the total population to each of those 8 basins using census block data for the total watershed and then compare that data.  I'll also need to sum all of the population for those block groups. Since that total population for each basin hasn't been calculated yet.

I have tried several tools.  Clip, Join, Union, Intersect, etc.  I've also tried turning the raster to polygon, and then adding the census data (but I end up with several small polygons instead of the 8 basins that I began with) so I know the population totals wouldnt be  accurate.

I also turned the census block groups into a raster dataset, but really unsure if I did that correctly.

Anyone out there know how to accurately combine these two datasets into one?


texts: Adding Structures to Raster DEM using ArcGIS Desktop?

texts:
I am trying to simulate Natural flood management in a river catchment, particularly the role of log jams/LWD in the channel. I have created polylines where I want to put my log structures and given them a value field, in meters. I then buffered these polylines and converted them to raster.

What I want to do is add these log jam rasters into the DEM, so they simulate structures in the channel. I have read around the best way to do this and have found two possible methods, but I am unsure if they have worked.

Method 1

Mosaic to new Raster

My issue with this is that the DEM ranges from 5m to 238m, so I am wondering whether the mosaic tool changes a value from, for example 138m, to 1.5m, instead of adding this on. Or am I overthinking it?

Method 2
- Raster calculator using the following equation:
 con(IsNull("New_DEM"),"Existing_DEM",("New_DEM"+"Existing_DEM"))

This layer now has a very low minimum value, and I am wondering if the same concerns as the Mosaic to new Raster are happening.


texts: A better way to display large vector maps (~5 million features) using Google Maps API?

texts:
I have a fairly large data set, about 5 million features, that I need to display on the web using Google Maps API. I am currently processing the file in QGis with XYZ Tiles, and using the generated tiles to display on the web.

This method works, and benefits are:

Super fast load time on the web
Free to use
Works with Google Maps
API

However, the cons are:

A lot of overhead in processing time
A lot of space required for multiple zoom levels (Turns a ~2GB file into ~200GB directory)

For my purposes, only a small portion of the map will need to be displayed at one time (~1km x 1km), but the entire area covers all of Ontario (~1,600km x 1,500km). I also need to regenerate these tiles monthly based on an updated vector file

So my question is, what other options do I have to display this data? I only need to show a small portion of the map at a time, so is there a way to filter the vector file to display only what's needed?


texts: Selection shows in Attributes but not on web map served by ArcGIS Server

texts:
In ArcGIS Online webGIS, I created a map application. I have a particular layer that if I were to try to select an object within that layer, the selection displays in the attributes table, it displays as being selected in the Select widget (a 1 next to the layer), but the object is not highlighted on the map.

I've gone through the .mxd for the service, and Selection> Interactive Selection Method is selected at Create new Selection. I reconfirmed that the layer is selectable and I've re-published the service.

I'm not having this issue with the other layers that I've hosted in this web app. For whatever reason, it just doesn't show the selection on the production version.

How do I fix it?


texts: Distance between waterway labels in CartoCSS

texts: How can I manage distance between waterway labels (names of rivers) in cartoCSS?


texts: Putting a point over pixels with highest DN values within grids in QGIS

texts:
I have a raster layer in greyscale, and a vector layer that is 3 x 3 m grid. One of the attributes within the grid cell layer is the value of the highest DN number within that grid cell. I just need to get a point over the highest pixel for each grid cell. That's it.
I've tried a number of methods involving converting pixels to points so you can table join, but there's too many grid cells and QGIS crashes!


texts: Script for numbering roads based on Cardinal Direction

texts:
I am kind of new to python, and am attempting to write a script that will give me a unique identifier for roads based on the cardinal direction.  Ultimatley, I would like to have a system set up such as the interstate system in the united states, where North -South roads are odd numbered, and east west roads are even numbered.  I would also like to reflect these numbers based on their position within the area I am working in.  For example, the southern most w to e road would take the number 2, while the western most n-s road would take 1.  So far, the only code I could find is code to conver the endpoints of the roads into a numerical direction:

180 + math.atan2((!Shape.lastpoint.Y! - !Shape.firstpoint.Y!),(!Shape.lastpoint.X! - !Shape.firstpoint.X!)) * (180 / math.pi)

I am assuming I will have to write some if/else statements, but I am not entirely sure how to set them up.

I also found this block of code, but it didnt seem to work for me for numbering the n-s roads:

rec=0
def autoIncrement():
  global rec
  pStart = 1 #adjust startvalue, if req'd
  pInterval = 2 #adjust interval value, if req'd
  if (rec == 0):
    rec = pStart
  else: rec = rec + pInterval
    return rec

Even if I were to get this to work, I still don't know how to get it to number roads based on how far north/south, east/west they are.


texts:
I want to calculate the Crop Water Requirements and for this I need NDVI values for a period of time.

Because I have Sentinel 2 images and the temporal resolution is 5 days, I need also the values for NDVI for days when the satellite don't take the images.

Do you know a software that can interpolate/fill the gaps where I don't have NDVI values? I need to obtain just NDVI values for each day.


texts: Spatial difference with vector functions

texts:
I have two shapefiles, one municipal boundary, one properties (3000 Geomertien).

I would like to form a spatial difference, this unfortunately does not work with the vector functions of QGIS.


texts: How to highlight/shade areas of raster based on specific values, in R

texts:
I have a raster with values ranging from 1 to 5 like the following:

library(raster)
library(rasterVis)
library(viridis)

my_class <- raster(x=matrix(sample(x = 1:5, size = 12, replace=TRUE),4,3),
               xmn=7, xmx=10, ymn=-12, ymx=-8,
               crs=CRS("+init=epsg:4326"))
levelplot(my_class,col.regions=viridis,at=seq(1, 5,len=6))

I want to plot my raster highlighting only the areas with values 2 and 3 and keep the rest shaded, something like the first example map in this question (value by alpha).
Also, I want to have lat/lon on my axes.

Is there a way to do this in R?


texts: Most efficient way to find points in a polygon (polygon always rectangular)

texts:
This question has been asked a lot by a lot of different people I am sure.  I did some searching and found some blog posts and potential ways forward, but before I dove off into the deep end I thought I would come here to get the community consensus.

Problem Statement

I have a series of points (approximately 1.5 million) which I need to test for inclusion in rectangular polygon.  When I profile my code, this is the longest pole in the tent when it comes to execution time.  I would like to see if there is something that I can do which would reduce the execution time.

Minimal code example and Offending Code Line

library(sf)
load('inputs.RData')
points_to_include = unlist(sf::st_contains(profile_segments$buffer[[1]], bathy_data))

(The above code and the input.RData file can be found at this GitHub Gist)

This code is currently taking ~ 6 seconds to run based on microbenchmark.  While that does not seem like a long time, doing this over and over really begins to add up.

Unit: seconds
              expr      min       lq     mean   median       uq      max neval
 points_to_include 5.494459 5.532229 5.985662 5.591614 6.060509 7.249499     5

Potential Solutions

I looked at the blog post https://www.r-bloggers.com/speeding-up-spatial-analyses-by-integrating-sf-and-data-table-a-test-case-2/ for some guidance.  There hinted that possibly I could use some mashup between data.table, parallel execution, and chunking the points.  I would like to avoid the use of data.table if possible (however, the speed improvements identified on that site are fairly amazing).

One possibility I thought of was to go to a UTM style coordinate system and apply a transformation (rotation) which would place my polygon (always a rectangle, however arbitrarily sized and oriented) at the coordinate 0,0 and then just do a simple filter on xmin, xmax and ymin, ymax.  However, while the search is very fast in that sense, the transformation would take some time.

Like I mentioned before, I wanted to get peoples opinion on which way I should go so as to not spin my wheels. Thanks for any info on what I can do with my specific use case and the current state of the tools.

Platform

R: 3.5.2
RStudio: 1.3.66
SF: 0.9-2


texts: PgAdmin cannot load postgis for a database

texts:
Postgis works fine on my other postgresql databases, but I can't load postgis and postgis_topology extensions on a new database. I get following error message:

ERROR: could not load library (path to PostgreSQL): unknown error 126

Off course I could work in a different database with postgis loaded, but I don't like the idea that my new databases might not support postgis.

How to solve this problem?

I have PostgreSQL 9.2, PostGIS 2.0.1 and PgAdmin III 1.16.

EDIT:

My system is Windows XP SP 2.

And the statement I used:

  CREATE EXTENSION postgis   SCHEMA topology   VERSION "2.0.1";

I have created schema "topology" manually, but it makes the same error for


texts: Using environment variables in *.qgs-file

texts:
Is it possible to use an environment variable in qgis project file (*.qgs)? For example :

<datasource>dbname='QBASE' host=10.1.1.1 port=5432 user=USERNAME sslmode=disable key='gid' srid=0 type=MultiPolygon table="public"."geo_zone" (geom) sql=</datasource>

I need set value of environment variable "USERNAME" to value of "user".


texts: Openlayers simple custom control example

texts:
On the official openlayers site there is a custom control example which demonstration a class base control.

Can anyone give an example of a simple custom control without class usage?

According to the ol.control.Control specification, it should be possible to create one using the following statement

var myControl = new ol.control.Control({element: myElement});

but I'm quite new to javascript and cannot figure out yet how to use it.


texts: Putting map on every page of variable multipage QGIS composer?

texts:
I have a composer in QGIS with variable page number (calculated from expression). I need to put a map composer item on every page automatically and use a unique id for each map item to automate further.

Unfortunately, Atlas feature doesn't suit this particular case, because I need to show all pages simultaneously and each page should have different content.

In my case number of composer pages is determined upon an expression involving an number of features in a layer and some project variables. I need particular elements (like tables, text, legend, etc.) appear only on particular pages. If I generate an Atlas, all these elements get generated on every page. This can't be controlled from gui because item "Page" property of "Position and Size" property group can't be set as expression.
Also I need to be able to fine-tune each page separately and Atlas doesn't provide such option.


texts: What algorithms can be used to create a DTM from a DSM TIFF file i.e that will reduce or exclude features such as trees and buildings

texts:
I am using Python and QGIS. I have obtained - purchased - a 1m DSM photogrammetry data file - a TIFF. I could purchase a DTM from the same company, but they are 5m grid, and so they lose some data I wish to keep. I am looking to define glacial sediment mounds which can be fairly small and quite low.  I am trying to find - or develop - an algorithm that can be executed for small regions in the TIFF file, such as wooded areas, or buildings, and that reduce the size (both elevation and extent) of features that represent a jump in height that does not fit with the topography. Thus features are recognisable within the 1m grid by a jump in elevation of 1m or more. And thus I can - and am willing to - assume the land elevation under the feature is similar to the land elevation each side of the feature.
At present I am reading areas of the TIFF file and processing these parts cell by cell using Python and numpy.


texts:
I am looping over a feature in Arcpy and doing several geoProcessing tasks on each feature/iteration.

The loop runs pretty well but crashes on some of the features. I dont really know why but its probably because of some geometry error or something weird.

I can see what files have been output along the way so I can simply restart the loop and bypass the bad feature.

If I could somehow detect a runtime error like above, I could restart the loop and bypass the bad features. Is there any way to fire a function on a Runtime Error event?


texts: OpenLayers zoom to Boundingbox depends on lat/lon positions

texts:
I'll try to explain my application and the problem.

My application gets a position for a zip code and receives a Lat/Long position, then I'm looking for all points around this position and show them.(This works fine)

Now I want to try to show a user his zipcode position at the center of the map, but I also want to specify the correct zoom level, so that the user can see all points around this point. (it's not limited by the distance)

Is this possible?

My minLat,maxLat,minLng,maxLng looks like this :

Array ( [minLng] => 8.381 [maxLng] => 9.15259 [minLat] => 49.5103735 [maxLat] => 50.06762 )

Edit:

-HTML:

map.setCenter(new OpenLayers.LonLat(center.lon,center.lat) // Center of the map
            .transform(
                new OpenLayers.Projection("EPSG:4326"), // transform from WGS 1984
                new OpenLayers.Projection("EPSG:900913") // to Spherical Mercator Projection
                ), config.zoom // Zoom level
            );
    map.zoomToExtent(new OpenLayers.Bounds(config.bounds.minLng,config.bounds.minLat,config.bounds.maxLng,config.bounds.maxLat).transform(epsg4326));

I have added the html of the function.


texts: Select By Location and Calculate Field in ArcPy

texts:
I have a point shapefile and a polygon shapefile and want to set the field "Present" to 1 if it intersects with the polygon in ArcPy, but I am having trouble with the SQL syntax for select by location. When I run the following code in arcpy, it converts all rows in the field Present to 1.
pts = "points"
poly = "poly"
fieldname = "Present" arcpy.management.SelectLayerByLocation(pts, "INTERSECT", poly, None, "NEW_SELECTION", "NOT_INVERT")
arcpy.management.CalculateField(pts, fieldname, "1", "PYTHON3", '',"TEXT")

My question is similar to Using select by attributes then calculate field on selection in ArcPy?, which is for select by attribute. I am assuming the answer is close to this code.
pts = "points"
poly = "poly"
fieldname = "Present"

arcpy.management.SelectLayerByLocation(pts, "INTERSECT", poly, None, "NEW_SELECTION", "NOT_INVERT")

sql = """{0} = ''""".format(arcpy.AddFieldDelimiters(pts,fieldname)) ### this is wrong

with arcpy.da.UpdateCursor(fc,fieldname,sql) as cursor:
    for row in cursor:
        row[0] = 1
        cursor.updateRow(row)

I basically want to set row to 1 (default is 0), when the point is selected.


texts: Add view generated with psycopg2 through sshtunnel as layer

texts:
I'm writing an internal QGIS plugin to query a remote database. I'm not administrating the server, but administrator has set up a virtual machine on a windows file server, with PostGIS set up.

I wrote a script to download CSV files from the web, upload them on SFTP and load them in the database.

I achieved to create a view in this table from within QGIS using sshtunnel. I can fetch it (still not have the headers but I guess it's on another topic).

Thing is I cannot succeed to get a proper QgsVectorLayer : i don't know which parameters I should pass to QgsDataSourceUri - even if psycopg2 connector is working.

So I guess there are different possibilities :

get a layer from cur.fetchall() method, last column being a geometry (generated from the CREATE VIEW statement), maybe using other external modules such as geopandas or fiona,
find which parameters I should pass to QGSDataSourceUri.

Which one should I consider?

What I've accomplished so far:

from qgis.utils import iface
import processing
import tempfile
import os

with sshtunnel.open_tunnel(('xxx.xxx.xxx.x', x),ssh_username="user",ssh_password="password",remote_bind_address=('localhost', 5432)) as server:
   server.start()
   params = {'database': 'db','user': 'postgres','host': 'localhost','password':'postgres','port': server.local_bind_port}
   conn = psycopg2.connect(**params)
   with conn.cursor() as cur:
       cur.execute('''CREATE OR REPLACE VIEW view_name AS SELECT *, Tt_MakePoint(longitude,latitude) as geom FROM table1 JOIN table2 on "column"."table1"="column"."table2" WHERE SPATIAL CONDITION''')
       cur.execute('''SELECT * FROM extrait;''')
       cur.fetchall()

I first tried to use this answer to add the view as layer. I keep stuck at which parameters I could pass to setConnection : remote or local host/port (if only this class is able to connect to postgresql through ssh)? For now, I tried with localhost because it worked for psycopg2 connection (inspired from this answer).

What I understand is that the setConnection "doesn't know" that I'm using a tunnel, even if I'm calling in from within the with block, but I may be wrong.

         uri = QgsDataSourceUri()
         uri.setConnection('localhost', str(server.local_bind_port),"dbname","postgres","postgres")
         uri.setDataSource ("public", "view_name", 'geom')
         vlayer=QgsVectorLayer (uri.uri(False), "etablissements_complets", 'postgres')
         QgsProject.instance().addMapLayer(vlayer)

I should precise that I set up my postgresql.conf with listen_adresses='*' and my pg_hba.conf as mentionned in various topics.


texts: Getting multiple highest values using Cell Statistics in ArcGIS Pro

texts: On my ArcGIS Pro, I have raster data of temperature of each month (from Jan to Dec) in US. Now I want to find out four warmest months, and I think I can use cell statistics tool. How can I do this calculation or is there other tool I should be using?


texts: Creating random order symbol levels in graduated renderer?

texts:
When I add a layer and set to graduated in QGIS it automatically first render the symbology with the lowest values, then second lowest and so on. But I want it to be "random"..

I tried to look under properties, symbology, advanced and symbol levels, hence this was not selected. The layer is a postgres layer, I don't know if it matter?

How is the default order of rendering symbols in QGIS3?


texts: Aggregating population data (at Census tract level) to voting district level in R

texts:
Suppose I had voting data from the 2016 election at voting district level, and population data (from 2010 Census, say) at the block or tract level. I am hoping there are no blocks/tracts in two districts. So assume that all we have to do is amalgamate up with no boundary issues. The data are in shapefiles.

What's the easiest way to use R to compare the polygons representing blocks/tracts with voting districts and then just sum the population of all the blocks/tracts within a voting district to calculate the total population of that district?

EDIT: I have found that this is very easy in ArcGIS using the join functionality, so I will just use that.


texts: Cleaning/editing GPX (tracks) files recorded from GPS device in QGIS?

texts:
During a long trip, I have recorded tracks of my journey with the GPS of my smartphone. I have ended up with about 30 GPX datafiles.

Now that I am back, I am trying to draw a map of this trip.
I imported each file in QGIS as vector layer, and visualized the tracks with OpenLayers Plugin.

Now I need to edit some of these files:

basically trimming the end and beginning of many files
merging some tracks
adding a title or a description for each track

What is the way to do it with QGIS ?

I would like to keep as much data as possible from the source data (timestamp, elevation)


texts:
I'm trying to parse a CityGML file in python in order to generate python objects from the buildings. Optimally the objects would have attributes corresponding to the elements in the GML, more or less like city.buildingID('123').roof.geom, which would give me the roof geometry.

I'm aware that specific elements/features can be extracted from CityGML using ElementTree, however I'm looking for a more comprehensive approach, because I need to iteratively access several different parts of each building.

I came accross PyXB, which to my understanding, could help me achieve exactly what I need. It generates python bindings from XSDs, then parses any XML using the corresponding schema to python objects. I generated the bindings using PyXB's provided binding-generator, adapted for CityGML2.0 (https://gist.github.com/balazsdukai/39668a068baf769f64d704e97baa6bbd).

Unfortunately my minimal example does not parse my minimal file. The file contains about 10 buildings, its CityGML2.0, semantically valid and has a non-planar surface according to val3dity.

import os
import pyxb
import pyxb.bundles.opengis.citygml.pbase as pbase # http://www.opengis.net/citygml/profiles/base/2.0

path = "loerrach_sub1.gml"

def citygml_read(gml_path):
    """
    Generates python classes from a citygml file.
    """
    gml = open(gml_path).read()
    pyxb.RequireValidWhenParsing(True) # do/not validate gml file when parsing to binding instance
    try:
        citygml_model = pbase.CreateFromDocument(gml, location_base=gml_path)
        return citygml_model
    except pyxb.ValidationError as e:
        print(e.details())

loer_sub1 = citygml_read(path)

The problem is that with pyxb.RequireValidWhenParsing(False) PyXB raises and exception:

pyxb.exceptions_.StructuralBadDocumentError:
{http://www.opengis.net/gml}FeaturePropertyType cannot accept wildcard content <pyxb.utils.saxdom.Element object at 0x7f5d728f1240>

The package author says that this is, because wildcards are not allowed by the schema (https://github.com/pabigot/pyxb/issues/53). Now, I manually checked if there are wildcards any* in the file but there are none.

Following I tried pyxb.RequireValidWhenParsing(True), but then I get:

The containing element {http://www.opengis.net/citygml/2.0}cityObjectMember is defined at cityGMLBase.xsd[47:1].
The containing element type {http://www.opengis.net/gml}FeaturePropertyType is defined at feature.xsd[76:1]
The unrecognized content WallSurface begins at loerrach_sub1.gml[10:0]
The {http://www.opengis.net/gml}FeaturePropertyType automaton is in an accepting state.
The following element and wildcard content would be accepted:
An element {http://www.opengis.net/gml}_Feature per feature.xsd[81:3]
Unable to convert DOM node {http://www.opengis.net/citygml/building/2.0}WallSurface at loerrach_sub1.gml[10:0] to binding

So, I don't really know what is going wrong here. It seems like something is missing from the bindings, but I believe I included all CityGML-related XSDs.


texts: Collecting offline spatial data on iPads?

texts:
I a looking for an iOS app or any approach, that will allow me to do offline map-based surveys and upload the data back to one single database once I am online (like the Esri Collector), but:

in Collector, once I finish one respondent, the second respondent sees the answers, I want to start with blank map.
I will have about 30 people with iPads in the field, I do not want them to see all the answers in one map
I don't have a budget to buy an app

Any ideas?

I can of course take for each respondent a new map, but then I would end up with 700 maps/shapefiles I would have to merge afterwards, what is not user friendly - so I need something like Qfield (QGIS plugin) that would work at iPads.


texts: Deleting collinear vertex / vertices using ArcMap

texts:
I’m looking for an ArcGIS tool or script that will delete all the collinear vertices in line features.  I tried the Simplify Line tool and Generalize in the Advanced Toolbar.  The tools sort of work, but they convert curves to segments by adding vertices.  I want to keep the original curves intact.

I also tried several Generalize transformers in FME, but get similar results.
Any thoughts?

Here is a before and after example of what I'm trying to achieve. This was done by deleting the vertices manually.

Before

After


texts: Build a tile server using MySQL as backend

texts:
I need to set up a tile server using MySQL but cannot find any documentation for it.

I have done it with Postgres by following this link  and it works fine.
I understand that after downloading the data from planet OSM I need to use osm2pgsql to store the data in Postgres. Is there any similar tool for MySQL?

Also, would Osmosis, Mapnik and Mod_tile work with MySQL?

I absolutely cannot use Postgres. Is there a step to step guide for MySQL?


texts:
psql:routing_dd.sql:28: ERROR:  could not load library "/usr/lib/postgresql/9.1/lib/librouting_dd.so": /usr/lib/postgresql/9.1/lib/librouting_dd.so: undefined symbol: __gmpq_equal

Have no compile errors afaik or have seen.

As soon as I'd like to import my DD extra functions it's not working properly: (dash) With Driving Distance
psql -U postgres -f /usr/share/postlbs/routing_dd.sql routing
psql -U postgres -f /usr/share/postlbs/routing_dd_wrappers.sql routing

Versions:
PostgreSQL 9.1
pgRouting - git'ed this morning (1.05?)
CGAL 3.9

Any idea? Read that some similar isues have been fixed not long ago...

Thanks!

Is not working!

V1:

Postgresql 9.1
Postgis
pgRouting freshly gitted
all compiled from scratch
--> FAIL

V2:

Postgresql 9.1
Postgis
pgRouting
all deps and libs downloaded from ubuntu repository
--> Still not working!

Hopefully this will be fixed: https://github.com/pgRouting/pgrouting/issues/48#issuecomment-2789012

Thanks!


texts: How to save QGIS composer template with image - e.g. company logo?

texts: I can't figure out how to save QGIS Print composer template with image. In our map compositions we always have company logo in one place. It is easy to add image (logo) to composer and place it to spot I need. But when I save template, it saves without image (logo). Is there some setting for it? Am I misssing something or there is no way so far to save template including image?


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

texts:
Using QGIS3 I am unable to export a map-image only with the colors in use.
There was a solution for QGIS 2.x: Export as image with too many different (unused) colors
But settings -> options -> rendering -> "Make lines appear less jagged at the expense of some rendering performance" does no longer work!
In the Layout-Manager under Image Export Options I have also deselected anti-aliasing:

Is there any workaround?


texts:
I am using ArcGIS to calculate Ripleys K function using the "Multi-Distance Spatial Cluster Analysis (Ripleys K Function)" tool on a point feature class. I can see a table output but want a graphical output too.

There is an option to Display Results Graphically but that does nothing. In the messages it does say something about Result Image: KFuncation but believe me there is no image output.


texts: Extracting Longitude and Latitude from shapefile?

texts:
I am working with a shapefile which can be found here. I am doing some data visualisation and want to see if certain longitude and latitudes are within a certain polygon in the shapefile.

This is the code I am using to check if a latitude and longitude is in a polygon. This works as I do it for other data

//imports
import geopandas as gpd
import shapely
from shapely.geometry import Point
from shapely.geometry import shape
from shapely.geometry import Polygon
from descartes import PolygonPatch

//load in shapemap
soa_shape_map_path = './input/SOA2011_Esri_Shapefile_0/SOA2011.shp
soa_shape_map = gpd.read_file(soa_shape_map_path)
soa_geo_df=soa_shape_map['geometry']
soa_labels=soa_shape_map['SOA_LABEL']
reset_index(soa_geo_df)
reset_index(soa_labels)
soa_polys=soa_geo_df.values.T.tolist()

Then run through a set of longitude and latitudes in a dataframe to get what area it is part of

def check_df(df, polys, areas):
    # df contains crime data
    # polys contains all the paths dataframes containing the polygons
    # create a Polygon object from each of the dataframes

    for index, row in df.iterrows():
        lat = row["Latitude"]
        lng = row["Longitude"]
        point = Point((lng, lat))

    for row_idx, poly in enumerate(polys):
        if point.within(poly):
            df.at[index, "Areas"] = areas[row_idx]
            print("ADDED")

return df

This never works because my longitude and latitude for df is always between 53/55 as it is Northern Ireland. When I check what the x and y co-ordinates are for soa_shape_map_path I get this

As you can tell, 54 is not even close to this number.

For my other shapefile map set I get this picture

There definitely is a way to get the values as when I open the program, add the shp file in a layer and add an open street map it gives this

I have watched a couple YouTube videos and posts already but can not get what I need

https://www.youtube.com/watch?v=XI1qwzWPN1E

http://help.fulcrumapp.com/misc/guides-leveraging-external-tools/adding-latitude-and-longitude-data-to-shapefiles


texts: How do I locate cities or town polygon shapefiles?

texts: Does anyone know of a reliable source where to download city/town polygon shapefiles?  I'm specifically looking for NY and NJ.  I have come across point shapefiles, but not polygon.  For example in NY there are towns like Hicksville, Syosset, Bethpage, Jericho etc that are contained in the town of Oyster Bay.  I'm not looking for the Oyster Bay polygon shapefile (NYS clearinghouse has those), but of polygons delineating each of the former smaller towns.  I've checked the Census Bureau but can't seem to locate anything either.


texts:
I have the latest version of OSGeo4W64 installed on my Windows machine. I find it very convenient to have all the Python modules for QGIS, GDAL and GRASS all in one place. I would like to set up an IDE such as Spyder to work in the OSGeo ecosystem.

According to my understanding, OSGeo and its various modules require several environment variables to be set correctly before Python will work. Simply pointing Spyder to the C:\OSGeo4W64\apps\Python37\python.exe interpreter does not work on its own. Does anyone have experience getting this type of setup to work, either with Spyder or any other IDEs?


texts:
I try to open a pelias rest api link that returns geojson with add vector layer (ctrl+maj+v) in QGIS

If i try http://localhost:4000/v1/search?text=belgium, it's ok.
If i try http://localhost:4000/v1/search?text=Place De Brouckère, belgium, it does not.

Because of spaces in the link or maybe multiple features?