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

learn more… | top users | synonyms

2
votes
0answers
110 views

How can i add a north arrow in QgsComposition?

I'm trying to add an svg image of north arrow in QgsComposition using this code: mapRenderer = iface.mapCanvas().mapRenderer() theComposition = QgsComposition(mapRenderer) ...
2
votes
0answers
106 views

How to display images as cross sections in 3d

I want to display a base map and several vertical cross sections in 3D. The base map image is easy to rectify as a geotiff. How can I also display the cross sections? The cross sections are at ...
2
votes
0answers
45 views

Using the geocode function with cursors

How do I use a cursor with a geocodeaddress function? I want to be able to: 1) read from a table 2) only geocode addresses(from table1) whose street number is not 0 using a cursor 3) then update a ...
2
votes
0answers
87 views

python equivalent of spatstat's spatial point process functions

Is there a free python package (i.e. PySAL?) that implements the standard summary statistics for spatial point processes, e.g. the F, G, J, and K functions? I'm happy to use R (i.e. spatstat) if ...
2
votes
0answers
164 views

Zonal Statistics using Gdal and Python

I recently came across a loop_zonal_stats function by @ustroetz found here: Issue Trying to create Zonal Statistics using Gdal and Python.. I am using a (single) polygon shapefile and a raster file to ...
2
votes
0answers
88 views

Calculate size of area where data values exceed certain limit

