Python is an open source interpreted programming language used in many GIS programs.

learn more… | top users | synonyms

1
vote
0answers
216 views

Reclassify ESRI raster using variables from a SQL Server table (connecting with pyodbc)

I am trying to reclass a raster file (representing vegetation and land cover types) using values stored in a SQL Server Express table. I have a set of ~400 species records in the table, with each row ...
1
vote
0answers
174 views

produce images with shapefiles and OpenStreetMap

I have a python file http://pastebin.com/jzwE6c6P which iterates over the features of a shapefile and renders a simple image by zooming to the bounding box of each feature. What I need is ...
1
vote
0answers
223 views

Geographic limit to overlay analysis in geoprocessing service

Function: I've created a geoprocessing service that serves a toolbox containing a custom python tool. This python tool selects a polygon and buffers it by 1 mile. This buffer is then used to ...
1
vote
0answers
692 views

Variable stored as NoneType in Python with updateCursor

SOLVED: although the field was not nullable (no null values), a glitch created one in the heading field, so the variable was stored as a null value and thus the NoneType. I am using updateCursor to ...
1
vote
0answers
446 views

how to create shape file table from text file in QGis python

I have a text file with all field information how can create new polygon shape file table with the text file.. text file having following content.. NAME LAYER GM_TYPE KML_FOLDER ID PERIMETER ...
1
vote
0answers
124 views

refactoring an XSLT processor with minor changes

having an extremely large xml-file - which is derived from the field of geo informatics. i got it from a German subsite or the OpenStreetMap-Project: the Geograpical-Engineering-site that deilvers a ...
1
vote
0answers
181 views

Polygon symmetry detection

I was wondering if there was any way to create main axis (axis of symmetry) lines for polygons. I have polygons that represents buildings. I will want to find main axes (axis of symmetry) for those ...
1
vote
0answers
196 views

ArcGIS 10.0 - How to have GP Service make rest calls instead of Silverlight client?

I have a Silverlight client that densifies a user drawn polyline. The returned vertices from the polyline are then sent to esri elevation sample server for each vertex to find an elevation value. ...
1
vote
0answers
527 views

How do you convert a bounding box into the canvas CRS?

I need to convert the pixel coordinates of a bounding box to the same CRS being used by an existing layer. Here's the relevant code so far: # First, get the layer-coords version of the bounding box: ...
1
vote
0answers
164 views

Is Django's LayerMapping capable of putting a static value into all features?

I'm using GeoDjango's LayerMapping utility to try and import a set of features. The catch is that aside from the attributes in the source layer, I want all the destination features to have the same ...
1
vote
0answers
600 views

Access Geoprocessing results in Flex Viewer (Enhanced) Search Widget

I have Robert Scheitlin's Enhanced Search Widget up and running successfully with my MapService using ArcGIS Server and Flex Viewer 2.3. I also have a geoprocessing service that returns a point layer ...
1
vote
0answers
104 views

Copied points not intersecting the original points

I'm using an arcpy search cursor to access a Oracle database. I have a simple Python class that I copy the returned row objects into, which gives me more flexiblity than the cursor. The problem is ...
1
vote
0answers
260 views

arcgis server 10, vb.net, non pooled service, web adf

i am running arcgis server 10. i created a A.MXD file, then started arcgis server and successfully added non-pooled service using A.MXD. i also installed visual web developer 2010 express and created ...
1
vote
0answers
269 views

Validate Python Fme

i have a problem with my script for convert GDB to Excel. if s=='xls': reader=FMEReader("GEODATABASE_FILE") reader.open(param_filename_gdb) writerXls= FMEWriter("XLS_ADO") ...
1
vote
0answers
283 views

getting the correct location data with user input

I have some code others have provided, which I modified in order to run a Python script in a toolbox in ArcMap which accepts user input for a starting point, distance, and angle to create a shapefile ...
0
votes
0answers
43 views

How to read shapefile faster using python basemap (and pickle)?

I am trying to plot a simple 'merc' map with boundary from shape file. The total size of the shape file ne_10m_admin_0_countries_lakes.shp is just 8mb. The simple mslp surface plot from GFS data took ...
0
votes
0answers
37 views

Convert WGS84 coordinates to ECEF Cartasian (XYZ) coordinates using pyproj

