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

learn more… | top users | synonyms

0
votes
0answers
4 views

Batch Georeferencing in ArcMap 10.2 Tutorial

I have about 50 pdf maps that I would like to batch georeference and/or georectify. I've georeferenced one manually and would like to automate the rest which are in the same location and have the same ...
2
votes
1answer
199 views

Arcpy Network Analyst solver error

Hello GIS Stack Exchange, I am finding it difficult to load locations to sublayers using python in ArcGIS 10.0 network analyst Vehicle routing problem. I'm also having some trouble debugging my ...
0
votes
1answer
24 views

Converting Raster datasets into layers using ArcPy/ModelBuilder?

I am new to ArcGIS and ArcPy (just started using them on Wednesday). I am using a model to create a Point Density plot from a Shape File, with the output being a Raster dataset. I want to ...
0
votes
0answers
17 views

Python support with QGIS 2.4 on Unbuntu 14.04

I recently updated my Ubuntu system to version 14.04. I added the sources and installed QGIS as per the directions on the QGIS website. Everything looks good, except for I do not have all the ...
1
vote
2answers
35 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
votes
0answers
14 views

QGIS 2.4: plugin changes map tool canvas click behavior from 2.0

I had created a plugin for QGIS 2.0 to add new features more easily. It involves changing extents and updating snapping options along with triggering the default actionAddFeature(). However, I've ...
0
votes
1answer
29 views

Python library or algorithm to generate arc geometry from three coordinate pairs?

I'm trying to write code to generate fixtures for a django/geodjango project. I need to generate geometry for arcs (line string) given three lat/long pairs; start of arc, end of arc and centre of arc. ...
0
votes
1answer
9 views

How to create an Erdas batch list file (.bls) using Python?

How can I generate the Erdas batch list file (.blf) using Python? For example, I want to run a 5x5 median filter in the Batch Command Editor using a subset of images within a folder. Erdas provides ...
0
votes
0answers
8 views

How to read Oracle data with PyQGIS? (“identifier is not long” error)