I am using Python and Basemap to plot sea ice concentration within the Arctic region. I need to calculate the total area (square meters) where the sea ice concentration exceeds a certain limit (e.g. ...
2
votes
0answers
39 views

How to Complete ModelBuilder Process Quicker?

I've built a script tool in ArcGIS's ModelBuilder to collect parameters from the user and use them as arguments for another python script. The output of this script is a text file. The only GIS ...
2
votes
0answers
43 views

Extract MultiValuesToPoints yields identical value for each band

I'm attempting to extract hyperspectral remote sensing data to a point featureclass using the ExtractMultiValuesToPoints ArcGIS tool. The value of each band (228 bands) should be appended as a field ...
2
votes
0answers
217 views

What causes Scripting Error 000714 in ArcGIS when using GetParametersAsText?

I am trying to create a script tool in ArcGIS 10.2 in order to incorporate into a model. The script needs to incorporate three inputs which i've built using GetParameterAsText function then setting up ...
2
votes
0answers
240 views

Folium GeoJSON Overlay Not Appearing

I am in the midst of a task which involves the clustering of assessment neighborhoods into larger neighborhoods (data link). The goal is build these neighborhoods in a manner consistent with major ...
2
votes
0answers
144 views

QGIS: How to reverse vertex ordering in polygons

I am working with an Oracle spatial connection in QGIS through which I am accessing and editing a vector layer. I find that when I edit a geometry, the vertex ordering is reversed (to clockwise in the ...
2
votes
0answers
53 views

Distribute QGis plugin which depends on certain Python packages

I developed a plugin for Qgis which depends on some Python packages. On Linux and Mac, this is not really a problem because I can easily install them with the system pip command. Windows is another ...
2
votes
1answer
179 views

How to use SAGA ShapesToGrid via Processing in a Python plugin?

I run these lines in my code: vectorlayer_vector = ftools_utils.getVectorLayerByName(inputLayer) Elevation = self.lineAttrib.currentText() cellSize = int(self.linePix.value()) outPath = ...
2
votes
0answers
360 views

How To Export Selected Data Driven Pages to PDF?

I have a map book with data driven pages that shows the fire boundaries, roads, etc for our fire rescue department. I want to automate the process of creating individual mini map books for each fire ...
2
votes
0answers
149 views

Generate tiles using GPU

I was wondering if anyone has tried already to utilise the GPU in tile generation? I have a quite big dataset so tile generation takes a while (especially on high zoom levels) even on a quite high ...
2
votes
0answers
329 views

Is there a way to execute FME transformers from a PythonCaller script in an FME workspace?

I have a very large and complex Python/arcpy script that does lots of custom calculations, and I am trying to port it to an FME environemnt. The script runs beautifully under ArcGIS. The problem in ...
2
votes
0answers
186 views

How can I create random concave polygons for test purposes?

In the context of generating random test data using QGIS (in a shapefile): I can generate random, continuous (adjacent) polygons by first creating n random points using ftools and then generating a ...
2
votes
0answers
248 views

Finding coordinates from a nested grid as a numpy array

So this is a pretty basic question, but I'm trying to figure it out. I've written a script that allows a user to read in a raster and provide a cell resolution, and outputs the amount of cells ...
2
votes
0answers
147 views

Why is GDALPolygonize so much slower than ArcGIS Raster to Polygon?

I am attempting to polygonize a raster using GDALPolygonize() in a Python script. The script began polygonizing yesterday at 5pm and is still polygonizing now at 9:30 am. I have no clue how far ...
2
votes
0answers
143 views

python.multiprocessing and “FATAL ERROR (INFADI) MISSING DIRECTORY”

I have a question which is closely related to this old question here: python.multiprocessing and "FATAL ERROR (INFADI) MISSING DIRECTORY" I have also looked at this, which seems to relate ...
2
votes
0answers
249 views

Buffering a Raster with GDAL and Numpy

I am using GDAL to convert a raster dataset into a numpy.array and then using numpy to buffer the data in the raster. For example, I need to know all the regions within 100ft of a school point ...
2
votes
0answers
107 views

Python scaling issues and possible subprocess conflicts?

I have always found such great analytical and programming expertise on StackExchange in the past that I hope you can help me. Background: I have a project that involves spatially joining and ...
2
votes
0answers
36 views

ArcPy: Distortion towards edges when exporting to TIFF [duplicate]

I am writing a function to zoom to selection (based on a criteria) and Exporting it to TIFF. The problem I am getting is that the when I load the exported TIFF image in Map, I am seeing distortion ...
2
votes
0answers
45 views

Building Arc add-ins without needing to restart Arc [duplicate]

One of the things that annoys me the most with trying to use the Arc add-in wizard is that I need to restart Arc every time I want to test something. This is especially annoying if I've got syntax ...
2
votes
0answers
161 views

Python Script within ArcMap running GME Command passes a double forward slash when writing the log file

I thought I made some serious headway there today. My script works perfectly fine when run from a Python Shell, but in ArcMap, whether the script is run from the Python Command line, or within a ...
2
votes
0answers
73 views

Convert absolute file path to raster databaset [closed]

I wrote a simple python script that outputs an absolute path as string to a GeoTiff file. So this file can be treated as Raster. In a Model, the GeoTiff file is to be the input raster of a CopyRaster ...
2
votes
0answers
143 views

Is it possible to run a search cursor on a multipart feature class?

I have a multipart feature class of cities. I want to run a search cursor on a cities feature class where: one city is selected and a select layer by location is run to select all parcels that are ...
2
votes
1answer
256 views

KML to shape QGIS conversion [duplicate]

I am trying to import a KML file to QGIS. The KML source file is about 15mb is comprised of polygons with attribute data. The KML imports fine and polygons display but the attribute data is unreadable ...
2
votes
1answer
679 views

How to create a QGIS Action which loads a raster?

I am following an article here:Actions HowTo , specifically the piece about an action to load a raster: Python type Add Raster Layer ...
2
votes
0answers
118 views

How to call ArcPy script from Windows Service? [closed]

I'd like to call arcpy script from Windows Service. Here (Calling arcpy/python from .NET?) I read that I can load python script. What do I need to load arcpy script?
2
votes
0answers
60 views

Loading a layer into the same position as an existing layer in QGIS

I understand that it is not possible to directly reload a shapefile layer in QGIS using the reload method in Python, since this method is not implemented for shapefile data providers. Thus, the ...
2
votes
1answer
335 views

Only perform Near analysis on selected rows

I am writing a Python script to perform a near analysis on features from two different shapefiles with common attributes. This is happening in a Search Cursor. However, whenever I tried to use the ...
2
votes
0answers
212 views

PyProj/Proj4 convert geographic to projected coordinates for Geostationary Data

I am trying to convert geographic coordinates (in degrees east/north lon lat) to projected coordinates in meters for geostationary full disc data (GVAR Goes East data from CLASS). To do this, I tried ...
2
votes
0answers
120 views

Adjusting GPS collected data to a polyline shapefile

I am collecting data from a GPS that is attached to a car. When I display this data in a map, the set of collected points are supposed to match with the street shapefile. However what I see in my map ...
2
votes
0answers
244 views

3D features (Polyline, Polygon) intersection library

For my research I am looking for a (python) library to get the intersection of some 3D features. The features can be Polygons or Polylines. Mostly I need to intersect a plane with my features and get ...
2
votes
0answers
32 views

How to include checkbox or radio button in python script for arcgis tool? [duplicate]

I created an arcgis custom tool for converting an excel file to both kml and shapefile . Now I want to include radio button or checkbox to select according user interest for either kml or shapefile.
2
votes
1answer
65 views

how to differentiate between common parts of the triangle and extract linestring from it

Can you help me break down shape A to different linestrings: lines 2 & 3 AND line 1? The shape contains three different polygons (A, B, C). I wish to determine the start/end point of each part ...
2
votes
0answers
90 views

Rounding error in qgis point sampling tool

I'm not sure if this is a bug or of it is due to the implementation. I am using a raster that has values greater than 1,000,000 and Qgis displays these numbers in a scientific notation. For instance, ...
2
votes
0answers
127 views

returning exceptions to user via AGS REST

I've got a python script that I run as a standalone and as a gp service in AGS (moving to 10.1 now...). For the standalone execution, I'm throwing a custom exception if there is no data found based on ...
2
votes
0answers
58 views

Is there any way to symbolize a user-supplied input parameter in ModelBuilder?

I have a model built in ESRI ModelBuilder that is run from its tool dialog, where the user supplies the input feature layer that then gets processed in the model. I need the input feature layer to ...
2
votes
0answers
329 views

ogr.GetDriverByName('FileGDB') returns None

I installed: gdal-110-1600-x64-core.msi GDAL-1.10.0.win-amd64-py2.7.msi gdal-110-1600-x64-filegdb.msi from www.gisinternals.com I can open my gdb on the command line: C:\data>ogrinfo ...
2
votes
0answers
434 views

Use GDAL/Python to add rasters (tiff) to an ESRI File Geodatabase

I'm using GDAL python to create a bunch of tiff files from a netcdf file. def modelout_to_geotif(netcdfile, outdir, VarName): """ Given the path to the netcdf output, produces geotiffs for ...
2
votes
0answers
105 views

traversing KML files with ogr python

i'm new to OGR processing and KML format so be gentle: i've got a series of KML files all containing multiple regions partitioning a larger area in each. i also have a series of geocoded points for ...
2
votes
1answer
328 views

View HTML field data with QT4 browers as a QGIS Run Feature Action Tool

I've successfully populated a sqlite table with an HTML-encoded-table as a field attribute, and so there is literally a Table within a single field value in sqlite, for each record. This is going to ...
2
votes
0answers
92 views

Custom python datasource to QGIS

I'm working on a homebrew spatial feature data format, and using Python to write it's API. It occoured to me that use some tool like QGIS to display my data would be very nice to have, for debug/test ...
2
votes
2answers
181 views

Issue while running grass from subprocess

I have a map based web application using geodjango. I needed to display the crime hotspots within a selected polygon area. I found that v.kernel is very good for generating heatmaps/hotspots. So in my ...
2
votes
3answers
801 views

Python code : Help with using Search Cursor and Messaging the Total Count of Items from Field in Layer that was Searched

My program works but it is not displaying a message of the total sheet count found in attribute table that the search cursor searched through. For Example: It goes through the mxd chosen by user finds ...
2
votes
0answers
143 views

Python script to create a point on a line with attribute data

I have a line feature class with 2 lines (Engineering and Continuous Station series) co-incident on each other. I have created a toolbar(ArcGIS Desktop add-in 10.1) with 3 tools on it, add control ...
2
votes
0answers
338 views

Multiple ring buffer on point-shape error

I need to calculate multiple ring-buffers, but every time I try, arcgis produces a failure: Executing (Multiple Ring Buffer): MultipleRingBuffer Y:\GIS\RDY\clip\sn_clip.shp ...
2
votes
0answers
272 views

Running a new iteration for each column of a dataset in ArcGIS

I'm pretty new to Modelbuilding, having just been turned onto it about a week ago on here. So my problem is, I currently have a dataset of habitats that change through time (from Immature to Mature, ...