I need to convert WGS84 to ECEF to map some points to a 3D sphere. I've trawled through the pyproj docs, but can't find specifics on the matter. Basically I want to input the WGS84 GPS lon/lat ...
0
votes
0answers
26 views

(python) distance between a point and a list of segments

I have a line (made of multiple adjacent segments) and a set of points, and I want to find all the points which are within a given distance (40m mainly but could change) from that line. segments ...
0
votes
0answers
42 views

Adding a Field to a Feature Class using Python

I'm trying to create a script that adds an integer field to a File GDB, calculates it, buffers it, then clips it to a different GDB featureclass. Can anyone help me, I'm stuck so far!? I'll provide my ...
0
votes
0answers
32 views

Python GPS Observation Equations

I've been trying to write some code that will take pseudo-ranges and satellite positions and then compute the observer's position. I've been trying to follow through this book, but the crucial stage ...
0
votes
0answers
25 views

First time rasterio error

First of all, I am new to python and rasterio. I am trying to open a simple raster with 5 bands using the rasterio module in python. This is what I am trying to achieve: import rasterio with ...
0
votes
0answers
5 views

Converting branched multiline into series of single lines in shapely

If I have a multiline string representing a branched network with a common starting point (red network in pic below): Does anyone know how to convert this to a set of individual single linestrings ...
0
votes
0answers
25 views

Using shapely and geopandas in pyspark

I'm new to geospatial analysis and trying to start the analysis using python. Since the data is too huge we are trying to make use of hadoop and spark to get the analysis done. I would like to use ...
0
votes
0answers
15 views

Specifying column to use in gdal_translate

I am using gdal_translate to convert a tiff file to ascii. The tiff file is a raster with several columns in the attribute table. How do I specify to gdal_translate, which column to use for creating ...
0
votes
0answers
36 views

How to “INSERT” geotiff raster into postgresql/postgis table using psycopg2

Can someone walk me through how to insert a raster into a prebuilt postgresql table? The table has the postgis extension and I've been able to manually insert a geotiff using raster2pgsql, but I would ...
0
votes
0answers
15 views

Processing toolbox on Google Cloud compute engine

I used to utilize the QGIS python console to do GIS batch operations on my local machine. Computation times are rapidly increasing and I'm switching to a virtual machine solution in the cloud. How ...
0
votes
0answers
30 views

Using ReportLab with Arcpy

I am having some issues creating a geoprocessing service within arcmap using reportlabs pdf toolkit. The script runs fine outside of arcmap, however when i try and run it in arcmap to publish as a ...
0
votes
0answers
25 views

How to run a function in a while loop while an QObject is activated/triggered in PyQgis

Firstly I am new to PyQgis and there might me a lot of basic errors. The aim is that everytime a new vector object is drawn its attribute should automatically update while a QAction I have created ...
0
votes
0answers
22 views

ApplySymbologyFromLayer does not work in my python code

I have a layer file. I make a button in ArcGIS 10 with .NET. I want to change layer symbology with the layer file. For this purpose, I write python code and execute it from C#. If the following code ...
0
votes
0answers
15 views

Kartograph syntax for json files

I googled everywhere but i didn't find how to correctly write *.json files for kartograph.py. Is there any documentation or at least some useful examples or tutorials? I wonder where to find shp files ...
0
votes
0answers
47 views

Cannot Edit Python Script from ArcMap/ArcCatalog

