texts: Using Python to execute Spatial Ecology GME commmands

texts:
I think I just need a second set of eyes on this. I'm just using Python to capture some user inputs to pass down to GME command. I'm only using the export to CSV to hammer out the behavior, but the final outcome will be an ArcPY tool for creating sample points. Fun stuff. (Please ignore my imported modules).

    import arcpy, os, sys, subprocess

inFeatures = r"D:\TEMP\junk.shp"
OutputLocation = r"D:\TEMP"
OutputBasename = os.path.splitext(inFeatures)[0]
OutputCSV = OutputBasename + ".csv"
GME = r'C:\Program Files (x86)\SpatialEcology\GME\SEGME.exe'
ARG = ' export.csv(in=\"' + inFeatures + '", out=\"' + OutputCSV + '");'
CMD = GME + ARG
print CMD
subprocess.call(CMD)

The printed command is as follows:

  C:\Program Files (x86)\SpatialEcology\GME\SEGME.exe
  export.csv(in="D:\TEMP\junk.shp", out="D:\TEMP\junk.csv");

And that looks to be correct

I have excluded the '-c' switch for the sake of debugging.

When GME is launched, the following output is provided.

    Found R here: C:\Program Files\R\R-3.0.1\bin To switch to a different version of R use the 'Set R executable folder' item in the
    File menu, or use the r.setpath() command.
        export.csv(in=D:\TEMP\junk.shp, out=D:\TEMP\junk.csv);
        Error: Variable name could not be resolved (D:\TEMP\junk.shp) or quotes were omitted when providing a text parameter; command cannot be
    interpreted

The actual command within GME should look like this:

export.csv(in="D:\TEMP\junk.shp", out="D:\TEMP\junk.csv");

So, for some reason my quotes are not getting passed to GME?

