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

learn more… | top users | synonyms

1
vote
0answers
65 views

How to batch process near feature distance in ArcGIS

I have 2000+ point shape files. These are all GPS tracks. I want to calculate the distance from each point to the nearest feature (road, train line, restaurant etc) within a 30 meter radius. I am ...
1
vote
0answers
69 views

pyQGIS 2.0: Sending signal when identify button is pressed via gui

I have a question regarding the qgis identify tool for version 2.0. I would like to know if it's possible to send a signal when the actionIdentify is triggered by the user via the gui. I'm trying to ...
1
vote
0answers
13 views

Proper updating of new memory layer geometry?

Current workflow for a toolbar button: -create memory layer -save memory layer to shapefile Then the user uses the built-in QGIS tools to add geometry and finally saves changes via the auto prompt ...
1
vote
0answers
50 views

QGIS2.4.0: Cannot import qgis module in python “from qgis._core import * \n DLL Load Error”

Having some trouble importing qgis into python. I'm very new to python so it could be a simple mistake. The path seems to be correct. It gets this far: File "<stdin>", line 1, in ...
1
vote
0answers
45 views

Vector layers without geometry in QGIS?

Using QGIS, I have set up a couple of automated layer additions via the toolbar. After adding geometry in each respective layer (point, lineString, polygon) and saving changes to the layers, the added ...
1
vote
0answers
97 views

Rendering points and polygons with Mapnik

I've tried to render a few maps in Mapnik and I have a little problem. I want to render a map that contains two layers: point and polygon. I've used this script: import mapnik rule = mapnik.Rule() ...
1
vote
0answers
21 views

Vector Layer Symbol (ism) properties?

I would like to streamline the render of a polygon grid vector layer as a simple line (no fill) via Python coding. I am I bit confused by the implementation referenced by the API. Is it possible to ...
1
vote
0answers
51 views

how to call the method of DescribeFeatureType in owslib

I want to execute DescribeFeatureType operation of wfs services. However, I can’t find the method to fulfill this operation in the owslib. Can anyone kind enough to tell me how to do this. The ...
1
vote
0answers
70 views

How to make crs transformation of a QgsVectorLayer?

I need to transform QgsVectorLayers in python from one crs into another crs. By googling I found the following solution ...
1
vote
0answers
42 views

How to programmatically interrupt QGIS initialization and startup

I'm wondering how to interrupt the initialization of QGIS 2.0 on Windows XP before start up. I've put a dialog in one of my plugins that shows up on start up. However, I'd like to make a quit button ...
1
vote
0answers
223 views

Python comtypes and ArcObjects: Snippets GetApp() fails at 10.2

I have been experimenting with Python's comtypes module to access ArcObjects. We are still using ArcGIS 10.0 as we are in the process of upgrading our ArcGIS for Server to version 10.2.2. I am ...
1
vote
0answers
54 views

How to sort a column in attribute table programmatically

Is there any way to sort ( alphabetically ) a column in the attribute table programmatically (without clicking on the column header) in QGIS ?
1
vote
0answers
101 views

ArcPy Multiprocessing 000714 - Working in Debug Mode

In an attempt to render an interactive window via matplotlib I am using an out of process script in a toolbox. If I debug the script, it is possible to step through and render the window as expected. ...
1
vote
0answers
42 views

How to go about creating a custom tool/adding special functionality for a web app

In my soon to be developed web app, I will have an image service and also a feature service that is essentially an index to the image service, with all kinds of attributes. I would like for the user ...
1
vote
0answers
92 views

PyQGIS: Editable Combobox for Value Map widget isses

I am having issues with an editable combo box in QGIS 2.4. The edit widget is set to Value Map with an uploaded CSV. However, if a new values (not included in the key value pair list) is added, the ...
1
vote
0answers
74 views

Import QGIS Python modules in Python command line or standalone script

I am running a Windows 7 machine with Python version 2.7.8 (32 bit). I installed QGIS 2.4 (Chugiak) from OSGeo4W and simply want to be able to import the QGIS Python modules (e.g. qgis.core) into ...
1
vote
0answers
32 views

Link to pdf file through mouse clicking

I need help in identifying the feature attributes displaying a pdf file when click in that feature. I see many examples but I don't have success. I try this code: command = "firefox"; imagerelpath = ...
1
vote
0answers
67 views

Using python libary simplejson and urllib in PostGIS

I installed PostGreSQL9.3 and want to create a Pl/Python function using simplejson library and urllib. First I use OSGeo4W Shell to test the similar python script, it works. Then in PostgreSQL, it ...
1
vote
0answers
52 views

How to write a custom map canvas item by subclassing QObject and QgsMapCanvasItem?

I'm writing a QGIS python plugin where I place some QgsVertexMarkers on the canvas like this: marker = QgsVertexMarker(self.canvas) marker.setCenter(QgsPoint(point[0],point[1])) Now i would like ...
1
vote
0answers
46 views

Python code to determine the position on a map using Geo-Tagging

What is a proper python code, which enables to scan photographs (when captured from a series of snapshots) and match it with a geo-tagged image database. Based on the extent of similarities existing ...
1
vote
0answers
59 views

developer problem with PyQGIS

I am a QGIS developer. We have been modifying the source code of QGIS for several months and have done good work in QGIS version 2.1. After that we tried to do the same modifications for QGIS version ...
1
vote
0answers
49 views

Doesn’t cal AGSSOM program to manage AGS mapservices from python script

We are using ArcGISServer 10.0 on a windows server. Because of database management we need to stop several ArcGISServer Services. For this purpose I use the AGSSOM program, which is called from the ...
1
vote
0answers
29 views

GRASS r.out.mat memory issues

