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

learn more… | top users | synonyms

2
votes
0answers
238 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
58 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
167 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
678 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
623 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
11 views

Trouble importing qgis.core python module

I am having issues loading the qgis Python modules in the osgeo4w shell. Ultimately I want to work with the modules in pyscripter. I tried the solution mentioned in Problem with import qgis.core when ...
1
vote
0answers
11 views

python-mapscript on OSX Yosemite

I am keen to try out the mapserver export plugin from QGIS 2.6 This needs python-mapscript which comes from the mapserver package. This can be downloaded from ...
1
vote
0answers
19 views

Raster Vector stack

I want clipped image of NDVI for a particular area. I did raster calculation for getting the image with NDVI values. After that I tried extraction function clipper. In this function we have to use two ...
1
vote
0answers
23 views

QGIS 2.6 SAGA Processing Algorithm, “Add grid values to shapes”, produces NULL Values

I'm using QGIS 2.6 Brighton on Windows with SAGA 2.0.8 installed using OSGeo4W. I have the same versions installed on OSX as well which is not having this problem. On Windows, I'm trying to extract ...
1
vote
0answers
34 views

How to set time field when generating a GPX track with Python OGR?

I want to generate a GPX file with Python OGR. In particular I want to generate a tracks (layer of features of OGR type wkbMultiLineString) My script is below. I get the error ERROR 1: No such field: ...
1
vote
0answers
26 views

How do I compute uncertainties in the positions transformed using Helmert transformation?

