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

learn more… | top users | synonyms

2
votes
0answers
63 views

Can't remove the little islands when creating a svg map with kartograph.py

I'm new to python and to kartograph. I'm using it to create a map of France, Italy, Portugal and Spain. But I don't want the little islands (mainly the French ones ), causing the generation of a big ...
2
votes
0answers
106 views

ArcGIS10.2 crash opening python window

I was trying to test the data management commends in python, yet arcgis crash every time I I try to open to python window. According this post, it is the python version issue. I do have other versions ...
2
votes
0answers
34 views

Compare line with next line in attribute table shapefile

I am making a python code for ArcGis 9.3. The aim is to compare the value of my field "ID_BV" at line l with value of field "ID_BV" at line l+ 1. And depending of the test answer i populate another ...
2
votes
0answers
81 views

How to detect broken hyperlinks with arcpy?

I have zero experience with python but am trying to search for broken hyperlinks in a large gdb (temporarily converted to a shapefile)- Used code from a previous question (Hyperlink broken path - ...
2
votes
0answers
63 views

Identify different networks inside a line shapefile

I'm dealing with a quite big line shapefile containing road tracks. The roads are connected to each other, creating distinct networks. These networks are independent and they are not connected to each ...
2
votes
0answers
50 views

QGIS: rotatable markers with offset from point

Im wondering, if its possible (in QGIS), to set a rotatable marker with offset from point, like in my example below. Any suggestion?
2
votes
0answers
95 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
100 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
79 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
117 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
69 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
37 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
40 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
171 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
50 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
0answers
291 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
137 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
260 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
163 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
204 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
120 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
127 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
229 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
93 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
149 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
128 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
0answers
55 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
0answers
177 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
106 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
215 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
88 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
126 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
56 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
288 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
351 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
104 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
0answers
87 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
0answers
139 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
313 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
252 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, ...
2
votes
0answers
68 views

Arcpy: Counting number of segments where altitude rises or decreases based on DEM?

I have a DEM of Sudety mountains and linear .shp with several hiking paths. I'm trying solve one problem: How to make a script based on input DEM and input line shapes that would count number of ...
2
votes
0answers
168 views

problem in read_shp() to generate a networkx.DiGraph from point and line shapefiles

I tried to use the Python module networkx and specifically the read-shp () to ensure the transformation of a graph to a file sharpe but I always find this error noting that this is the first time I ...
2
votes
0answers
168 views

projection discrepancy with gdal (1.9) and proj4

I boiled the problem down to that python example: import sys try: from osgeo import gdal from osgeo import osr except: import gdal import osr if __name__ == '__main__': version_num = ...
2
votes
0answers
166 views

Localized Linear Histogram Match using python

I would like to use the local linear histogram match for filling the missing pixels of a Landsat 7 image with another older image (SLC Gap-Filled Products). Do you have any idea how can I do it by ...
2
votes
0answers
71 views

Removing FID as an option from ArcGIS Tool Validation Parameters

I am currently building a script tool which requires the user to select a sorting field from a list (built using a dependency on the featureclass). This Element is working fine, but I would like to ...
2
votes
0answers
56 views

Is there a way to distinguish between digitized and pasted features?

Is there a way to tell if an added feature in QGIS is in fact a newly digitized one or a pasted feature? I think QGIS is treating both cases in the same way, emitting the same signal: ...
2
votes
0answers
103 views

Convert geojson labels MBR to MapInfo text object

Im using Dymo (https://github.com/migurski/Dymo/) to generate automatic point labels placement. The output of Dymo is a geojson containing MBRs of the positioned labels with the names of the labels in ...
2
votes
0answers
330 views

How to access mysql data from python built-in console?

I'm writing a QGIS Plugin, and somewhere I want to present data from a MySQL database. It's simple data(strings,etc), not Geospatial, or vector data. I'm familiar with querying databases from python ...
2
votes
0answers
59 views

How to call a method when self.iface.actionSelectRectangle().trigger() is released?

In my QGIS python plugin I use "self.iface.actionSelectRectangle().trigger()" to select features. I also have a button which changes the attributes of the selected features. Is there a way instead ...
2
votes
0answers
165 views

qgis and embedded ajax (bing map)

I need to load in a docked QWebView this html: < html > < body > < iframe width="100%" height="499" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" ...