we have built a model with pythn/GRASS that calls the r.out.mat module. The area is quite large 25,000x25,000 cells. The machine we are running it on is Windows 7 machine with 16GB of RAM. After a ...
1
vote
0answers
98 views

pyQGIS (Spatial Join): Sum features of attribute from point layer and join with vector layer

I am new to Python and QGIS. I have avoided asking questions up to now. But by now I have developed a reasonable idea of where i want to go so and where I am stuck. So, I have decided to ask but sorry ...
1
vote
0answers
73 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
87 views

How to keep all the unique columns of the shapefiles after merge?

Writing a script where the user is asked to select a directory which contains Folder_1 and Folder_2, both containing shapefiles and run various algorithms. The basic logical process of the script is: ...
1
vote
0answers
34 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
245 views

How do I install PyProj module for Python 2.7 on Windows 7?

I am having trouble installing the pyproj module for Python 2.7 on Windows 7. I have tried both the 32 and 64 bit installers from this list but the install crashes each time I run it. I have the ...
1
vote
0answers
134 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
56 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
38 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.
1
vote
0answers
770 views

How can I get all the latitude, longitude coordinates/points inside a rectangular polygon drawn in google maps?

Google maps lets you obtain a valid address by clicking on houses or buildings one by one, but it would be much easier if you could draw a polygon on the map and get a list of all valid addresses ...
1
vote
0answers
119 views

QGIS 2.2.0 GRASS not worked

I use QGIS 2.2.0 on Windows 8 64 bit. I try to install use Standalone installer and OSGeo4W and still get the error And then i start GRASS C:\Program Files (x86)\GRASS 6.4.2>grass64 ╬╪╚┴╩└: ...
1
vote
0answers
41 views

Is is possible to run the QGIS python module server side?

I'm pretty new to programming but I want to use the QGIS python module on a server. Basically I am trying to create a JPEG map programatically on a server. I already have a python script to create ...
1
vote
0answers
64 views

Highlight paths between two points

I'm new to qgis and very sorry if this is a simple question to ask. IS there a way to highlight the available paths (roads) between two selected points in a road map(in qgis) ? I want to find the ...
1
vote
0answers
61 views

QGIS API changes from 2.0 to 2.2

I have the same program running on two different machine, one with Qgis 2.0 and the other Qgis 2.2. The machine running 2.2 doesn't seem to render the map canvas. I thought it was how I has creating ...
1
vote
0answers
88 views

Batch Zonal Statistics to Spreadsheets?

I have a pretty immense amount of Zonal Statistics as Table computations to do, and would love to find a way to grab mean and variance values from the little .dbf tables ArcGIS creates and put them ...
1
vote
0answers
78 views

Accessing CRS info with pyqgis in a standalone application

I'm currently having trouble accessing and defining CRS information in a standalone application. I've read the API documentation and have tried it in the python console in QGIS 2.2.0. The python ...
1
vote
0answers
45 views

Programatically export labels to CAD based on another field value

The problem: I have a fairly simple procedure to export both the polyline features (architectural cad layer) and the ID's (attribute fields from polygon features that fill the rooms in another layer) ...
1
vote
0answers
157 views

Converting GRIB to Geotiff with gdal_translate in Python

I want to extract each band from a GRIB (gridded binary from http://data-portal.ecmwf.int/data/d/interim_daily/) in a single Geotiff image. I´m using Python with gdal_translate in a QGIS backround, ...
1
vote
0answers
111 views

Problem with polygon overlay in raster stats using gdal

I am using the raster_stats module in python to calculate the mean carbon value for different sets of polygons. Here is the code that I am using: africa_sat = ...
1
vote
0answers
147 views

How do I smooth edges of polygons in QGIS?

Is there a built in function or plugin I can use to achieve smooth lines for my polygons instead of the blocky ones I have now?
1
vote
0answers
98 views

How can a script tool share (dynamic) variables among different modules?

I'm running a python script from the toolbox window (as a script tool). I have a second python (tkinter) module that I use as an input interface. Now, I know that the script tool can call the ...
1
vote
0answers
67 views

using arcpy to query sde database in python

I have three variables: view_name, column_name, and column_content. column_name contains id, name, address, etc. column_content contains 123, John, 200 King st, etc. user specifies the column_name ...
1
vote
0answers
70 views

model to connect points with line and set the digitize direction according to height

I'm trying to develop a tool that connects a point layer (manholes) with lines (waste water pipes) and sets the line direction according to an height attribute acording to gravity(from high to low). ...
1
vote
0answers
162 views

Running python script outside of Arcmap's python console

My codes works fine in Arcmap's python windows. But when I try to run it in a command promt windows, It says that; ERROR 000837: The workspace is not the correct workspace type. But it works fine ...
1
vote
0answers
121 views

How to use GDAL on Heroku?

I have a geospatial python app that I want to use on Heroku. This is my requirements.txt file: Flask==0.10.1 Jinja2==2.7.2 MarkupSafe==0.19 Werkzeug==0.9.4 gunicorn==18.0 itsdangerous==0.23 ...
1
vote
0answers
233 views

Editing QGIS point layer: retrieve attributes of intersecting line layer

I'm creating a custom editing form using QGIS 2.0 and would like to modify the mouse event when creating a point. I've gotten a start by reading this thread: How to programatically check for a mouse ...
1
vote
0answers
37 views

Changing the symbology of layer when converting from Layer to KML using Python

Is it possible to change the symbology of a layer file using Python? I have a script that creates a layer file and converts it to kml, but every time I run it the symbology color in the kml of the ...
1
vote
0answers
59 views

Batch Clip (Editing Session)

I'm trying to correct some topology errors in my geodatabase, now focusing on two feature classes: grass and buildings. They must not overlap. However, there are plenty of spaces where the grass was ...