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

learn more… | top users | synonyms

2
votes
0answers
107 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
110 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
148 views

How to convert a raster (array) to a NetworkX graph and do a * search?

I want to use a slope-raster for a a_star path analysis in NetworkX. I am using Python for this project. My test raster looks like this First I read in the raster with GDAL input_raster = ...
2
votes
0answers
169 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
84 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
143 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
118 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
54 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
159 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
103 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
198 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
84 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
120 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
54 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
266 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
324 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
98 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
84 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
127 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
288 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
240 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
148 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
808 views

gdal ImportError in python on Windows

Trying to import gdal for Python 2.7.3 on Windows XP: >>> import gdal Traceback (most recent call last): File "<stdin>", line 1, in <module> File ...
2
votes
0answers
149 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
160 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
55 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
95 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
307 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
159 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" ...
2
votes
0answers
59 views

How do I make a path cross the most possible classes in a raster?

I want to create a function and possibly use Arcmap tools to create something similar to Cost Path. Instead of just choosing the LCP, it must cross through the most different integers. Let's say I ...
2
votes
0answers
144 views

Why would an ArcGIS 10 Python custom tool fail without throwing a “failed to execute” or “completed script” message at the end?

I have written a custom tool in Python for ArcGIS that converts in batch SHP files to GML files. It processes one file at a time in a folder, file, or ZIP file and then moves on to the next. If the ...
2
votes
0answers
386 views

Add CAD Drawing Dataset into ArcMap using Python

I am trying to add an CAD Drawing Dataset into ArcMap using Python. Question is how to add a Auto-CAD .dwg file to ArcMap using Python Normally comes in as CAD file within a Group layer with: ...
2
votes
0answers
132 views

Setting border-style to 'no pen' using QgsGraduatedSymbolRendererV2

I am developing a QGIS plugin that, after a series of inputs, will produce a thematic map using the QgsGraduatedSymbolRendererV2. Because the polygon are very small, the boarders make it such that ...
2
votes
0answers
156 views

Are there Plugin Compatibility Issues between QGIS 1.6.0 and 1.7.4?

I've been working on a QGIS plugin on Quantum GIS 1.6.0 Copiapo with Python 2.5 that calculates additional values for eachf feature of a vector layer and adds them to the .dbf. We've just upgraded to ...
2
votes
0answers
209 views

Recalculate Quantile Breakpoints in CalculateField_management loop?

I have a program that iteratively replaces a temp field where I choose a certain symbology (color ramp and quantile color break methodology) with a few other fields from a join. The program works in ...
2
votes
0answers
55 views

Tiled image transforming to new profile

i have a set of tile which was tiled profile of mercator and proper to tms scheme mechanism. unfortunately i dont have any tif or georeference table or anything for this. all was tiled with mercator ...
2
votes
0answers
158 views

Is there any way to suppress the calculate field dialog box in arcpy script?

I've got a python script that I inherited. The python script takes input from a variety of feature classes and tables and spit it out to a single table. When I run this script via a scheduling ...
2
votes
0answers
135 views

How to change the QGIS help dialog?

I am working with python plugins for QGIS. I am done with my one of my .py file using python 2.5 and pyqt4. It is just help file for QGIS, which i changed. I wanted to incorporate the same in QGIS. I ...
2
votes
0answers
132 views

Create Data Frame or Group Layer

I am attempting to write some Python code which creates a blank data frame or group layer which can then be populated with other layers. I'm at a loss as to how to do this since I'm somewhat new to ...
2
votes
0answers
493 views

Perfectly running python script gives error when run from web.py

I have the following python script which runs perfectly if run separately: import arcpy val = arcpy.GetCellValue_management("D:\dem-merged\lidar_wsg84", "-95.090174910630012 29.973962146120652", ...
2
votes
0answers
544 views

Spatial Analyst Cell Statistics seems to give the wrong answer in ArcGIS 10.0

I have a script that calculates standard deviation for a list of grids using the Cell Statistics function in Spatial Analyst for ArcGIS 10.0 The syntax is this: stdevGrid = ...
1
vote
0answers
22 views

Python query to find records with more than one alpha character in a field

Using ArcGIS Desktop 10.2. I have a field in a table of several thousand records. The field is made up of alphanumeric characters. I'd like to perform two queries using python on this field: ...
1
vote
0answers
21 views

Automating polygon mergers with python

This is the first real world python program am trying to write. I am trying to create a scrip that takes a shapefile that has n polygons with an integer formatted date (e.g. yyyymmdd or 6/24/2014 is ...
1
vote
0answers
18 views

Python error message after download (QGIS 1.8.0/ Windows 7)

Hello to all members of the forum, I downloaded from the OSM website a small area in the neighborhood of Strasbourg, France: X (longitude): 7.6808 7.8216 Y (latitude): 48.5075 48.52 I got the two ...
1
vote
0answers
19 views

ExtractByMask with one mask and multiple layers ArcMap

I have a multiple cost distance rasters and multiple feature layers. I need to find and join the feature layers (or associated shapefiles) that lie within a threshold of costs on the cost rasters. For ...
1
vote
0answers
51 views

Using qgis modules in standalone application with PySide?

I want to make small standalone application using PySide and QGIS python modules to display satellite images and do standard GIS operations, like creating new shape file and placing polygons or points ...
1
vote
0answers
26 views

Disable customized context menu for some cases using python

I create a python add-in tool to add new item to the context menu, but I want the new item enabled only when user right click on map when within a buffer of polyline feature. I haven't figure out how ...
1
vote
0answers
25 views

How to export the legend (Layers Panel) as an image in QGIS using the Python console?

I want to export the Legend (the Layers Panel) as an image using the python console.