I am familiar with Python, MATLAB and Mathematica. My data is given by Cartesian coordinates (positions in X,Y,Z (meters), standard deviations XX, YY, ZZ (meters) and a correlation matrix (XY, YZ, ...
1
vote
0answers
32 views

Pan Sharpening Quickbird Images in Python

I'm attempting to pan sharpen four band images in python with a higher resolution panchromatic band image. I have imported them using gdal and converted them to numpy arrays for the purpose of ...
1
vote
0answers
53 views

Updating attribute table from an Excel file using Python

I am kinda new to Python, please excuse for such a trivial questions. There is a shapefile (let's call it Materials.shp). I have an attribute table with different fields (for example, windows, doors, ...
1
vote
0answers
31 views

Embedding python to select feature in QGIS action

I am working from QGIS actions with python and want go to select the current feature that I've identified using the identify tool. (Key point is that there is a difference between identify and ...
1
vote
0answers
31 views

WindowsError: [Error 32] The process cannot access the file because it is being used by another process

I am reading images (through Python) and do something. These images are placed in a temporary file, through: tf = tempfile.mkdtemp(filename) I use gdal to read the images (short part of code): ... ...
1
vote
0answers
28 views

How to reach the geometry (polygon, polyline) of a dxf in python-ogr module

this might be a basic question, but I am rather new in ogr. I wish to collect all lines from the dxf file and create their boundary. I loaded the layers (ExecuteSQL( "SELECT DISTINCT Layer FROM ...
1
vote
0answers
51 views

Using processing using other output (result from another algorithm) as input

I have a problem. I am developing a standalone app in python and I need to use processing algorithms. I was able to use one algorithm without erros but I need to run other processing algorithm which ...
1
vote
0answers
18 views

Ogr Python API: set null values in feature

Im trying to convert OGR geodata from one driver to another, like the command line tool ogr2ogr do, but using the python API. My problem is, that the NULL values in the input data are converted as ...
1
vote
0answers
34 views

Longest Common Subsequence for trajectory matching in Python

Is there any fast implementation of the Longest Common Subsequence algorithm for trajectory matching in Python? Ideally it would work with trajectories of different length in 2d spaces.
1
vote
0answers
53 views

Overwriting layers in a geodatabase maintaining its position in a feature class list

I'm working with ArcGIS 10. I work on ecological habitat mapping. I have some features classes inside a geodatabase which represent years of data on a specific area. Each has a reliability field with ...
1
vote
0answers
103 views

Connect to QGIS 2.6 Python Plugin function via button on custom feature form

I am trying to connect to a QGIS 2.6 Python plugin function via a custom feature form button. On my feature form, I'm attempting to do a few things : enable the updateButton only if the ...
1
vote
0answers
29 views

Difficulty with python package mgrs by Howard Butler

I am developing an app in python and I am trying to import Howard Butler's mgrs package. I am using setuptools to install the package. It does not find the setuptools library module. I have tried ...
1
vote
0answers
55 views

Create polygons enclosing same number of points on PostGIS

I have a geodatabase on Postgis with points representing customers, what i need is give a number of customers, lets say 100 and it need to generate polygons enclosing 100 clients each one. I only ...
1
vote
0answers
18 views

How to set -srcwin with python gdalbinding and driver.createcopy

I am using gdal_translate currently to cut a 60000x60000 geotiff into smaller 1000x1000 geotiff files. This works but it takes about 24 hours(and I have 44 of those big images to compute). Im not ...
1
vote
0answers
39 views

Python loop doesnt work properly for hundreds of Raster files (HDF)!

For generating Time Series, I prepared a python script which are supposed to get all task done through looping. Interestingly, It stops working after 12 HDF file but I need to do loop through all ...
1
vote
0answers
44 views

Open a NetCDF file with multiple time step on QGIS (using Python console)

How to load a NetCDF-file into QGIS using Python? explains well how to load a NetCDF with PyQgis. However, it did not help me to choose among all the available time steps. Is there a way to import a ...
1
vote
0answers
28 views

Modify a Python script to one that uses RasterDomain_3d fuctionality - and writes resulting shapefiles it to one

As I am not very experienced with Python I need your help. I managed to modify a Script (that has been posted here Get boundary of raster image as polygon in ArcGIS Desktop? by ...
1
vote
0answers
33 views

Why when I use the ReadAsArray() Shell restart in this code?

I want to read the .pix file in the 3 different Array in python and I use this program but when I run that nothing do And shell be restart and program closed . from scipy import ndimage import ...
1
vote
0answers
44 views

How to change values in a raster file at particular positions?

I have a collection of coordinates which comes from a QGSGeometry object. The shape is a polygon. example: qgsGeometry [[(75.2172,17.6566), (75.8499,17.9613), (75.5218,17.2113), (75.2172,17.4574), ...
1
vote
0answers
19 views

how to export multiple layers in single click to other folder

i have more then 100 layers which need to exported to another folder for further analysis is there any way i can do that in a single click. I tried to use package map but it says georeferencing ...
1
vote
0answers
65 views

Geoprocessing Service on ArcGIS Server to Export File

ArcGIS Server / Geoprocessing Question I have a geoprocessing service that will perform a selection on a layer based on a provided expression. I would like to output the result as a csv file (or ...
1
vote
0answers
53 views

Python script split up

I have a python script which works with Grass 6.4. At some point during the project I decided to split this big python script into several scripts. I have made all necessary variables global, created ...
1
vote
0answers
34 views

How to create a boundary vector of objects after using watershed_segmentation python

I used watershed segmentation in opencv-python to separate object. However, after segmentation I don't know how to create boundary polygons of objects (red rounded in the image attached). Thanks ...
1
vote
0answers
47 views

mark points on shapefile using python

I want to mark specific lat long coordinates on a shapefile using python. I am trying to use the plot function from matplotlib to do it. In the examples that have been provided, a basemap object needs ...
1
vote
0answers
79 views

library for minimum bounding box “by width” in javascript or python

I'm looking for a library (or at least a code snippet) to calculate the minimum bounding box "by width" in javascript or python. Below is an illustration from the ArcGIS documentation of that ...
1
vote
0answers
52 views

Unable to call GDAL functionalities from Python

I am trying to call GDAL functionalities from the following script I made in the past. import os, fnmatch from subprocess import call call("dir", shell=True) # define the variables inFolder= ...
1
vote
0answers
72 views

Extract layer by attribute and export to new shapefile using arcgis scripting 9.3

I have a n-number of shape files based on attribute i want to extract the layer to export to new shape file, Using feature class to feature class conversion i can do, but i want to check for specific ...
1
vote
0answers
64 views

multiprocessing and the ArcGIS in_memory workspace

I am trying a script that makes use of multiprocessing and a number of tools within arcpy. The script works only if I write all input, intermediate, and output from child multiprocessing executions to ...
1
vote
0answers
40 views

I can't get fiona to write while copying shapefile

I am trying to debug a function and have narrowed down the issue to a problem with my attempt to use fiona write. After going through the many online resources, I can't seem to find my problem, ...
1
vote
0answers
18 views

How to update the items of qCombox in custom form?

For my project I use a custom form with multiple value relation comboboxes. This works quite fine and I can access the widgets via my script. Init the two comboboxes which are correctly filled ...
1
vote
0answers
23 views

Python problem during CADInput installation

I was trying to install CADInput (version 0.60) on 2.4 Chugiak and 2.6 Brighton as well. In both cases I got an eror message during installation. For me the following extract of that message might ...
1
vote
0answers
86 views

Generate random points in polygon. Algorithm question

i created a Random Point Generator in python using the algorithm described here by @whuber. The algorithm is implemented using Shapely, PostGIS and psycopg2. To boost performance pythons ...
1
vote
0answers
72 views

Splitting Line.shp at Point.shp with Python/ogr

I'm trying to modify some ESRI Shapefiles using Python with gdal/ogr module. What I want to do is quite simple, but I didn't find any solution by now. I have two shapefiles: (1) Lines.shp and (2) ...
1
vote
0answers
123 views

With QGIS, why use QT Designer tools for creating Slots/Signals/ etc, if plugin coding can do it alone

I am curious why there is facility within QT Designer to create signals and slots as, to my surprise, I did not need to do this. All of the necessary coding was accomplished completely within the ...
1
vote
0answers
53 views

Python Band.SetNoDataValue(), sets all bands at once

Can someone tell me what I am doing wrong? I want to set bands 1 and three to 255, and band 2 to 0. The code below only should only set band 2, but gdalinfo shows that all bands get set to 0. Ubuntu ...
1
vote
0answers
36 views

How to find QGIS or QT or Python object definitions

I am attempting a simple plugin, on QGIS 2.6, using the available QT Designer installed I have successfully loaded a plugin, and can display a dialog box with widgets, within, and now attacking ...
1
vote
0answers
58 views

Fiona write crashes

I am trying to write a new shapefile with fiona but after creating the features, i keep getting this output after the program crashes: The program '[6668] python.exe' has exited with code -1073741819 ...
1
vote
0answers
160 views

Link QGIS to Anaconda Python Distribution: Spyder, iPython Notebook, pip, scikit-learn

I have Anaconda as my primary Python distro, and want to route Python related QGIS scripts through it. With Anaconda, I have Spyder, can easily install packages with pip, and can launch a iPython ...
1
vote
0answers
27 views

How do I make arcpy exclude frozen / off layers while importing a DWG file?

I'm attempting to update existing GIS feature classes (SDE) using master AutoCAD files but end up importing ALL features present in the AutoCAD drawing regardless of the visibility settings (frozen / ...
1
vote
0answers
246 views

py2exe ImportError: No module named _err

The .exe file generated with py2exe returns the following error: c:\Users\...\dist>ShapeFileConverter.exe Traceback (most recent call last): File "ShapeFileConverter.py", line 4, in ...