I am unable to edit scripts in ArcMap or ArcCatalog. I navigate to the script, right-click on it and select "Edit", then nothing happens. I am using notepad++ as my editor (set in geoprocessing ...
0
votes
0answers
39 views

arcgisscripting.ExecuteError: ERROR 001270: Consolidating the data failed

I am working on PuTTY and trying to create service definition file in server. My Python script is creating .sddraft but I am receiving 'Consolidating the data failed' error when I run stage service ...
0
votes
0answers
31 views

pgsql2shp result as shapefile

In addition to pgsql2shp command join error, the next command line works fine in order to join a table to a shapefile but the result is a dbf table and not a shapefile as I want. I see that exists a ...
0
votes
0answers
42 views

Avoid time out error Nominatim Geopy Open Street Maps

How to avoid the "GeocoderTimedOut('Service timed out')" error in geopy using the osm nominatim geocoder? I am not interested in using an exception and skip some entries. I already use a time delay of ...
0
votes
0answers
30 views

Accessing Geoserver plugins through the REST API

I am writing Python scripts to automate the creation of Geoserver layers. For this the gsconfig module has been invaluable, but I often need to execute operations that are handled by plugins, most ...
0
votes
0answers
31 views

ArcPy FeatureCompare vs. FileCmp

I have a huge number of shape files that I receive on a recurring basis. I want to be able to compare the new version to the current version, and then only update the db with those that are different. ...
0
votes
0answers
43 views

Call qgis function from R?

Is there a package to call QGIS functions directly from R? Is rPython the best alternative?
0
votes
0answers
53 views

How to combine owslib->WebFeatureService with urllib2->ProxyHandler in Python?

In Python 2.7, I try to do a WFS request from behind an authenticated proxy server (proxy requiring username/password). I managed to communicate to a webserver via the authenticated proxy using a ...
0
votes
0answers
44 views

Number of polygons in shapefile too high

I downloaded administrative shapefiles from www.gadm.com/country (China). The Python (Basemap) code below tells me that there are 2365 polygons in it. However the .csv and .dbf files included with the ...
0
votes
0answers
40 views

Using peewee ORM with spatialite databases?

I would like to use the peewee orm in front of some Spatialite databases. Getting peewee to connect to a Spatialite database was relatively simple, and basically boiled down to: class ...
0
votes
0answers
13 views

need to clip multiple USGS quadrangles in Geotiff format to statewide index in polygon format

I need to trim the collars off of many USGS 7.5 minute quadrangles for a state. I have the quads as GeoTiffs and have the polygon boundary for the whole state. I think there are about 1446 ...
0
votes
0answers
64 views

New to Python and going through GIS Tutorial for Python Scripting

I'm following the Tutorial directions and I've tried some alternative approaches but PyScripter keeps coming back with the exception message: Process did not complete. try: #Import Python ...
0
votes
0answers
89 views

using arcpy.UploadServiceDefinition_server to publish to portal

I'm using arcpy.UploadServiceDefinition_server() to publish SD files to a server that is federated with portal. Using this ESRI Documentaion I am able to publish the service to a specific folder on ...
0
votes
0answers
34 views

Error when using Natural_Breaks from PySAL

I am trying to reclassify a raster using Natural Breaks using PySAL, because this method is not implemented in ArcPy. I have checked this questions: Classification to attribute PySAL natural breaks ...
0
votes
0answers
28 views

Collector Python data editing

So just to start off with... I have a horrible rudimentary level of Python, so if someone plans on dropping code as an example, I will definitely have trouble following it. Apologizes abound... I do ...
0
votes
0answers
42 views

QGIS 2.8/.10/…crashes when I run, into PyQGis Console, a script within “exit command” of any GUI designed with the same pyQgis script code…Why?

I use QGis 2.8 or 2.10. I open Console PyQGis, so I can write Python specific code that I can design any GUI, as a simple Window Form. After I wrote this code I run this script created and it's ok ...
0
votes
0answers
35 views

gdal2tiles_parallel seems to be signiciantly slowing down for super high-res images

I have 3 images that I've been trying to 'tileize' 1 86,000*41,000 2 86,000*21,000 both are simple .pngs I've been using the parallel version of gdal2tiles on a DigitalOcean box with 20cores and ...
0
votes
0answers
15 views

ArcGIS AddIn to load qgis symbology

I'm looking to make an add-in for Arc so that I can load symbology created in QGIS. I'm familiar with Arc and the way symbology works in it, but I'm unsure what the best way to tackle QGIS symbology ...
0
votes
0answers
38 views

Using gdal in ironpython

I would like to replicate the following two statements GDAL python has: # project the decimal degrees to Mercator: gdalwarp -s_srs EPSG:4326 -t_srs EPSG:32631 -r cubic original.asc ...
0
votes
0answers
68 views

Cannot read TIFF files produced by ArcGIS in Python

I'm trying to use (1) PyLibTiff package maintained by Pearu Peterson & Joe Jordan and (2) module tifffile.py developed by Christoph Gohlke to read and write TIFF files in Python. I know GDAL can ...