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

learn more… | top users | synonyms

2
votes
0answers
185 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
151 views

How can I draw an ellipse filling the dataframe with ArcPy?

I need to modify one of my template scripts to draw a circle from the centre of the (inset) data frame to the edge of the data frame. This will then be used to clip the data frame to shape. I'm using ...
2
votes
0answers
62 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
150 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
493 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
175 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
158 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
242 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
173 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
732 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
636 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
16 views

Action on group of features from layer in QGIS?

I need to implement a rename action on a selected group of features in a certain order. The idea is that I would rename one feature and then select the features that are 'next in line' and execute a ...
1
vote
0answers
20 views

A very small percent of script results come back with “None” instead of Geometry objects?

I have a script that generates a mesh network from vertex and centroid inputs, and it works for almost all my points. But for some records that get created in the feature class for the script, their ...
1
vote
0answers
16 views

How to control QGIS from within Anaconda's Spyder (Continuum Analytics Python distribution) in Windows

I would like to control QGIS from within Anaconda's Spyder, in particular use the QGIS core modules. My config: Windows 7 Anaconda 64x for Python 2.7 Spyder 2.3 Postgresql 9.4 PostGIS 2.1 QGIS 2.8 ...
1
vote
0answers
33 views

RGB satellite image in Python with Basemap

Can anyone recommend a workflow or python library that will let me work with RGB images and BaseMap (or something equivalent - could be CartoPy). I have Landsat 8 images, and can load one in python ...
1
vote
0answers
30 views

How to call QGIS modules (qgis.core) from python idle as I can call arcpy

I was trying to set up path to be able to call qgis modules as it defined in their website Introduction and set PYTHONPATH=c:\qgispath\python . I also try to follow suggestion in link below How to ...
1
vote
0answers
37 views

Running Python outside of QGIS - (ImportError: No module named qgis.core)

I'm trying to run simple scripts on QGIS from outside the QGIS environment - as here How to run a simple python script for QGIS from outside (e.g. Sublime Text)? My code: import sys ...
1
vote
0answers
27 views

Closing QGIS custom form programmatically?

I have a custom form for entering and editing attribute values of a point shape file. I also added a button for deleting the actual feature. Deletion of the feature works fine and then I want to close ...
1
vote
0answers
22 views

Where does GEOS Library gets installed QGis

Working on OS X 10.10, QGis 2.8 I want to install basemap. I installed QGis 2.8 which includes the GEOS and the PROJ4 library. In order to install basemap properly, I need to pinpoint it to the ...
1
vote
0answers
48 views

QGIS 2.6 - installing exifread for photo2shape plugin

I've already seen Error loading plugin photo2shape even after installing exifread module and Error installing Photo2Shape QGIS 2.6 for Mac, and other forums, but can´t make it work. First I installed ...
1
vote
0answers
33 views

Kartograph - converted svg not the same as before

I'm using the following script to convert a map from NaturalEarthData. But the result is very sobering. It seems like something went wrong with the scaling, but I got no errors when executing the ...
1
vote
0answers
18 views

QGIS plugin : connect to polygonselect Maptool signals

Working on a new plugin I am trying to connect a custom function to the mouse right-clic signal while using the polygon selecting maptool. I have activated the maptool through : def run(self): ...
1
vote
0answers
9 views

Finding polygon from two arcs using CLI tools or some library

I'm trying to convert from textual representation into a set of arcs and lines. The 'input' I have is: The area is within lines joining two semicircles with a radius of 0.67 NM centred on: 641139N ...
1
vote
0answers
23 views

Using ST_AsText() without session object

I am storing gps locations as feature in a restfull api. The locations are linked by foreign key to "place" objects in a flask/sqlalchemy/geoalchemy framework. I would like to print a user readable ...
1
vote
0answers
86 views

Calling a GP service from a GP service arcpy.Importtoolbox

I'll try my best not to sound like a lunatic as I explain this. I have a python script that calls an ArcServer geoprocessing service toolbox with arcpy.Importtoolbox. The GP service is on several ...
1
vote
0answers
54 views

How can I extract the measurelength, highmeasure and lowmeasure of routes in ArcGIS

I'm trying to create road Routes in ArcGIS, which traditionally have been created using workstation. I've managed to write a Python script to do this, however, unlike ArcInfo, the attributes ...
1
vote
0answers
34 views

QGIS actions - get currently selected attribute column (with python?)

I'm trying to open files dynamically through actions. A simple example would be: Action name: OpenLink from PyQt4.QtCore import QUrl; from PyQt4.QtWebKit import QWebView; myWV = QWebView (None); ...
1
vote
0answers
44 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
30 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
21 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
71 views

Estimating parameters of a semivariogram?

I have got a shapefile of rain gauges with a field giving the precipitation amount in a particular day. I need to interpolate the precipitation values to obtain a precipitation map for a particular ...
1
vote
0answers
45 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
57 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
32 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
45 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
68 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
48 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
142 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
34 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
57 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
28 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
40 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
57 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
33 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
66 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
19 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
43 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
61 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
30 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 ...