Do you have any idea how load Oracle spatial data to QGIS with using the PyQGIS? Is it possible? I try: uri = QgsDataSourceURI() uri.setConnection("*host*", "1521", "*database*", "*username*", ...
0
votes
0answers
17 views

Running a bat file for rebuilding and republishing a geocoder using two Python scripts, but would it work better as one script?

We all love ESRI and Python.... I'm looking for some insights and here is the situation. I've got a bat file calling two separate .py scripts. The first .py is a geocoder rebuild and the second is a ...
0
votes
1answer
299 views

Shapely LineString and Polygon intersect?

here is my python code, it does not intersect and when I plot this in google map , I see the intersection. shapely.geometry is in Cartesian plane, how you are solving this? l = "40.65:-114.07 ...
0
votes
1answer
172 views

Orthographic reprojection with mapnik

I am trying to create a google earth like wep application. My problem is that I can't get to render a full view of the earth. The zoom_all() function generates the following error : RuntimeError: ...
0
votes
0answers
24 views

how to remove a point or polygon in shapely python

I want to place minimum number of sensors(circles) to cover a maximum area(polygon). I am using "Shapely",python module. I want to know if a sensor i.e a point buffer inside the range of the other ...
0
votes
1answer
31 views

Executing tool comes back with an error arcpy.JoinField_management

I have this script snippet, written by Aaron. import arcpy, os #set workspace arcpy.env.workspace = "C:\\Users\\Documents\\Wetland" ws = arcpy.env.workspace #create a list of features fcl = ...
0
votes
0answers
33 views

How to Save text file in a specific folder in python (PyQt) [on hold]

from PyQt4 import QtCore, QtGui, Qt try: _fromUtf8 = QtCore.QString.fromUtf8 except AttributeError: def _fromUtf8(s): return s try: _encoding = QtGui.QApplication.UnicodeUTF8 ...
0
votes
1answer
46 views

Using Union on multiple shapefiles to output single result

Using QGIS 2.2 and Python, I would like to use the Union algorithm on multiple shapefiles (contained in a folder TEST) which would then produce single shapefile containing all the data. Currently ...
1
vote
2answers
41 views

python crop aerial image

How can i crop an area from an aerial image knowing the latitude and longitude of the image's corners and also the cropped section? I have a LiDAR scan and i and want to crop an image overlay to fit ...
4
votes
2answers
680 views

How to use map composer in a stand-alone script?

I'm trying to follow the map rendering section from the pyqgis cookbook, but I'd like to test this as a standalone application. I can do the first part, using simple rendering, but I'm a bit stuck ...
0
votes
1answer
45 views

Getting error 'exceptions.NameError' in Python script?

I'm getting <type 'exceptions.NameError'>: name 'B' is not defined when I run this script. Why is my 'B' not defined and is it a syntax error? For clarification, I am trying to get the code to ...
0
votes
1answer
25 views

How to plot Storm Prediction Center (SPC) Shapefile using python

I am trying to make a plot of the SPC's thunderstorm outlook using Python. I have downloaded the shapefile from this website http://www.spc.noaa.gov/products/outlook/day1otlk.html. Then I use this ...
3
votes
0answers
40 views

How to cancel tool execution in python

I've written a python function that calls a tool (Import CAD to GDB) in a loop. When I run it I have seen that it hangs sometimes, and I have to force the script to quit. I am wondering if there is a ...
0
votes
1answer
30 views

Error using 'Join attributes by location' via Python

Trying to run a simple script using qgis:joinbylocation but getting either errors or it's not processing correctly. I don't want to take a summary of the attributes, just the attributes of the first ...
3
votes
1answer
813 views

Multiline VBScript Label Expressions in Arcpy

I am able to set simple label expressions, but when I try to set multiline expressions (which all VBScript expressions are) it does not get copied into the expression box properly. I have tried using ...
0
votes
1answer
28 views

Issue using Matplotlib in QGIS

I am developing a QGIS-plugin and for graphing I want to use matplotlib, like many other QGIS -plugins. This worked fine under linux, but under windows with QGIS2.4 I am experiencing problems. I ...
0
votes
3answers
31 views

FeatureClassToFeatureClass_conversion in ArcGis 10.1

I have many > 60 .dwg files I want to convert just the polyline parts of these and have put together a list of python commands using excel to get something like this: However when I try running ...
0
votes
0answers
22 views

Extract pixel value to point file (available) [on hold]

I write a code to extract pixel value to point which had ID (1, 2,3..)(Some point availble). Firstly, I wrote code extract pixel value to text file (.txt). The result is a textfile which had ID ...
0
votes
1answer
19 views

How to determine bounding box of current qgis 'map canvas extent' from the python console

I've asked a similar question here: How to quickly calculate bounding box coordinates of a selected polygon with qgis ...regarding a quick way to determine the bounding box of a given layer. Is ...
0
votes
0answers
10 views

QGIS + python, Attribute index 0 out of bounds [0;0] when adding a feature to a PostGIS layer (view)

I have a plugin which adds features to a particular PostGIS vector layer using the code below feat = QgsFeature() feat.setGeometry(qgsgeometry) layer.dataProvider().addFeatures([feat]) For one user ...
0
votes
1answer
30 views

Arcpy Subtracting rasters error - TypeError: 'unicode' object is not callable

I have a script which subtracts 2 versions of the same raster from each other (one newer than the other) and then extracts the additions & deletions that have happened. I created a simple test ...
-1
votes
3answers
35 views

ArcGIS arcpy code fails in Toolbox mode

This code executes correctly in Python window but fails with ERROR 000732: Input Table: Dataset JHJ does not exist or is not supported # Import ArcPy and other required modules import arcpy ...
1
vote
1answer
119 views

Raster extent, just clipped by geomtery, slightly differs from a given geometry

The raster using arcgis geoprocessing is cliped with a feature, reading it's geometry and as a result, rasters extent slightly differs. Extent of geom: str(row.shape.extent) '570600,537958652 ...
0
votes
3answers
63 views

How to Build a graph from a map

I spent days looking in all questions here and trying tutorials. I need to build a graph for a region (It will be my input in simulation) I downloaded Postgresql and Postgis and osm2pgsql. Now i can ...
4
votes
1answer
5k views

Thiessen Polygon delineation within a Feature

I am trying to create Thiessen (Voronoi) polygons, based on points within a defined shapefile extent. The output should be inclusive to the feature. The output I receive now is the rectangular area ...
0
votes
0answers
42 views

I cannot use Gdal Python but Gdal binary, how to fix?

**UPDATE: I can use GDAL with Python now by copy file from Gdal 1.11 compiled folder to Python package folder. But the problem with GDAL binary and GDAL library that they cannot read the HDF5 file. ...
2
votes
2answers
155 views

Issue while running grass from subprocess

I have a map based web application using geodjango. I needed to display the crime hotspots within a selected polygon area. I found that v.kernel is very good for generating heatmaps/hotspots. So in my ...
1
vote
1answer
117 views

How to save after using fet.setFeatureId in pyQGIS?

By using the following code, I want to change the id of the line when saving the line. But the setFeatureId command, gives a false when doing the commitChanges(). Any idea how to change the id? vl = ...
2
votes
0answers
55 views

GIS projects with a raspberry pi [on hold]

Does anyone know of a project using a raspberry pi and gis that would work for a research project for a computer science major? I am looking to do a research project involving a raspberry pi and ...
2
votes
1answer
57 views

forLoop & joinField & different names

I have a folder with an output (shapefiles) from an iteration. On this output, I want to perform a join between two attributetables. So far so good. Here comes the tricky part. There are different ...
3
votes
1answer
61 views

Dynamic title in ArcMap

How can I have a dynamic title of the map, which changes depending on the layer chosen? Is this doable? It would save a lot of time and iterations since I should be producing several maps. To ...
1
vote
2answers
138 views

How to bulk print maps using ArcGIS or QGIS?

I have a polygon layer that I would like to print images or PDFs from in bulk as there are a large number of them. Rather than having to manually scroll and print each individual'site' in the print ...
1
vote
1answer
38 views

How to get a Layer as ILayer (ArcObjects)

I had asked this question previously which I think will work. But as I am new to this, I can't figure out how to get a Layer as an ILayer object to pass to the method that's in my previous questions ...
0
votes
0answers
14 views

Newbie running qgis 4.2.1 Open Layers plugin not running [on hold]

An error has occurred while executing Python code: RuntimeError: module compiled against API version 9 but this version of numpy is 6 Python version: 2.7.5 (default, Mar 9 2014, 22:15:05) ...
2
votes
1answer
31 views

How to transform JSON with field x,y to gdb in fme

I have JSON file with x,y field. I wonder how to transform geoemtry to gdb? Example of json: [ { "OBJECTID": "1", "x": "15", "y": "21" }, { "OBJECTID": "2", "x": "16", ...
0
votes
0answers
25 views

Does somebody has a Python script for a Multiple Flow Algorithm?

I´m looking for for a python script for a multiple flow algorithm assigning flow to all lower cells from one central cell. This algorithm is part of the r.terraflow and would need it to start at a ...
1
vote
1answer
322 views

Converting Tab to Shp Using OGR2OGR with Python on linux

First i downloaded http://svn.osgeo.org/gdal/trunk/gdal/swig/python/samples/ogr2ogr.py and i am importing this. How can i get ogr2ogr to run in my script? nothing seems to be working and i not sure ...
2
votes
1answer
54 views

How to find missing dependencies in a distributed ArcGIS Python toolbox?

I am developing a Python Toolbox that uses a few external libraries (ogr/gdal, matplotlib, shapely, reportlab among others) which files I have directly copied in the same folder as my toolbox .py, as ...
4
votes
2answers
237 views

Checking current user privileges for an SDE dataset with Python/arcpy

I am managing data distribution via an ArcSDE Oracle gdb to a number of users (schemas?), each of which can only have read only access to datasets they have requested access to, and have then been ...
1
vote
2answers
360 views

Using reader Feature Type Name as Writer Feature Type Name in FME

I've search and searched for a way to do this, but no method seems to work. Basically I want to use the input feature class name (feature type in FME) as the output name. This normally works, ...
3
votes
1answer
132 views

Why is matplotlib installed with ArcGIS?

Today I upgraded to ArcGIS Desktop 10.2.2 as well as the 64-bit background processing tool and noticed that both numpy and matplotlib were installed with Python. In fact, in the "What's New?" section ...
2
votes
1answer
24 views

Arcgis, Convert analyse result in numeric value

I have a problem that seems really simple but blocking me... in Arcgis i have script python where i want to extract the resolution of a raster and use this result like numeric value for use in a ...