The only clue I have related to this in the documentation is as follows:

  Please note that you need to add a backslash before all quote marks in the commands text,
  otherwise it is the same syntax as GME. For instance, here is a Python call to GME that
  tells it to run the GME script called "E:ndatangmescript.txt":
  subp.call(r'C:nProgram FilesnSpatialEcologynGMEnSEGME.exe -c
  run(in=n"E:ndatangmescript.txtn");');

Also, please note I'm still learning the ins & outs of subprocess.

Aside from 'is my syntax correct?', I'm not sure how to roll this into a more direct question.

Thanks!
Z

EDIT: I'm adding the only Python reference in the help document:

  You must rst load the subprocess Python library (using: import subprocess as subp)
  at the beginning of your Python session. To call GME from the command line you use the
  following generic syntax:
  os.system(r'pathnSEGME.exe commands')
  where path is the full directory path to the SEGME command, usually:
  subp.call(r'C:nProgram FilesnSpatialEcologynGMEnSEGME.exe commands')
  and commands is the list of commands you wish to execute. Note that the r at the beginning
  of that path name is not a mistake: it tells Python to interpret the following text literally.
  Please note that you need to add a backslash before all quote marks in the commands text,
  otherwise it is the same syntax as GME. For instance, here is a Python call to GME that
  17
  tells it to run the GME script called "E:\data\gmescript.txt":
  subp.call(r'C:\Program Files\SpatialEcology\GME\SEGME.exe -c
  run(in=\"E:\datangmescript.txt\");');
  (This command has been displayed on two lines here because it is too long for a single
  line, though in Python it would be a single line). Note that by including -c directly after
  SEGME.exe, this will force the GME interface to close when it has nished running the
  specied commands.


texts: QGIS 3 : How to use crtl + space properly?

texts:
When I select a layer and do Ctrl+space, all layers become temporarily hidden, including the active one. The other ones are still checked but the check box is greyed.

But what is this shortcut meant for ?

Is it just to hide everything and have a blank map ?

I searched in the the Keyboard shortcuts list and it's not even there.


texts: Calculating field from shp currently sected in ArcMap session using Python script?

texts:
I need to create a script in Python for use in ArcMap 10.

This script must be able to calculate a field from the shp currently selected in ArcMap.

Any ideas? I'm new to Python.


texts: How to add metadata such as geokeydirectory, geoasciiparams, modelpixelscale and modeltiepoint to a compressed tiff image?

texts:
I have resized my original tiff file (1.5gb) to a tiff file (170mb). But there was no geo reference points in the resized image which was present in my original tiff file. I have attached the screenshot which shows the geoinfo(co-ordinate points) of my original tiff file.

I need the geo reference points\co-ordinate points to this resized image from my original tiif file. How do i add it?

I have coded my image resizing in "Matlab".
My code is as follows -

t = Tiff('D:\sample\a_01.tif','r');
imageData = read(t);
Itrain = imresize(imageData,0.3);
channel4 = Itrain(:,:,4);
Itrain = Itrain(:,:, 1:3);
scaled_train = mat2gray(Itrain);
imwrite(scaled_train,'D:\com_1.tif')

Please do help me out!!


texts: how to create a web app in java(spring framework) with automated service publishing to the ArcGIS server?

texts:
I am a newbie and my requirement is to create a web application in java. The app depicts the data like success, failures of my orgainsation's ventures at various Geo locations. The geo data is stored as lat/lon in Oracle DB. ArcGIS 10.0 is decided upon to be used.

I have to depict the success, failures on a map. Right now all I know is that we need a service published on the ArcGIS for server which will then needed to be used in my web app's map. Also, I have to automate the process of publishing the service on the ArcGIS for server as and when new data becomes available.

So far I have been browsing ArcGIS site and I have stumbled upon the ArcGIS for Javascript API and checking out few sample codes.

I am quite unsure as how to proceed. Any pointers, tutorials, anything at all towards the right direction would be great!


texts:
I process images of trace gases concentrations distribution over the layer of atmosphere.

I need to analyse values of concentrations, rather detect so-called "background" values and "extremal" ones automatically in ArcMap.

At the moment I carry out such procedure manually: I classify them each image, analyse myself ranges and determine the one with critical values. After that I use Raster Calculator to exclude values which are different with normal (background) ones. But such the approach is subjective and there is the probability of some mistake from my side.

Is there some tool in ArcMap which is able to analyse values or a raster and distinguish background values and areas of extremal concentrations?

The sample of my image is attached.


texts: How to get the text labels in a raster tile in OpenMapTiles?

texts: I'd like to use OpenMapTiles to generate training data for a text recognition task. So, I need to have the corresponding text labels in a raster tile, preferably with their location on the image, stored in a separate file in text format. How can I do this with OpenMapTiles?


texts:
I know that there are already many questions regarding this matter. In fact, I have already seen the following questions:

How to load a WMS layer using PyQGIS?
Adding a WMS layer in QGIS using python
Load WMS with PyQGIS
WMS layer in a QGIS 2.4 stand alone Python script
How to open a specific WMS layer in QGIS with a single URL?

I am working on making a plugin for QGIS 2.18 using python 2.7 on Windows. Here is my code:

wms_url="http://localhost/MapServer/mapserv.exe?map=c:/inetpub/wwwroot/data//Mapfile.map&request=GetMap&service=WMS&version=1.3.0&layers=Region_Map&width=480.000&height=480.000&format=image/png&bbox=8.473957,77.262417,8.519412,77.307871&crs=EPSG:4326&styles="

wms_url = wms_url + "&styles="
print(wms_url)
# setting prefix path of qgis
# TODO: get this path dynamically
qgis_prefix = "C:\\OSGeo4W64\\apps\\qgis-ltr"
QgsApplication.setPrefixPath(qgis_prefix, True)
QgsApplication.initQgis()

#adding the WMS Layer
rlayer = QgsRasterLayer(wms_url, 'default map', 'wms, True)
print(rlayer.isValid())
if(rlayer.isValid):
    QgsMapLayerRegistry.instance().addMapLayer(rlayer)
else:
    print(rlayer.error().message())

Once this code is executed, the following messages are seen:

CONSOLE:

  False

  Raster layer: Provider is not valid (provider: wms, URI:
  http://localhost/MapServer/mapserv.exe?map=Mapfile.map&request=GetMap&service=WMS&version=1.3.0&layers=Layer&width=480.000&height=480.000&format=image/png&bbox=8.473957,77.262417,8.519412,77.307871&crs=EPSG:4326&styles=

(The second line contains a u' and followed by a p and b tad at the start of the statement in the console; I am unable to show it exactly here)

Logs:

(It says Download of capabilities failed: Protocol "" is unknown)

Based on the answers I read, I have also tried the following:

Changing the url to http://localhost/MapServer/mapserv.exe?map=Mapfile.map&layers=Layer&styles=&format=image/png&crs=EPSG:4326
Clearing the QGIS cache
Adding the prefix path to QgsApplication (evident from the code).

I should also add that this url works perfectly when run on web browser or if the url http://localhost/MapServer/mapserv.exe?map=Mapfile.map is added to "Add WMS/WMTS Layer" (GUI option). Also, if I remove the 'wms' in the above code, then an image is added, although it does not get loaded to the correct dimensions.

Is there something else that I am missing?

Some Additional Info

From the following link pyQGIS Developer Cookbook

  Alternatively you can load a raster layer from WMS server. However
  currently it’s not possible to access GetCapabilities response from
  API — you have to know what layers you want:

urlWithParams = 'url=http://irs.gis-lab.info/?
layers=landsat&styles=&format=image/jpeg&crs=EPSG:4326'
rlayer = QgsRasterLayer(urlWithParams, 'some layer name', 'wms')
if not rlayer.isValid():
  print "Layer failed to load!"

This suggests that the first parameter should be the full URL to the WMS request with the provider being 'wms' as visible in the code above.


texts:
Pardon the rookie question, but I've been investigating the OSM dataset for sidewalk data.
I've been looking to use the OSM sidewalk tag dataset to determine accessibility maps (i.e. which areas are walkable), but so far the queries that I've been running seem to be showing a very sparse set of sidewalk labels.
Is the sidewalk-tagged dataset known to be pretty thin, or am I just going about this totally wrong?
My current validation method is running the wiki-recommended (https://wiki.openstreetmap.org/wiki/Key:sidewalk) query:
/*
This query looks for nodes, ways and relations
with the given key.
Choose your region and hit the Run button above!
*/
[out:json][timeout:25];
// gather results
(
  // query part for: “sidewalk=*”
  node["sidewalk"]({{bbox}});
  way["sidewalk"]({{bbox}});
  relation["sidewalk"]({{bbox}});
);
// print results
out body;
>;
out skel qt;

on Overpass Turbo (http://overpass-turbo.eu/), and moving to some heavily populated areas (e.g. Manhattan). It looks like there are very few actual edges that are returned from this query.
Please feel free to call me out if this is just a lack of knowledge or if I'm going about this totally wrong, but I'm wondering if the dataset actually is this sparse, or if the error is between the chair and keyboard here.
Any insight?


texts: Identifying ArcMap document versions with PythonWin?

texts:
ArcPy method to determine ArcMap document version

I want to be able to identify ArcMap documents by the folder using PythonWin.

When using Ryan's script (link above) I ran into some kind of problem. It runs without error, but could not determine the version of any of them. The versions range of the documents I have are from ArcGIS 9.3 through 10.5. Without an error I'm not sure why the versions aren't being recognized?


texts: Removing cloud from Sentinel 2A imagery?

texts:
I would like to use sentinel 2A imagery to look at canopy cover in Northern Vietnam. The only problem is that ALL the recent images have large amounts of cloud in the area I want to look at.

Is it possible to use the cloud mask vector image that you can also download remove the clouds so that you can "see through" to the forest below?

And in this way use the imagery under the clouds to perform an analysis of canopy cover?

Otherwise are there any other options?

I need a decent resolution because the site is only 5000ha, so in this case I think all Landsat imagery is probably not fine enough.


texts:
I'm looking for a way to show attributes as number in little tables via QGIS. For example I want to show various facilities a city has with a small table. You can see the example of what I mean in this map made by me few weeks ago:

https://s-media-cache-ak0.pinimg.com/originals/ed/3c/9d/ed3c9d69948d3ef1d2b6f8b5a6903a49.jpg

https://www.pinterest.com/pin/473229873324662401/

The small table with icons showing the facilities of each city/commune is made via graphical editing software (CorelDraw). It would be great if I could find a way to make this via QGIS.

I know it's a quite complicated thing but I would like to know if there is at least any chance for this to happen.


texts: Setting QGIS to "show feature count" always when layer is loaded?

texts:
I am using QGIS 3.

I know that i can right click the layer and check the "show feature" option but is it possible to show enable this function by default when any layer is loaded ?

I know that we can set the project. I am looking for option to show it all time. a plugin for it will do.


texts:
I am working with BIOCLIM temperature/precipitation layers and I have noticed that when I clip the global raster down to a specific region, something happens and the raster value at a specific point no longer matches that on the global raster. Here is my working procedure:

Download bioclim layers from http://www.worldclim.org/current. Load e.g. bio_1 layer into QGIS
clip using Raster>Extraction>Clipper. Clip with "By Extent" mode and set the extent to e.g. -50,-50 : 50,50
Using the identify features tool, click on region of the map and compare values for both layers. For some points, the raster values are the same, others are slightly off.

Why does this happen?

My first thought was that the vector I am clipping with is dissecting raster cells and thereby shifting the new layer slightly. I have tried to change the "Snapping Option..." (Settings>Snapping option...) to all layers, snap to vertex and set the sensitivity to different number of pixels (0.5 to 50) but nothing works.

What am I doing wrong?


texts: OBIA following connected components segmentation in Monteverdi2

texts: New to Monteverdi2 and OTB. I just finished a connected components segmentation using the Segmentation module and the large-scale vector output mode for large datasets. How can I filter the output (now a shp file) using an OBIA Expression like that available in the Connected Components module? Do I rasterize the shp? I don't see an OBIA module that starts from such a raster--only the integrated CC segmentation and OBIA tool that I couldn't use because my dataset is too large. Maybe I'm missing something. Thanks for any help.


texts: Path Matching for Journeys Using XY Coordinates

texts:
I am trying to find some suggestions on ways or algorithms to determine path similarity. An illustration of 3 paths using made up data is given below. The title should be finding similar paths instead of calculating distance.

As you can see in the figure that there are two bus routes and one user journey. The original data will contain latitude/longitude coordinates. The journeys could be polylines/polygons/more complex shapes with or without intersections. I want to ask a few things:

Can frechet distance be used to find similarity between paths instead of between different points of a path or trajectory?
Do a path and trajectory mean the same thing?
Can we use frechet distance for polylines, polygonal curves and other shapes e.g., polylines with curves?
Can frechet distance handle intersections like present in the figure?
Are there other better methods of calculating path similarity?

The goal is to find a similar path within a given threshold of a user journey. let's say if there is/are route within 25 meters of the user path, then find how similar that route is to the user journey.


texts: qgis2web other inline labels and popup preview not working

texts:
I have a map with different layers.  Other pop-ups are already hidden so only those that I need is here
However, when exported other pop-up fields does not appear
Also, update preview doesn't work, so I need to export it first to see if pop-up fields are working or not


texts: Choosing File Geodatabase (*.gdb), Personal Geodatabase (*.mdb) or shapefile format?

texts:
Previously, I have used geodatabases as an easy way to keep all files together rather than having dozens of shapefiles all over the place, and it is easier when finally exporting all the relevant data to the client.

Why should I use a geodatabase instead of shapefiles when analysing and running functions on my data?

My primary focus is within ArcGIS, I don't usually edit outside of that environment.

This question is related to How does Personal Geodatabase work from Microsoft Access perspective?


texts: Extracting building footprints with classified LiDAR data using ArcGIS Pro

texts:
What is the best tool or workflow available to create building footprints with LiDAR data?
I have used the 3D Mapping with Lidar Point Clouds code samples.
Are there other methods or tools available, or has someone improved the aforementioned tool?
I am not using imagery, only Point Clouds. However, I do have some older parcel data.


texts: Using WFS-T when layer dimensions don't match with geometry dimensions

texts:
We are able to Delete features from OpenLayers and it is successfully deleting them from spatial table. However we are unsuccessful doing add/edit from OpenLayers and saving the features in the Spatial table. We get the below exception while saving the data to spatial table.

ORA-13364: Layer Dimensionality does not match geometry dimensions

We believe the reason for the above is

geom data is 3D (shown below)
MDSYS.SDO_ORDINATE_ARRAY(3769.32886113393,2912.01336714121,0,3769.32885753005,2507.00004178244,0)
we defined a custom SRID with 2D and using.
when we are querying (GetFeature) the data is returned in 2D format.

During edit functionality the data is going as 2D format and Oracle is throwing exception. Is there any way to avoid this issue that while saving to spatial table, such that the 2D data can be converted to 3D and saved?


texts: Split regular polygons into regular sub-polygons

texts:
In QGIS, I have a layer containing 62 equal-sized, quadratic polygons:

I want to split each polygon regularly into 9 quadratic sub-polygons and tried the polygon divider tool. Results are fine for upright polygons, but somewhat rotated input polygons get non-quadratic sub-polygons:

Problematic are the irregular alginment and rotation of the input polygons; the sub-polygons should fit the input polygons (e.g. have the same rotation).
However, perhaps someone can indicate a solution to this problem?


texts: Unable to open mxd file on my computer - can be opened on other computers

texts:
Using ArcGIS Arcmap 10.5.1.

Several of the mxd files I have created and worked on are no longer accessible to me. If I attempt to open these files, the loading screen progresses through "Initializing license / initializing application / loading document" and stops on loading document. I then get the following error screen:

I've sent the error report a few times now, but have not received a response.

I restarted the arcgis program by following these steps: https://community.esri.com/docs/DOC-2121-resetting-your-arcgis-application-profile
That fixed a different problem I was having, but not the locked mxd files.

The files are not corrupt - my coworkers can open them on their computers.


texts: Using 'Con' to Create Raster Containing Values in Another Raster

texts:
I have 2 rasters that I want to combine into 1 raster, so that the 1 raster has values of each of the input rasters.  I think that I want to use a 'Con' statement to do this.  However, I'm having trouble with getting it to give me the output I desire.  My syntax must be incorrect.  Here's what I have:

1) Raster A = raster of interpolated GW surface

2) Raster B = raster of perennial streams

I want to create Raster C and have it be mostly Raster A except where there are perennial streams (water at the surface) and have those areas represented by Raster B.


texts: Script to buffer 2 shapefiles within each folder of root folder?

texts:
I need some help with ArcGIS python script

My folder tree is like this:

/Testing location

C1

    POIS.shp
    STREETS.shp
C2

etc, etc

I'm trying to make a script to run from arcgis that would go into each folder from the main directory and buffer the two shapefiles, output a specific file (Surrounding_Streets.shp for example) for each layer in each respective folder.

So within each folder I'd now have POIS.shp, POIS_SURROUNDING.shp, STREETS.shp, and STREETS_SURROUNDING.shp


texts: Geoserver Link to External MS-Access Database

texts:
Is there a way that I can link a shape (as a polygon, with a LINK_ID = 12345) from Geoserver and have it open or link to the specific information (LINK_ID_DB = 12345) within an online Web Microsoft Access Database (on the same webserver) as a new tab to show addional information that is not in the GIS layer within Geoserver? This would enable me to update data externally for users that do not want to view the GIS data.

Thanks.


texts: Translating and warping tif using python bindings of GDAL?

texts:
I am trying to rectify a tif of of sonar images collected from a moving ship. The tifs are in the form of long ribbons. I have ground control points (GCPs) that match coordinates on the tif (row and column of a particular pixel) to the coordinates of the ship track. Every fifth row of pixels in the image has one GCP

Examples of the GCP points:

  (1904.00P ,23086.00L) -> (-67.1203008E,42.0984950N,0.00)
  (0.00P    ,23081.00L) -> (-67.1203325E,42.0993950N,0.00)
  (1904.00P ,23076.00L) -> (-67.1202966E,42.0984951N,0.00)
  (0.00P    ,23066.00L) -> (-67.1202984E,42.0993966N,0.00)

The tifs themselves have no GCS and are completely rectangular. However, the track to which I am trying to georeference them is curved, occasionally turns 90 degrees, and in some cases will double back on itself.

What i've been trying to do is the following (adapted from this stack overflow thread) :

# open tif
ds = gdal.Open(sonar_tif, gdal.GA_Update)

# Get Source Projections (PCS)
ds_prj = ds.GetProjection()
if ds_prj:
    print("Source Projection:",ds_prj,"\n")
else:
    print("Source Projection: None\n")

# new instance of SpatialReference class from osr module
drs = osr.SpatialReference()
print("drs is",drs)

# Set Geographic Coordinate Reference System (GCS)
srs = osr.SpatialReference()
srs.ImportFromEPSG(4326) # WGS84 GCS

if srs.IsProjected:
    print ("Target Projection:",srs.GetAttrValue('projcs'))

print ("Target GCS:",srs.GetAttrValue('geogcs'))

# Attach GCP points to tif
ds.SetGCPs(gcp_list, ds_prj)

ds = None # closes dataset, unlocks files
d_out = None

If I understand correctly, this should perform the same action as gdal_translate, and I should have embedded GCP points and a geotiff. However, the output I get is a big black square.

Am I doing something fundamentally incorrect?

Is there a coordinate system mismatch that I might be unaware of?

Do I have to run gdal_warp before I can see a fully georeferenced image?


texts: How to publish a table in Geoserver 2.4.x, so that only specific users can access it

texts:
I want to publish some tables in the geoserver 2.4.x so that it is restricted to some particular users.Right now, I have tables that is public to all users.
I have a web app, through which I am accessing the geoserver and downloading the table data.But it will be user specific.Eg: If I login to the web app, the app will only display the tables that is accessible to me. The user authentication is done too. Only, how to make the tables user specific, so that the getcapabilities query return the tables specific to that user.Right now, this query:
http://weaveprod.ucdp.utah.edu/geoserver/wfs?service=wfs&version=1.1.0&request=GetCapabilities

returns the xml file containing all the tables. Kindly help me out ?

Thanks,
Sayan


texts: Having trouble with the Heatmap's (Kernel Density Estimation-KDE) interpretation in QGIS 3.10

texts:
i wanted to generate a density/concentration map of a parameter, in this case Carbon percentage in a water sample. The dataset in csv file looks like these :

So, I imported the csv file then plotted the points, later i used heatmap with following criteria:

Finally I extracted contour from raster > extraction > contour :

My final product is this image:

I do not have much technical or theoretical knowledge on KDE, but my question is why are the contour values (labels-bold, italic) are varying from the original point values (green diamond) ? As you can see in the csv file, all values are between 0.4 to 0.6, but there are higher values in the heatmap. Is it because the whole process is estimating or interpolating the surrounding values ? If that is the case, how accurate are these estimations ?
I am looking to get a simple filled contour plot, which i usually do with R or Pyferret. I was wondering if the heatmap is the best way to generate simple filled contour plots, widely used in oceanography, like these:


texts:
I have a woodland scheme advice layer that has a polygon for each area of advice (brown layer in the picture). I also have a polygon layer of UK local authorities (red boundary layer in the picture).
I would like to perform a spatial query which returns the local authority name for each woodland advice scheme. This would work fine if each woodland advice scheme was found in just one local authority boundary.
However many are found across a boundary of two different authorities. For instance, one scheme sits across the boundaries of the authorities of Fife and Angus. The scheme is the yellow selected polygon in the picture and the red line is the authority boundary. How do I get the spatial join to return a value of Fife; Angus (or something similar to identify two values) instead of just Fife or Angus.


texts:
I have an attribute field with string data values (e.g. "P0001","C3492","00123"). I need to replace them so that they're all unique and begin with "W" followed by digits totaling 5 characters.

I thought perhaps ranking may work but not sure how to rank a string. The resulting output will look like ("W0001","W0002","W0003"). I prefer a Python solution in the field calculator but can also use VB.


texts:
I would like to change the dynamic script for a coordinate system from

"GDA 1994 MGA Zone 54" (Taken from a cut down version of the dynamic text>coordinate system)

to "GDA 94 z54"

How would I do this?

Really I just want the "z54" part on my template map dynamic (cause we have two zones and I always forget to change the legend to the right one).


texts: Northern Ireland Roadway Network shapefile

texts: Does anyone know of an open-source alternative to the £7k+ offering in the Ordinance Survey map shop?


texts: Release SDE locks from arcpy.da.Editor in same process

texts:
Is it possible to use arcpy.da.Editor and have it release its SDE locks in the same process?

I am using arcpy and trying to perform edit operations on an SDE version, then reconcile/post/delete the version in the same process. I get an error when deleting the version (trying both in ReconcileVersions and a separate DeleteVersion call), however, stating that the version is locked by a database user.

Querying sde.SDE_table_locks while stepping through the code shows that the locks are taken out in the startEditing call. After that call, the only way I can get the locks to release is when the process exits. Testing out an alternate method of making the updates in a separate process (using multiprocessing.Process) did allow the version to be deleted in the main process, but I would prefer to not have to do this.

Below is a sample that reproduces the locking behavior. We are using ArcGIS 10.2.1 build 3602, ArcSDE 10.2.1 release 102003, and SQL Server 2014.

import arceditor
import arcpy

def main():
    sde_connection = r'p:\ath\to\version_connection.sde'
    sde_editor = arcpy.da.Editor(sde_connection)
    # querying sde.SDE_table_locks, no locks exist
    sde_editor.startEditing(False, True)
    # locks now exist
    sde_editor.stopEditing(False)
    del sde_editor

if __name__ == '__main__':
    main()
    # still have locks here


texts: QGIS Export Vector Shapefile attribute table metadata

texts:
In QGIS, I am looking for a way to export shapefile "attribute table metadata" (data about the the data, i.e. Id, Name, Alias, Type, Type Name, Length, Precision, Comment) not the shapefile metadata (Extent information, etc.) I would think that this would be something that would be identified as a "data dictionary" or "list of field properties and requirements."
There are numerous way to export the content (data itself), but I am seeking to export the details about that data (metadata).
Hopefully, the pictures help to clarify the two different QGIS layer properties panels:
The first being the information that I would like to somehow extract (Fields)
The second being the information that I do NOT need extracted (Metadata.)


texts:
Is it possible to update an attribute field in a shapefile using pyshp ?

I went through their documentation and all they show is how to create new attribute rather than editing or updating an already existing one.

If updating is not possible, is there any other recommended Python library for doing the same ?


texts:
Is it possible to change default settings for things like font for labels in Print Composer?
-TVZ


texts: Error in installing PostGIS extension through PostgreSQL 11

texts: I am getting following issues while installing PostGIS extension.


texts: Changing amount of rows/columns raster via Model Builder in QGIS

texts:
Because I want to convert a raster to ASCII file to use it in PMWIN I have to change the amount of rows and columns of several rasters.

I now do it with Raster Calculator and then specify the new layer, but since it is necessary for many maps and with different rows/columns (some parts need to be more refined than others) it would be nice if there is a function in the model builder that let's me specify the Xmin/max, Ymin/max, amount of rows and amount of columns.


texts: Color grid if values in grid exceed threshold - species distribution in QGIS

texts:
I have distribution data of a set of species (plants, mosses and lichens: 13 species total) in the Netherlands.
I made a grid that divides the Netherlands into 1x1 km squares. I am not interested in how many points of a single species are within a square. I used the TomBio addon to transform the species point data into 1x1 km squares, so that they match the grid (i.e. ten points of a species in a gridcell are now one 1x1 km square. Also, one species in a gridcell is now a 1x1 km square).

I want to make an estimate of the distribution of the community these species occur in. Every species has a weighing value related to how much they are bound to the community i want to estimate the distribution of. This means that some species that do occur in the community, but also occur in other communities get a value of 1. Species that occur solely in this community get a value of 10. Of course this is different for each of the 13 species.

Based on the weighing values, i determined a threshold value. i.e, if the sum of weighing values (determined by the species that occur) within a grid cell exceed this threshold, i can assume that the community occurs in that gridcell.

To make the whole story a bit more comprehensible:

Species      Weighing value
A            2
B            4
C            6
D            6
E            10

If the sum of the values in a grid is say twelve or more, I assume the community is present there. See below for a heads example of the attribute tables.

How can I use QGIS to calcuate within a gridcell the value of the sum of the appointed weighing values, and if the threshold is exceeded, the gridcell gets a color?

I know how to count the individual blocks (species) in a gridcell, but I havn't worked out a way to include the weighing values in this process.


texts:
I have imported a point shapefile called site_locations.shp into a personal geodatabase. Now I'm trying to retrieve the data from the database using SQL:

dbpath = os.path.normpath(r'../geodata/site_locations.mdb') #

msacon = pypyodbc.win_connect_mdb(dbpath) #

msacur = msacon.cursor() #

sqlstr = "SELECT ID, Shape, Notes FROM site_locations" #

msacur.execute(sqlstr) #

rows = msacur.fetchall() #

I did the same with a sqlite database and I got the geometry in the so-called well known binary format (WKB). I was able to convert that WKB to well known text (WKT) and then to objects with x and y values. Apparently the field Shape does not contain data in WKB format, but in GeomSHP format. Is there a way in Python to convert this GeomSHP to WKB or so? I understand that some spatial databases have a function called CGeomWKB. Is there a Python implementation?


texts: Prevent OpenLayers ClickEvent from firing on Popup closeButton

texts:
My Code to add popups as selectControl to a Layer. Works fine!

map.addLayer(window.markerLayer);

// SelectControl für Marker --> Popup
window.selectControl = new OpenLayers.Control.SelectFeature(
        [ window.markerLayer ]);
map.addControl(window.selectControl);

window.selectControl.activate();

// code of: http://docs.openlayers.org/library/overlays.html#displaying-popups

function onPopupClose(evt) {

// 'this' is the popup
selectControl.unselect(this.feature);

}

function onFeatureSelect(evt) {

feature = evt.feature;

var html_popup = "some html code";

popup = new OpenLayers.Popup.FramedCloud("featurePopup", feature.geometry
        .getBounds().getCenterLonLat(), new OpenLayers.Size(250, 220),
        html_popup, null, true, onPopupClose);

feature.popup = popup;
popup.feature = feature;
map.addPopup(popup);

}

function onFeatureUnselect(evt) {
    feature = evt.feature;
    if (feature.popup) {
        popup.feature = null;
        map.removePopup(feature.popup);
        feature.popup.destroy();
        feature.popup = null;
    }
}

..But by clicking the closeButton on the Popup i am creating a new Marker because of this line:

    map.events.register("click", map, newMarkerClickEvent);

the Method: newMarkerClickEvent creates a new marker on the xy-Position of the event...

How can i prevent from firing the click-Event to the map on clicking the Popup-Button ??

Thanks!


texts: I wanted to know if anyone knows how to integrate streetview into QField or find a way to view my data in augmented reality with open source software.


texts:
I can't make the same calcs i do while editing a shapefile, like multiplying one field by a real number.

My qgis version is 2.18.17 and i'm writting:

*[("FIELD1" 100) + "FIELD2" ] on Expression Dialog and the output preview returns "Expression Invalid".


texts: ArcMap aerial raster image exposure is off

texts:
I have some aerial raster images and I want to create tiles for web.
So I added images as layers in Arcmap and as the result some images were overexposed with different lightness.
For comparing I opened the same images on other software MapWindow GIS. On it those images were fine.
So my question is how to get the same result on ArcMap as it was on MapWindow.
Here is examples of imagery:
Arcmap:

And the same raster on MapWindow:


texts: Correct syntax for specifying multiple Layer Creation Options in ogr2ogr

texts:
I am trying to run a GDAL 300 command line command to convert a file to GeoJSONSeq, projecting output using ESRI:102008 (Albers North America), using a SQL query to choose and rename some columns, and applying the following Layer Creation Options:

COORDINATE_PRECISION=4
ID_FIELD=ZCTA5CE10
ID_TYPE=String

(I'm not sure if this is necessary - I added it because ID_FIELD wasn't working)

It just seems to be ignoring all of the -lco settings.  Here's the full command:

ogr2ogr -a_srs ESRI:102008 -f GeoJSONseq -sql "SELECT ZCTA5CE10 as zip, INTPTLAT10 as lat, INTPTLON10 as lon FROM tl_2018_us_zcta510" -lco "COORDINATE_PRECISION=4" -lco "ID_FIELD=ZCTA5CE10" -lco "ID_TYPE=String" albers_gjs4.geojson albers.shp

What is the correct syntax?

I've tried it with and without the double-quotes (single-quotes definitely don't work in my environment - Windows), I've moved the -lco statements from before the -sql to after.  I've poured over all the documentation (https://gdal.org/programs/ogr2ogr.html) for both ogr2ogr and the GeoJSONSeq driver and I haven't been able to figure out what is the right way to specify these options.

Edit -
And to clarify the Coordinate Precision option, I am hoping to limit the number of decimals it outputs for the coordinates in order to try to reduce the file size somewhat.  Is there any other way to do that?  The other utilities I'm trying to use to manipulate this down the line are choking because some string length exceeds the max that node.js will handle.


texts: Reset Python libraries modified by QGIS on Mac OS X to original versions

texts: I am facing problems in python after installing QGIS. While installing QGIS, it mentioned that it would override my matplotlib and numpy python libraries. I am facing trouble with executing python programs through these overrided libraries. I have tried to uninstall these python libraries using sudo pip uninstall. But it says operation not permitted. Maybe QGIS has modified the sudo settings for these 2 libraries because I am able to add/delete any other python library. I am okay to uninstall QGIS. Can any one share any ideas whats going wrong and how can I restore my numpy and matplotlib libraries to the original versions by python from the versions overrided by QGIS?


texts: Creating shaded relief in ArcGIS Desktop?

texts:
How can I create shaded relief from contour lines (.shp format)?

I see Hillshade in ArcToolbox, but it asks for a raster file.

I have ArcGIS 10.0.


texts: QGIS Aggregate filter intersect buffer from center of line

texts:
I want to run an aggregate expression in field calculator based on the mid point of a line.
The following uses a buffer of the line but I need it to be on midpoint -how do I do this?
aggregate(layer:='Roads_DVR_July2019', aggregate:='max', expression:="Road_Name"+'\\'+"Photo_Name",filter:= intersects(buffer($geometry,5,4), geometry(@parent)))

There are some options in this post but I am hoping that there is a way to do this without creating a new file with the mid points. For the start/end we have xat(0) (start point), xat(-1) (end point). Is there something for mid point?
UPDATE 1
If I use the following I get no results or error.
aggregate(layer:='Roads_DVR_July2019', aggregate:='max', expression:="Road_Name"+'\\'+"Photo_Name",filter:= intersects(buffer(line_interpolate_point($geometry, $length/2),5,4), geometry(@parent)))

Zoomed into the center we see there is at least one point of the point dataset that is within 5m of the midpoint of the line.
I have tried with 5,50 and 500m buffer but get no results so there must be something wrong with the filter. Is the point it buffers the centroid mid point rather than the mid point on the line that is
ogr2ogr OUTPUT.gpkg "Roads.tab" -dialect sqlite -sql "SELECT ST_Line_Interpolate_Point(geometry, 0.5) AS geometry,* FROM \"Roads\"" -f "GPKG"


texts: How to add image in OSM with the authorisation key using OpenLayers

texts:
I am trying to get a layer from the WMS request but the problem is the URL expects the authorization header. I have tried implementing that I am getting the error.

Failed to execute 'createObjectURL' on 'URL': No function was found that matched the signature provided.

Here is my JS code:
$(function() {
                var params = {
                    "FORMAT": "image/png",
                    "TRANSPARENT": "true",
                    "VERSION": "1.3.0",
                    "LAYERS": "1",
                    "WIDTH": "1000",
                    "HEIGHT": "1000",
                    "CRS": "epsg:3857",
                    "BBOX": "bbox",
                };

                $.ajax({
                    url: "https://wms-url/WMSServer?SERVICE=WMS&REQUEST=GetMap&" + $.param(params),
                    beforeSend: function(xhrObj){
                        xhrObj.setRequestHeader("KEY","XXXXXXXXXXXXXXXXXX");
                    },
                    type: "GET",
                })
                .done(function(data) {
                    console.log(data);
                    var image = new ol.layer.Image({
                        source: new ol.source.ImageStatic({
                            imageLoadFunction : function(image){
                                image.getImage().src = window.webkitURL.createObjectURL(data); //Getting error here
                            },
                            imageExtent: extent,
                        }),
                    })

                    map.addLayer(image);
                })
                .fail(function() {
                    alert("error");
                });
             });

When I am logging the response I am getting the image/png data in the response I think I am doing something wrong in adding the layer in OSM using OpenLayers.


texts: Getting ERROR 000539 running Raster Calculator in ModelBuilder?

texts:
I am trying to run Raster Calculator in ModelBuilder, however I am getting what looks like two errors after my model reaches a certain step:

ERROR 000539: Error running

I'm not sure if it is a syntax issue or something else. Raster Calculator is used in earlier steps in the same model with no problem.

Below is what I wrote:

Con((("%TWI.TIF%">15) & ("%NDVI.TIF%"<-0.05)),1,Con(((10<="%TWI.TIF%"<=15) & (-0.075<="%NDVI.TIF%"<0.05)),2,3))

Could someone help with my syntax?


texts: Use v.split.length in QGIS to split lines into specified length?

texts:
I have a shapefile in QGIS that I'm trying to split into a forced length. Lines need to all be exactly 1 mile long - however, I don't know how to force the v.split.length tool to split them this way. Link to file:

https://drive.google.com/file/d/1mPxbIcsNJVCYW5yfSkgSTMvAzG71f-4I/view?usp=sharing

I've used the tool to split lines evenly, and I know the tool has the ability to force lengths from what is written in the help information.

Is it just a matter of accessing the script behind the tool?


texts:
I have a postgres database with a series of fields that includes a date field in MM/DD/YYYY format. Through ArcSDE it displays in Arc in a weird format with the wrong date and some made up time.

When viewed via PGAdmin or QGIS the date displays correctly. Does anyone have an idea of why Arc is jumbling the date and how it can be corrected?

The screenshot below shows the attribute table for identical rows in QGIS and Arc. Notice how Arc includes a random time and the wrong date (everything is year 2000).


texts:
I have polygon layers on my ArcGIS Server and Geoserver. I need to find the closest line length of the polygon.

For example p(x1,x1) will get the L2 length and p(x2,y2) will get the L4 length.

Can I do this with ArcGIS geometry services?
Can I do this via PostGIS or Oracle Spatial functions?


texts: QGIS Color text labels the same color as the feature

texts:
Using QGIS 2.12.1 on Ubuntu 14.04 Desktop.
What I have is a layer where each feature is a different color. I also want to label each feature but I want the label colors to match the feature colors. I tried this answer to Getting currentfeature's color in Expression Builder of QGIS? but as mentioned by one of the commenters I am also getting QGIS to crash when I try to apply that symbol_color function.

I tried asking in the QGIS irc channel on #freenode but nobody seems to be responding.


texts:
I keep getting "Fatal Error (GETMAP) Bad NBIT Argument" error for the following sample script:

fields = ['Value', 'Class_Name']
cursor = arcpy.da.SearchCursor(LuTable, fields)
for row in cursor:
    sqlQuery = "Value = " + str(row[0])
    print (sqlQuery)
    rasExtract = ExtractByAttributes(inRaster, sqlQuery)
    outCon = Con(IsNull(rasExtract),0,1)
    outAgg = Aggregate(outCon, 10, "SUM", "EXPAND", "DATA")
    outAgg.save(outRas)
del row, cursor
arcpy.Delete_management(LuTable)

I cannot find much documentation on this error. I have checked all the input rasters, output paths and set workspace and scratch space manually not included in the script. After inspecting it step-by-step, the extract by attribute tool creates a blank raster and then abruptly stops. The only reference I found is this but they are talking about features not rasters. Has anyone experienced this error message?


texts: Postgis: Conflation of two vector layers into a single layer

texts:
If I have table A that I consider to be definitive and table B that may have some elements missing from table B but also has geometries that are "close" to those in A that I want to ignore. How could I merge the two tables to get a conflated table C?

For reference this is Openstreetmap ways married with road data from another set.

Would I  compare the start/middle and end points of the linestrings with table B to see if they were within X metres of any linestring in table A?


texts: Spatialite error: obsolete libspatialite

texts:
I am learning to use QGIS with the QGIS training manual (from the QGIS website). One of the excercises is to load vector data from a database (ch 3.1.3 in case you have the manual). When I try to do so I get the following error:

Unexpected error when working with:
/home/(...)/exercise_data/epsg4326/landuse.sqlite
obsolete libspatialite: connecting to this DB requires using v.4.0 (or any >subsequent)

Does anyone know what's wrong? I am using Ubuntu (latest version, had same issue before update). I also had the following error when opening QGIS:

Couldn't load PyQGIS.
Python support will be disabled.

I'm just mentioning this in case it is related, if not you can ignore it (will post seperate question if needed).


texts: Simulation envelopes and significance levels

texts:
Many spatial analysis packages provide Monte Carlo techniques to simulate upper and lower “envelopes” for a summary statistic as a function of distance (e.g.  K-function, nearest neighbor, etc…).  I’ve sometimes seen the significance of deviation from the envelope expressed as:

p = m * 1 / (n +1)

Where n is the number of simulations and m is the rank of the largest and smallest observation from a simulation sample for each distance r. For example, if m = 1, the first largest and first smallest values from the simulation sample are used to plot the upper and lower simulation envelopes. If m = 2, the second largest and second smallest values are used to plot the simulation envelopes.

My questions are:

1/ where does the + 1 in the denominator originate from? For instance, if we run 39 simulations, why divide by 40?

2/ Regardless of the number of simulations performed (i.e. 39 or 9999), m seems to have a disproportionate influence on the computation of the significance level. It would seem that taking the 2nd highest and lowest values of a simulation sample from 9999 simulations would have less of an impact on the width of the simulation envelope than from 39 simulations. I’m sure that there is a sound theoretical basis for this, but its logic escapes me. Is there an analogy in inferential (non-spatial) statistics that can help make this a bit more intuitive?

3/ How should one present the results of a simulation envelope? I sometimes see a p value defined for a simulation, but how is one to know if the presented p  is for m=1 or a more stringent m=3?

Edit: Per whuber's comment here is some clarification:

1/ The type of simulation pertains to testing the null hypothesis such as complete spatial randomness (CSR)

2/ Example of a package that computes simulation envelopes is spatstat (R). The function is called envelope and nrank is the parameter m described in the above equation.


texts: Multiple raster processing with SetNull?

texts:
I have two folders containing 5 raster files in each.

FolderA="a,b,c,d,e"
FolderB="f,g,h,i,j"

All files are in .tiff format.

The raster datasets in Folder A have valid range from -1 to 1 and those in Folder B have valid range from 0 to 3. What I am trying to do is mask each file in Folder A with files in Folder B (Mask File a.tiff with f.tiff, b.tiff with g.tiff and so on).

I am trying to achieve this with raster iterator and SetNull from spatial analyst with files in folder B as conditional rasters, files in folder A as constant and expression "VALUE">1.

My model looks something like this:

The ModelBuilder won't let me use iterate raster more than once. Creating a submodel for iterate raster won't run each tool in the model for each iterated value (which is basically what I want to do). I also tried this in python script but couldn't achieve the desired output:

import arcpy
arcpy.env.workspace=r"E:\A"
alist=arcpy.ListRasters()
arcpy.env.workspace=r"E:\B"
blist=arcpy.ListRasters()
for i in range(len(alist)):
    outras=arcpy.sa.SetNull(blist[i]>1,alist[i])
    outras.save("E:\\"+i+"_Mask.tif")


texts: Is there a way to change leaflet-gpx style?

texts:
I'm using the leaflet-gpx plugin to draw various .gpx files on my map.
How can I change the color/style of it?

gpxvar[{{loop.index0}}] = new L.GPX("{{url_for('static', filename='gpx/' + r )}}", {
        async: true,
        marker_options: {
            startIconUrl: "{{url_for('static', filename='img/pin-icon-start.png')}}",
            endIconUrl: "{{url_for('static', filename='img/pin-icon-end.png')}}",
            shadowUrl: "{{url_for('static', filename='img/pin-shadow.png')}}"
        }

gpxvar is my L.GPX object, I tried the below code but it didn't change anything, any pointers?

var highlightStyle = {
    color: '#9b1d41',
    weight: 3,
    opacity: 0.6,
    fillOpacity: 0.65,
    fillColor: '#9b1d41'
};
    gpxvar[{{loop.index0}}].setStyle(highlightStyle);


texts: Getting RunTime Error: Object: CreateObject cannot create geometry from inputs when trying to add a polyline using an insert cursor

texts:
The objective for this code is to take a csv that contains rhino observations and create a polyline shapefile for the data. The shapefile needs to have the paths the rhinos take based on observations (which is an x and y field in the csv) and the rhinos name must be stored in another field.

I have no idea what is going on, can't figure out the source of this error. I am not sure if the problem is in logic I used to create the dictionary, or if it with the code that follows the creation of the insert cursor.

It seems that the logic for the dictionary is working fine, I added print statements to make sure the rhino data is added properly, it follows the csv file as it should. Once you print the completed dictionary however, the rhino arrays are messed up. You can tell because some rhinos have more points than they should and some have less.

here is the code:

import arcpy
import csv
from arcpy import env
env.overwriteOutput = True

rhino_obsv = open(r"C:\Users\cvric\Desktop\GEOG485\project_4\RhinoObservations.csv")    # open csv containing the rhino observations for reading
sr = arcpy.SpatialReference(4326) # create a spatial reference object that is WGS1984
rhino_obsv_sf = arcpy.CreateFeatureclass_management(r"C:\Users\cvric\Desktop\GEOG485\project_4", "rhino_obsv.shp", "POLYLINE", spatial_reference = sr) # create empty polyline shapefile to store rhino data
arcpy.AddField_management(rhino_obsv_sf,"Name",field_type = "TEXT")

csv_reader = csv.reader(rhino_obsv) # create csv reader, delimiter is comma
header = csv_reader.next() # move reader to the header
name_index = header.index("Rhino") # find index pos. for rhino names
lat_index = header.index("X")   # find index pos. for latitude coordinate
lon_index = header.index("Y")   # index pos. for longitude coordinate

rhino_dict = {}
for row in csv_reader:
    lat = row[lat_index]
    lon = row[lon_index]
    name = row[name_index]
    if name in rhino_dict:
        sighting = arcpy.Point(lon,lat)
        rhino_track.add(sighting)
        #print("sighting added to " + name)

    else:
        #print("array created for " + name)
        rhino_track = arcpy.Array()
        sighting = arcpy.Point(lon,lat)
        rhino_track.add(sighting)
        rhino_dict[name] = [rhino_track]

with arcpy.da.InsertCursor(rhino_obsv_sf, ("SHAPEP@","Name")) as cursor: # use insert cursor to add rhink data to blank shapefile
    for key in rhino_dict:  # iterate through keys in dicitionary
        polyline = arcpy.Polyline(rhino_dict[key],sr) # use the array(value) that corresponds to each rhino(key) to create a polyline
        name = key # name of rhino is the key in the dictionary
        cursor.insertRow((polyline,name)) # use insertRow method to add polyline and name to the SHAPE and Name fields
del cursor


texts:
I'm working in a project with whole Europe data.
I'm working with WGS84 (4326), and sometimes I overlay my polygons with Google maps layer (in QGIS) to see some details.
When I do this, I have to reproject all the data to EPSG:3857, and it shows without problems.

In the image, Portugal coast matches with the polygons.

The problem comes when working with switzerland data. I'm seeing that not overlays 100%, but it shows a difference of +-500 meters.

In the second image, coast of a lake in Switzerland, is 500 meters moved.

Does someone knows why could could be happening this?

The rest of countries don't show any problem too. The only problem I see is In switzerland.


texts:
I have a file with shapefiles organized into different groups, though once I export the file using QGIS2Web the web version has the list of all shapefiles ungrouped.
How can I keep the shapefiles grouped in the web version?


texts: qgis.utils.iface.addRasterLayer - SSL certificate problem & Raster layer Provider is not valid

texts:
I am trying to add an ArcGIS Server Image Service located here:
https://orthos.its.ny.gov/arcgis/rest/services/T2011Resolution_Test/ImageServer

In the python editor in QGIS (64 bit 3.2.0), when I try this code snippet:

qgis.utils.iface.addRasterLayer("https://orthos.its.ny.gov/arcgis/rest/services/T2011Resolution_Test/ImageServer?f=json&pretty=true","raster")

I am getting these errors:

2018-07-18T10:22:57     CRITICAL    Invalid Layer : GDAL provider Cannot open GDAL dataset https://orthos.its.ny.gov/arcgis/rest/services/T2011Resolution_Test/ImageServer?f=json&pretty=true:
             SSL certificate problem: self signed certificate in certificate chain
             Raster layer Provider is not valid (provider: gdal, URI: https://orthos.its.ny.gov/arcgis/rest/services/T2011Resolution_Test/ImageServer?f=json&pretty=true

Now, I know that GDAL has a file type, but no idea how to update it. Also, the machine that I am calling the url on has the certificate loaded, so I'm confused as to why, the Python editor in QGIS is throwing a SSL certificate problem.

Also if I try map services over https I get the same errors mentioned above.

Note that this code works fine:

qgis.utils.iface.addRasterLayer("http://server.arcgisonline.com/arcgis/rest/services/ESRI_Imagery_World_2D/MapServer?f=json&pretty=true","raster")

But the above is over http, and from what I can tell ESRI_Imagery_World is added into GDAL. If I change it to https then I get the same errors mentioned above.

I'm surprised at this point that we can't just send things over https. Most interfaces aren't http capable these days or there is a redirect to https. In the case where I am getting the error, there is a redirect to https so if I change to http, I am still getting the error.

Any ideas would be helpful. I searched this forum and have searched online, but most developers are not trying to load Image Services, but Map services. And there is a difference.


texts: Indoor 3D explorable map - help with visualization

texts:
I've made a 3D map of a building with SketchUp. My next step should be to visualize it on a browser (which is actually possible), but I would like to create some clickable areas to trigger the visualization of a spherical photo of the inside.

I know it's not exactly a GIS issue but I hope to be forgiven.


texts: QGIS Unexpectedly results from intersect(topology errors)

texts:
I try to use a simple intersect in QGIS 2.18.10 and I get Unexpectedly results.

first I have two polygons :

second I use SAGA intersect algorithm and I get this layer:

Until now all good(not really good).

now I think new intersect layer is correct because that created from polygon 1 and polygon 2.

but if I use to difference algorithm to see if my new layer is correct then I take topology difference error at intersection line from two polygons

like this :

that is because at intersection area of two polygons don't have common vertex.

here like this image :

that create topology errors.

How can I fix that or create new intersect without this error using QGIS?


texts: Making dijkstra algorithm Shortest Path with ArcGIS for Desktop?

texts:
I am new user of ArcGIS. I have some basic knowledge such as, add data as layers, find and download map as my related study, I am also familiar with common tools in ArcGIS like joining and selection tools.

As student in a class, I have an assignment to make shortest path using dijkstra algorithm in one week. Even I do this in short time, I have further interest to learn more about GIS field. Unfortunately I don't know which step that I have to take to study especially for finish my assignment. I have search study material in internet but they have further implementation and lack of basic knowledge

Is there any references from basic practical knowledge to make shortest path analysis with dijkstra algorithm with ArcGIS map software?

After this I look further to use this analysis to make shortest path analysis with dijkstra algorithm to handle flood as disaster management.


texts:
There are plenty of questions related to printing using ESRI's JS API, however, I am looking for a way to utilize a printer icon to automatically fire the task.

The samples show a print tool that uses a button with an arrow on one side to deliver a drop down of print templates to choose from. When you choose a template it then replaces the button with the word "Printout" that is a link to the print.

I would like something similar to the ArcGIS Online Web Map that has an icon that is clicked and a new window automatically pops up showing the print.

Any ideas?


texts: I need to figure where is this location in San fransisco

texts: Can I get the Lattitude Longitute of the picture in the map?


texts: Heavy load Map application. where to start?

texts:
I want to start building a quite big project that I have in mind that is 99% based on the world map. I have worked with Google maps in the past and know how to use their api and I have done some research on other solutions like open street map. I want to build a web Application that will need most of the functionality that the google javascript Api provides (markers,event handlers, map data, geocoding, directions ,etc).

But google has the usage limits policy which could become a great burden for my application if the traffic rises to huge amounts. So I would like to know if there is a way to get an open source javascript api and maps (like the ones from open street map) and host them on my own server in order to avoid the javascript api usage limits. Any thoughts on that? Any other possible workarounds?

PS. Sorry if my questions seem silly to you but I am new to GIS and I do not have the knowledge or experience to find those answers on my own.

EDIT: I have to mention that what I actually need is a map from a predefined zoom level with the functionality stated above. The traffic is sure to become really heavy and that is the reason why I need solutions without any limits when it gets to calling an API. Last but not least, when I am saying that I would like to host my own maps actually I mean probably hosting the tiles that I need and somehow use them in addition with the API in order to show the result to the end user. From a little research done I understood that organizations like open street maps also hold the actual data (like road names etc) in special databases. I would also need to have a connection to one of those as I also need the information related to the map. If it helps,you may think of my app like a gps navigation app without any limits because of huge traffic and a lot of users.


texts: Can i get population of area, given coordinates or postal code?

texts:
I intend to classify areas based on the population or population density. By classify I mean whether the area is rural, urban or sub urban specifically in Europe. As a input I would have either postal code of the area or coordinates. Based on which i want to know under which classification that area falls.

Is there any API  which could help me retrieve population or population density or region classifier based on postalcode or coordinates of location?


texts:
I can't import arcpy in spyder but I don't have any problem when using PyScripter.
The error that I get is: ImportError: No module named 'arcpy'

I would prefer using Spyder, if I can solve this, any suggestions?


texts:
I have raster data stored in a PostgreSQL/PostGIS database. I need to create a summed raster from certain rasters.

Something like:

select sum(raw_data) as image from data where rid > 2 AND rid < 5;

But this is not the correct function. What is?


texts: Python function to execute PostGIS query

texts:
I am trying to write a python function to run PostGIS query:

import sys, os

#set up psycopg2 environment
import psycopg2

def river_dist_matrix(table_name):

    #driving_distance module
    query = """
        select *
        from pgr_drivingDistance ($$
            select
                id as id,
                source::int4 as source,
                target::int4 as target,
                shape_leng::double precision as cost
            from public.'table_name'
            $$, %s, %s, %s, %s
        )
    """

    #make connection between python and postgresql
    conn = psycopg2.connect("dbname = 'routing_test' user = 'postgres' host = 'localhost' password = 'xxxx'")
    cur = conn.cursor()

    #count rows in the table
    cur.execute("select count(*) from 'table_name'")
    result = cur.fetchone()
    k = result[0] + 1                #number of points = number of segments + 1
    print k

    #run loops
    rs = []
    i = 1
    while i <= k:
        cur.execute(query, (i, 100000000000, False, False))
        rs.append(cur.fetchall())
        i = i + 1
    # print rs
    #import csv module
    import csv
    import tempfile
    import shutil

    j = 0
    h = 0
    ars = []
    element = list(rs)
    # print element
    #export data to every row
    filename = 'ck_dist_m.csv'
    with open(filename, 'wb') as f:
        writer = csv.writer(f, delimiter = ',')
        while j <= k - 1:
            while h <= k - 1:
                rp = element[j][h][3]
                ars.append(rp)
                h = h + 1
            else:
                h = 0
                writer.writerow(ars)
                ars = []
            j = j + 1

    # concerning about flow-connection
    with open(filename, 'rb') as f, tempfile.NamedTemporaryFile(mode='wb', delete=False) as g:
        writer = csv.writer(g, delimiter = ',')
        for row in csv.reader(f):
            row = [element if float(element) < 10**6 else 'nan' for element in row]
            writer.writerow(row)

    shutil.move(g.name, filename)

    conn.close()

if __name__ == "__main__":

    table_name = 'tc_500wa'
    river_dist_matrix(table_name)

But as I ran code above, I got this error:

Traceback (most recent call last):
  File "C:\Users\Heinz\Desktop\river_dist_matrix.py", line 95, in <module>
    river_dist_matrix(table_name)
  File "C:\Users\Heinz\Desktop\river_dist_matrix.py", line 40, in river_dist_matrix
    cur.execute("select count(*) from 'table_name'")
psycopg2.ProgrammingError: syntax error at or near "'table_name'"
LINE 1: select count(*) from 'table_name'
                             ^

[Finished in 0.2s]

I think the error is in relation to the input arg table_name because it was placed in the query and other places in the code. As in:

query = """
    select *
    from pgr_drivingDistance ($$
        select
            id as id,
            source::int4 as source,
            target::int4 as target,
            shape_leng::double precision as cost
        from public.'table_name'
        $$, %s, %s, %s, %s
    )
"""

and

cur.execute("select count(*) from 'table_name'")

How to edit this code to make it run smoothly?


texts: Can't see the script panel on Google Earth Engine

texts: I'm trying to figure out why I cannot see the script panel on gee platform but there is almost nothing on the web! Even the Google group is private.


texts: Understanding Union analysis output using single feature class with overlapping polygons in ArcGIS Pro

texts:
I have a single polygon Feature class with about 33,000 shapes. I'm looking for overlaps.
I want to be able to say "Shape x overlaps with Shape y and Shape z"
So the UNION analysis tool claims to find the overlaps, give all the attributes of the clashes give the Feature Class IDs of both the shape and the overlapping shape(s), and all the attributes as well. Sounds great... but doesn't work.
So I have a concrete example with 3 polygons overlapping each other. They are visibly and physically on top of each other. Let's call them Shape A B and C.
In my union analysis, Shape A B and C come up with a total of 248 overlaps in one form or another which is fine, since the shapes are large, and there are many other overlaps too.
But now I am trying to find the specific instance of where Shape A overlaps with Shape B and Shape  C... and I can't.
I have looked up the Object IDs for each shape
103 Shape A
709 Shape B
226 Shape C

The union Analysis produces a feature class that gives me all the original attribute fields as I would expect, and one new field called "FID_myFeatureClass". So I have a ObjectID and a FID_myFeatureClass and a Shape Ref.
So I search for Shape Ref, and I find 248 rows with Shape A or Shape B or Shape C. OK.
I search for Object ID=103 or Object ID=709 or Object ID=226 and nothing. No matches.
I search for FID_myFeatureClass=103 or FID_myFeatureClass=709  or FID_myFeatureClass=226 and ... nothing
So basically, a union analysis says "This shape with the original object ID of x does overlap with something"
... but doesn't say what.
Not very useful....What am I missing?
ArcGIS Pro 2.6.0


texts: Using Open Google Earth cache file in QGIS?

texts:
I have a Google Earth cache file.

Is there any way to open the Google image from a cache file in QGIS 3?

I had done it in standalone PC successfully. Does it works also in Mapped Network Drive also.


texts: extracting geographic location from NOAA NARR grib

texts:
I've downloaded a NOAA NARR grib file that I want to extract the wind component as well as the geographic location.  I'm able to extract the wind component from the grib but I can't seem to find any indication that there's a specific latitude/longitude value for each data point.  Ultimately I want to extract the data and load it into a relational database with time,location,wind_data.  The grib file I'm using can be found here.

http://nomads.ncdc.noaa.gov/data/narr/201410/20141001/narr-a_221_20141001_0000_000.grb


texts: Fixed QGIS layer symbol size in layer legend

texts:
When a layer symbol is defined with map units or "meters at scale" unit, it is sometimes shown in the legend at a very small scale, preventing to see the details. Or if we zoom in the map, the legend will be shown in a very large scale, see image below (reference https://issues.qgis.org/issues/8884 )

Is there a way I can keep the layer symbol scalable in the map, but have fixed size for the layer symbol legend?


texts: Creating map package with multiple page sizes within one MXD of ArcGIS Desktop?

texts: Are there any alternatives to an extension like MapLogic?


texts: How to set Terrain Mapping toolbox as a permanent tool?

texts:
I have downloaded the Terrain Mapping Toolbox in order to use in a project that was assigned to me. However, I want to define it as a permament toolbox in ArcMap, similary with the main toolboxes that are offered through ESRI(e.g Spatial Analyst, Data Management, Conversion etc.).

I tried to place it in this directory (C:\Program Files (x86)\ArcGIS\Desktop10.4\ArcToolbox\Toolboxes), but didn't work. I thought that locating Terrain Mapping toolbox at the same directory with the rest main toolboxes, that would work.

Is there any suggestion which will enable me to set Terrain Mapping as a default toolbox?


texts: Automatically Snapping Points to Closest Part of Line

texts:
I have some line points representing manholes. I also have line features representing roads. Both of these features are currently living in a PostGIS database. I'd like to automatically move these points to the closest part of the line, so all of the points are arranged in a straight line.

Is there an appropriate PostGIS function that does this? Or, a function in QGIS?

Edit: I've found the "Snap Geometries to Layer" function in QGIS 3.0 works great for this, but I don't want to create another layer with the straightened points, I want to update the geometry of the existing points. Any way around this?


texts:
I have a function that allows move a point by angle and distance

The problem is that after move the point, this doesn't show in map:

Sometimes the line also disappears

This is a summary of the code to update the coordinates of the point:

loFL = goMap.getLayer("points_layer");
//take the first graphic (The point) and update
loFL.graphics[0].geometry.x = newX;
loFL.graphics[0].geometry.y = newY;
loFL.redraw();

PD: 'loFL' it's a FeatureLayer created with a FeatureCollection


texts: Choose between 2 algorithms in my script

texts:
I would like to know how can user chooses between 2 algorithm's parts in my script.
User must be able to chose between 2 methods to integrate a variable : automatically with a character selection in layer name or manually with a field.
I developed both methods in 2 scripts and they works well. In each script just one part is different for this variable.
So how can I propose one or the other to user? radio button, dropdown list... And How can I do it?
Somebody has an idea?


texts: Forcing ArcMap to name all geometry fields as SHAPE_Length or SHAPE_Area in file geodatabase?

texts:
I'm working with the model builder in ArcMap 10.4.1 and I need to do some geometry calculation using the fields ArcMap creates. I am doing this with the tool 'calculate field' and my expression is:

[SHAPE_Length] / [SHAPE_Area]

But some of my feature classes have the geometry fields named as SHAPE_Length and SHAPE_Area and other feature classes as GEOM_LENGTH and GEOM_AREA. Because of the different names I cannot use an iterator to go through all my different feature classes because it will give an error when the geometry is stored as GEOM_Length rather then SHAPE_Length. Arcmap keeps naming the geometry field as GEOM_Length as in the original feature class even after altering the data or making a copy. I am working from a file geodatabase.

How can I force Arcmap to name all the geometry fields in the same way?


texts: How to compute only urban area from the give code

texts:
'land_and_cover_type_1" class has 1-16 whare "Urban and built-up" has the valus 13 with color code a5a5a5 i only want to compute the urban part of land insted of whole 1-16 value how to do that

 var modisLandcover = ee.Image('MODIS/051/MCD12Q1/2001_01_01')
   .select('Land_Cover_Type_1');
   //var modisurban= modisLandcover.select('a5a5a5');
//print(modisurban);
// A pallete to use for visualizing landcover images.
var landcoverPalette = [
    'aec3d4', // water
    '152106', '225129', '369b47', '30eb5b', '387242', // forest
    '6a2325', 'c3aa69', 'b76031', 'd9903d', '91af40',  // shrub, grass, savanah
    '111149', // wetlands
    '8dc33b', // croplands
    'cc0013', // urban
    '6ca80d', // crop mosaic
    'd7cdcc', // snow and ice
    'f7e084', // barren
    '6f6f6f'  // tundra
];

    // A set of visualization parameters using the landcover palette.
    var landcoverVisualization = {palette: landcoverPalette, min: 0, max: 17, format: 'png'};
    // Center over our region of interest.
    //Map.centerObject(geometry, 11);
    // Draw the MODIS landcover image.
    Map.addLayer(modisLandcover, landcoverVisualization, 'MODIS landcover');


texts: Problem overlapping shapefile and raster in R?

texts:
I want to plot a shapefile over a raster file in R but I can't make them overlap perfectly: the raster appears to be rotated of few degrees counter-clockwise. Is it a problem with the projection?

Please consider the following example:

library(raster)
library(rgdal)

# Download from http://biogeo.ucdavis.edu/data/gadm2/shp/ITA_adm.zip
shape_file = "ITA_adm1.shp"
# Download from http://sedac.ciesin.columbia.edu/data/set/gpw-v3-population-density/data-download
# Setting Geography: Country, Italy; Data Attributes: Grid
pop_density_file ="w001001.adf"

italy_map <- readOGR(dsn = shape_file, layer = "ITA_adm1")
italy_map_dens <- raster(pop_density_file)

colPal <- colorRampPalette(c("white", "red"))( 500 )

par(mar=c(0,0,0,0))
plot(italy_map_dens, xlim = c(6.70, 18.32), ylim = c(35.2, 47.6), axes=FALSE, box=FALSE, legend=FALSE, col=colPal)
plot(italy_map, xlim = c(6.70, 18.32), ylim = c(35.2, 47.6), border="grey", add=TRUE)


texts: How to handle updates to pgRouting network in webmapping environment?

texts:
I'm building an application for a client of mine that will need to create routes in a PostgreSQL database.

So far so good, but I need to support edits and changes to my network and I need to support bulk imports.

I've read the tutorials and the examples available on the web and the routing part is clear for me.

My main concern is perfomance. If I try to update the network at each update, this will be incredibly slow. Here's the workflow I'm thinking for creating new edges:

User inserts a new edge (let's call that A);
System looks for existing edges that touches or crosses this new edge (edge B);
System splits edge B (if touches) and/or splits edge A (if crosses);

This will trigger another event at the database (recalculating the new nodes for each of B splitted parts B and B');
System looks for existing nodes for edge A;
If nodes found, update the feature to maintain the network topology (from to node ids);
If no nodes are found, create them and update the necessary features;

Of course there will be similar triggers for updates to the edges (this may be even more complex than the above) and deletes. For a small number of users it may be acceptable, but for bulk imports this is unlikely to work (I have three of four spatial queries being run for each update).

My bulk process will be run using async tasks (Celery). As whuber always says, if it's too slow, blaim the algorithm.

I have a similar setup with ESRI software for a customized network scheme and works well, but it's not the fastest kid on the block.

I have two ways of doing this: in the application layer or in the database. The database is a good choice IMO but I may leak the domain layer to the database and I REALLY don't want to do that. The application is being developed with GeoDjango.

What are your thoughts on this?

Can you guys comment on the algorithm?

This is a more django-specific question: can I query memcached entities using spatial queries?


texts:
Is it normal to use the geometry type 'multipoint' instead of 'point' knowing that I use it to store only one point?

How can I convert from multipoint to point?


texts:
I am seeking to create an animated map illustrating the simultaneous movement of different objects across a large area over time.

The display should be capable of playing automatically, or by manually selecting a date and/or period.

I would like to retain the interrogable capability of a digital map (zoom and query a database or attributes) while paused, so I do not want to merely create raster images and and incorporate them into a slide show.

Rather I want vector data moving across a base map.

Does anyone know how to perform this trick using QGIS, GeoServer or ArcGIS for Desktop?


texts:
In QGIS 3.10,
the data for the layer SIMnodes seem to be OK
as inspected in the respective data table
but trying to save it into a shapefile:

cSIMnodes = QgsProject.instance().homePath() + '\\SIMnodes.shp'

QgsVectorFileWriter.writeAsVectorFormat(layer = SIMnodes,
       fileName = cSIMnodes,
       fileEncoding = 'UTF-8',
       destCRS = QgsCoordinateReferenceSystem(4326),
       driverName = 'ESRI Shapefile')

yields all real numbers in the resulting Esri shapefile to be wrong
{for example 234.5 is written as 2.0}.

All integers and all strings are written well.


texts: What does the max_slope_length option do in GRASS r.watershed?

texts:
What does the max_slope_length option do to the r.watershed program in grass? According to the manual, it should limit the length of a stream. Does this mean a max_slope_length equal to the raster resolution means no stream flow? It appears to have no effect. I'm trying to determine if this is something I'm not understanding, or a bug in the program, but have not had luck with the grass mailing list (no replies at the time of this writing, see thread here)

Here is an MWE with the NC data set that shows no effect from using the option:

r.mapcalc "rain = 1"
r.watershed -s -a --v elevation=elev_srtm_30m accumulation=acc drainage=fdir flow=rain
r.watershed -s -a --v elevation=elev_srtm_30m accumulation=acc.len drainage=fdir.len flow=rain max_slope_length=15
g.gui.mapswipe first=acc second=acc.len


texts:
I try to get my WFS working but with no success. Actually I use nearly the same Code like in the OL3-Examples.
In Firebug I can see a lot of WFS-Requests and a GML-Response which looks fine to me. Nevertheless nothing is shown in the map.
Can someone see the problem?

var vectorSource = new ol.source.ServerVector({
          //format: new ol.format.GeoJSON(),
          format: new ol.format.WFS(),
          loader: function(extent, resolution, projection) {
            var url = 'http://.......&REQUEST=getfeature&typename=deu_adm1_3857&&STYLES=&BBOX=-20026376.39,-20048966.10,20026376.39,20048966.10&SRS=EPSG:3857&
MAXFEATURES=99&SERVICE=WFS&VERSION=1.1.0';
            $.ajax({
              url: url
            });
          },
          strategy: ol.loadingstrategy.createTile(new ol.tilegrid.XYZ({
          maxZoom: 19
          })),
        projection: 'EPSG:3857'
        });

        var loadFeatures = function(response) {
          vectorSource.addFeatures(vectorSource.readFeatures(response));
        };

         var vectorLayer = new ol.layer.Vector({
          source: vectorSource,
          style: new ol.style.Style({
            stroke: new ol.style.Stroke({
              color: 'rgba(0, 0, 255, 1.0)',
              width: 5
            })
          })
        });


texts: How to delete rows in attribute table of a shapefile based on specific condition?

texts:
I want to delete certain rows in a shapefile if field ID is equal to certain number (say 2).

Below is what I am trying:

import arcpy
shape="C:\Users\Data\Loc.shp"
rows = arcpy.UpdateCursor(shape)
for row in rows:
    if row.Id==2:
        row.Id=row.Id.replace("row.ID", "")
        rows.updateRow(row)

del row
del rows

I am using ArcGIS 10


texts:
I am trying to add new layers into a specific group which I can get to work if I know the index, but how can I get Python to find the index of a group so it can load the new layer into the group wherever it is in the TOC?

qgis.utils.iface.legendInterface().moveLayer( layer, index )


texts: Eliminating Misclassified Noise using ArcGIS Pro

texts:
I am classifying imagery using Segmentation and Training Sample Manager in ArcGIS Pro. I end up with a lot of noise that falls below the mmu.
Is there a way to use the Con tool to look for pixels with an area of less than a foot and then set those to a certain value so I can eliminate them with the Nibble tool?
I cannot seem to get the syntax correct. I am starting to think this is the wrong tool.
I cannot use Value because that is assigned to each class.


texts: Changing 'value' for entry in symbology table in ArcGIS Desktop?

texts: In ArcGIS (Arcmap 10.3.1), I would like to change the 'Value' column for one item in my symbology key, as there is a spelling mistake (see picture). How can I do this? (Without deleting the row and creating a new one.)


texts:
I have a data in shapefile format.

https://www.dropbox.com/sh/nrz0w2djmfwjf19/AAB5ilHZwVQkDDa3CrwRW_Yoa?dl=0

I converted the data to a raster format using ArcGIS. I filled the noData value with 0 using ArcGIS Raster Calculator tool.

Con(IsNull("InputRaster"),0,"InputRaster")

The output layer looks like this

https://www.dropbox.com/s/uqvd3tqnlq4bxzd/OUTPUT.PNG?dl=0

I need the data to contain the value 0 for other parts of Poland marked in red, i.e. either adjustment to the Polish borders or enlargement of the default created square.

Below is a view of the situation described and an shapefile file with Polish borders

https://www.dropbox.com/sh/yqruulkjx929kca/AAC5TW1foct2w-fCZHTNa2nDa?dl=0


texts:
I'd like to select multiple values on my column (undefined number) and as long as I know, IN operator doesn't work on Mapserver's filter.

Example : FILTER (([ct] IN ('%ct%'))  or  ('%ct%' = '1')) returns

  msPostGISLayerWhichShapes(): Error (ERREUR:  la fonction ct(unknown)
  n'existe pas LINE 1: ...0878906249999975 -66.4782081438564))',4326)
  and (("ct"('1'))...

  HINT:  Aucune fonction ne correspond au nom donné et aux
  types d'arguments. Vous devez ajouter des conversions explicites de
  type.

==> ct(unknown) function doesn't exist ... Can't find a function matching name and parameters given. You should add explicite type's conversions

Is there a tip to use IN operator? I need to send several values for a same column.

As my filter function could seem strange, here's my VALIDATION :

VALIDATION
    'ct' '^[a-zA-Z\-]+$'
    'default_ct' '1'
END


texts: What should be different variogram model in kriging

texts:
In ordinary kriging algorithm in QGIS (Saga algorithms provided in QGIS) there is field for Variogram model which by default is given as 'a + b * x' what does it signify and what are other options to provide and their significance?

PS: I need to know about various kriging variogram models and how to provide their equations in Kriging algorithm as in below Image

PFB Image:


texts: creating attribute table from a raster layer in arcmap

texts: I want to build a raster attribute table for a raster data with floating or double precision pixel type. But when I use the "build raster attribute table" tool from data management, an error shows up mentioning that this tool does not work for floating or double precision pixel type. What should I do?


texts: QGIS Reclassify with raster calculator to NaN

texts: I would like to use raster calculator in QGIS to convert all values <= -500 to NA values. How can I do that?


texts: Finding Network overshoots under a certain distance

texts:
we have a large contiguous network that will have legitimate overshoots (like a dead end street), but may or may not have illegitimate overshoots.  Using FME, I can't seem to manufacture a way to find these overshoots.  It is new to me, but I cannot work out how to do it.  A long lunch yesterday for Mothering Sunday may have removed a large number of brain cells, but I can't work out a way to do it.

Any ideas?  Thanks in advance.


texts:
I create one-way replica from one  geodatabase to another. After that, i add new feature class in parent geodatabase.
Is it possible to include new feature class in replica, but i don't want to recreate replica?


texts: Converting decimal latitude/longitude bounding box to SRID 26910

texts:
I have a bounding box specified in decimal latitude/longitude, and need to convert this into a bounding box in the SRID 26910 coordinate system.

I've never had to work with different GIS coordinate systems before, and haven't been able to find anything about SRID 26910 through Googling around.

Is anyone able to point me in the right direction on how to go about this?

The conversion would be done in Python code.

My end goal is to provide a correct bbox parameter to the http://resources.esri.com/help/9.3/arcgisserver/apis/rest/export.html API, when imageSR and bboxSR are provided as SRID 26910.


texts:
if you have any idea that can help me  I would be grateful :):)
So i should create a web service  wich will communicate with my android application .in my android app the client choose two point start and arrival this two point will be send to my web service to find the bus that has the shortest path between them.
i have a problem analytically and  programmatically  i  find a dijkstra algorithme in this link http://www.vogella.com/code/de.vogella.algorithms.dijkstra/codestartpage.html
 and i find this also http://www.codeweblog.com/dijkstra-shortest-path-algorithm-to-optimize-combat/

can you help me wich one i choose  and  how can i establish a relationship between this algorithme and my data base may be i need to  send or retrieve the bulk of data in arraylist.. ..what are the classes needed what is the query that i need.. in wich classe i write them.. .

(i use eclipse ide )
thanks in advance


texts:
I added a delimited text layer to a Qgis 2.0 project, working in Windows, but it got added wrong: It didn't appear in the list of layers on the left panel, nor did it show in the map canvas. However, when I try to use Points2One to create a polygon, it appears in the list of available layers, but if I select it Points2One generates an empty layer.

(If I add it again it works fine, but I can only eliminate the second, working layer, not the first one, and I can't delete it from the layer list because it doesn't show there.)

Any idea of what might be the cause?

Thanks.


texts: Ignore Features Outside the Area of Interest in QGIS

texts:
I have layers (shapefile and GDB) in my map that have more than 100,000 features. I am not editing them but just using them as a reference. I work only in a particular small area at one time. But my map is still slow because it is loading thousands of features.
Is there a way to set a filter in a QGIS project to ignore everything that is outside a particular area, so that the map is faster.


texts: Transforming shp files to projected coordinate system

texts: I have some KML files, polylines. I will convert them in grass to shp. How can I transform coordinates to some projected coordinate system? I was never doing it, so please help me. I need to transform them to Albanian 1987 GK Zone 4. I'm using Autocad Map 3D 2010 or ArcGIS 10.


texts: Finding list of points near current long/lat using PostGIS?

texts:
[UPDATE]

What I have now is light years better than I did before.
With the suggestion to look at ST_POINT, I restarted my googling and the query looks now like so:

SELECT "ID" from "CityBottle".message_locations where location= "CityBottle"."fnMakePoint"( :Longitude,:Latitude)

MakePoint is a function defined like so:

BEGIN
 RETURN CAST(ST_SetSRID(ST_Point(Longitude, Latitude),4326) As geography);
END;

It is worth noting that I did notice the function ST_MAKEPOINT, but I am at the prototype stage right now and the above was good enough (plus, I would probably still wrap that into a custom function to protect the queries...).

Now, the main contention I have is "how do I define a reasonable index"?
I mean, the points are in their own table and I am accessing the whole thing via a view to list the messages (the table has a query only to make sure that the point isn't already in the table...).

Thus, I'll need some kind of index that will work properly so that I can use ST_DWithin.

Can I just create an index on the field? Is there anything specific I need to do for better performance?

[ORIGINAL]

What I need is a "where am I?" kind of thing listing points within a certain radius from the current POINT(long,lat) .

My understanding is that you do this with ST_DISTANCE and saying that it has to be, for example, less than a certain amount.

My first attempt has been this:

select* from "CityBottle".message_locations ml where ST_DISTANCE(ml.location,POINT(12.0,13,0)) < 100

which has yielded this error message:

ERROR:  function point(numeric, integer, integer) does not exist
LINE 1: ...essage_locations ml where ST_DISTANCE(ml.location,POINT(12.0...
                                                             ^
HINT:  No function matches the given name and argument types. You might need to add explicit type casts.

Suggestions?


texts: Configuring Mapproxy + Mapnik for using Getfeatureinfo

texts:
This is probably a duplicate of this question: How to configure mapproxy and mapnik for getfeatureinfo requests, however, that one is old and still unanswered.

I'm trying to configure a Mapproxy using Mapnik and I need to make getfeatureinfo requests available.

My configuration files are like this (parts that I believe are relevant):

mapproxy.yaml:

services:
  demo:
  kml:
  tms:
  wmts:
  wms:
    srs: ['EPSG:4326', 'EPSG:900913']
    image_formats: ['image/jpeg', 'image/png']

layers:
  - name: poi
    title: Pleno POIs
    sources: ['poi_wms']
  - name: vias
    title: Pleno Vias
    sources: ['vias_wms']

sources:
  poi_wms:
    type: mapnik
    mapfile: mapnik/Mapnik.xml
    transparent: true
    layers: ['poi']
  vias_wms:
    type: mapnik
    mapfile: mapnik/Mapnik.xml
    transparent: true
    layers: ['vias']

And my mapnik xml looks like this:

<Map ...>
   <Style>...</Style>

   <Layer name="vias"
           srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over"
           queryable="true">
        <StyleName>vias</StyleName>
        <Datasource>
            (...)
        </Datasource>
    </Layer>

    <Layer name="poi"
           srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over"
           queryable="true">
        <StyleName>poi</StyleName>
        <Datasource>
            (...)
        </Datasource>
    </Layer>
</Map>

When I try to do a getfeatureinfo request, I get "layer vias is not queryable".

I've tried adding the queryable="true", as one answer in old question I've linked suggested and had no success.

Also, I had one layer on mapproxy using the 2 layers on mapnik, I changed to two to see if it would matter, still nothing.

I'm using Mapproxy 1.5 and on its documentation (http://mapproxy.org/docs/1.5.0/sources.html) it says how to make a wms source queryable (add wms_opts: featureinfo: true). The problem is that it only works if you have type: wms. When you have type: mapnik, it says that the keys wms_opts or featureinfo are unknow and it doesn't work.

I've tried several other stuff (like adding a key mapnik_opts with featureinfo: true) and couldn't get it to work, nor find any information about this on the web.

Does anyone know how to solve this problem? (Or at least have some kind of workaround for it?)
It seems like either mapproxy doesn't support getfeatureinfo requests when you're using mapnik or the information about how to do it is well hidden. :(


texts: Difference between Crosses & Intersects - Shapely (Python)

texts:
I have two questions :

I have some lines (eg: road network). I want to find coordinates of each junction.

Should i use crosses or intersects function from python's Shapely module? They are giving different counts.
Moreover these functions return boolean value. How to get the junction coordinates ?

with open('./lines.geojson') as f:
    lines = json.load(f)

line = []

for feature in lines['features']:
    line.append(feature['geometry']['coordinates'])

count = 0
for i in range(len(line)-1):
   j =i+1
   while (j < len(line)):
        l1 = LineString(line[i])
        l2 = LineString(line[j])
        if l1.crosses(l2)== True :
            count =count+1
        j = j+1


texts: ArcGIS for Server 10.1 (including ArcSDE) and SQL Server 2012 problem with Create Enterprise-Geodatabase

texts:
i have the following server system:

-Windows Server 2008R2
-SQL Server 2008 (SDE10 Enterprise Geodatabaees) and SQL Server 2012 on the the same machine
-ArcSDE Application Server 10

First - Is that right, that i do not need to install the ArcSDE 10.1 for Microsoft SQL Server because we use direct connect on the client ?

Now i want to create with ArcGIS 10.1 a new ArcSDE 10.1 Enterprise Geodatabase on SQL Server 2012 with the "create enterprise geodatabase" tool. But i get an error messagge: Unknown errorNo extended error. I look at the sdedc_SQL Server.log:

DB_instance_open() db_connect error: -1
CAN'T OPEN INSTANCE: sde:sqlserver.
Spatial Engine Connection Failed (-51).
Cannot Get Access to Instance sde:sqlserver


texts: Volume of water in basin with reference to incremental height of DAM?

texts:
I have a DEM of my area.
I did watershed analysis with Arc Hydro.

I want to calculate "Volume of water in a basin with reference to incremental height of DAM"

Is there any method, tool to give output with info of at h1-v1, h2-v2,......hn-vn(at h-height , v-volume) in tabular or any other form, if we give input values of "min height" at which dam footing with "incremental height" and do  calculations up to "max height".

Please let me know if any software/tool is doing above calculation?


texts: Joining lines intersecting with only one other line?

texts: I have road centerline file that is split into smaller segments. I need to make a node file. How can I join line segments intersecting only once - so I wouldn't join ones that have 3-4 intersections like those circled in last picture?


texts: What does the adoption of Python by NVIDIA for GPGPU mean for GIS?

texts:
Today NVIDIA announced support for the Python language on its flavor of GPGPU (CUDA).

Manifold GIS uses CUDA to enable some accelerated raster operations but it is not a programmable environment and is limited to what functions its developer has provided.

With Python, used in many GIS packages including ArcGIS and QGIS (along with the numpy and sciypy packages), being supported as a first-class CUDA language, what are the prospects for being able to leverage GPGPU in these mainstream GIS packages?


texts: Join attributes by location doesn’t appear to be including data that it should

texts:
I am trying to calculate the number of bus stops which are within 400m of c. 100 properties that are in relatively close proximity to one another.

Using MMQIS I created the 400m buffer for the properties, which was fine, but when they were displayed I noticed that quite a few overlapped one another.  I then performed a ‘join attributes by location’, selecting my bus stop layer as the target vector layer and the 400m buffer layer as the ‘join vector layer’, and it quickly combined the two datasets.  I initially thought this sequence of events was correct, but when I filter out some of the individual buffers which overlap it is clear that the combined dataset does not comprise all the bus stop data that features in the bus stop layer. And all the layers have the same CRS.

I’m a missing a trick?  I need to find the answer as quickly as possible.  Is there a simple alternative way for this to be achieved if this beyond the capabilities of join attributes by location?


texts: Source for wind energy potential for India in GIS format

texts:
I am looking for wind energy data (they can be wind speed at any height or wind energy potential) for India in a GIS format.

Like the data displayed the link below:
http://www.arcgis.com/apps/OnePane/basicviewer/index.html?appid=f03b21b359964374a1d4c274de254f26


texts: Splitting data in each record of attribute field into multiple records/points using QGIS?

texts: I have a point data layer with an attribute named FACILITYNAME that combines multiple records, like 'Office 123/Office 154/Office 191'. I want to use the slash to split each cell into multiple records that duplicate the other attribute data from the parent record (e.g. lat/long). I need to do this because I'm trying to join another dataset by FacilityName.