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

learn more… | top users | synonyms

7
votes
1answer
140 views

Batch Georeferencing in ArcMap 10.2

I have about 50 pdf maps that I would like to batch georeference and/or georectify. I've saved one as a jpg and georeferenced it manually and would like to automate the rest which are in the same ...
1
vote
1answer
128 views

Configuring spatialite database access for Python 2.6.6

I'm working on a GIS project, and I would like to implement and test some geo-spatial algorithms in Python. For this purpose, I will not only need sqlite, but also spatialite, in order to store and ...
1
vote
1answer
188 views

How can I change SQL query through a layer of an action (python)?

I have three layers from three diferent database tables. When I click in other layer I want to change (with an action) the query of that three layers. How can I do that? Thank you
1
vote
1answer
120 views

SetColorInterpretation() for a GeoTiff using GDAL not working

I have a single band image which I would like to copy to a 3 bands of a new image and set the ColorInterpretation to red, green and blue respectively. I have tried two approaches, one using the GTiff ...
4
votes
2answers
725 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 ...
2
votes
1answer
103 views

Python support with QGIS 2.4 on Ubuntu 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 ...
0
votes
1answer
131 views

Python Geoserver gsconfig create resource from Postgis store table

I've working Workspace and PostGIS store in GeoServer. I would like to use python and gsconfig to create new resource/new layer from existing PostGIS table, with: computing bbox, adding abstract, ...
1
vote
1answer
29 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 ...
1
vote
1answer
1k views

Why can't I install python-qgis on Ubuntu 12?

I am with ubuntu 12 and Qgis 1.8. I have installed QGIS and grass plugin but I can't install python plugin. How to install python plugin with dependeny in Ubuntu? ~$ sudo apt-get install python-qgis ...
0
votes
1answer
23 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*", ...
2
votes
1answer
201 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
39 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 ...
1
vote
2answers
53 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: ...
0
votes
0answers
26 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
307 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
176 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
35 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 ...
1
vote
2answers
52 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 ...
0
votes
1answer
51 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
38 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 ...
0
votes
1answer
34 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
823 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
33 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
1answer
28 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
14 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
42 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
38 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
128 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
79 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
59 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
160 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
118 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
83 views

GIS projects with a raspberry pi [closed]

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
62 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
68 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 ...
2
votes
2answers
151 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
44 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 ...
2
votes
1answer
43 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
27 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
331 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 ...
4
votes
2answers
254 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
375 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, ...
4
votes
1answer
149 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 ...
0
votes
1answer
21 views

ArcMap 10.2 Sum Acreage for matching areas in another field; ultimately use ModelBuilder?

First off, what I'm attempting to accomplish is to sum the acreage of matching "WUNAME" and populate the "WU_Acre" I've tried to highlight the fields as shown and use the field calculator SUM(Acreage) ...
2
votes
2answers
1k views

Using newline/page break tag in ArcGIS Desktop Text_Element in arcpy.mapping? [duplicate]

I want to update a Text_Element with a newline or page break using ArcGIS Desktop 10.0. Does anyone know the tag or syntax?
0
votes
2answers
88 views

MultiLineString to separate individual lines using Python with GDAL/OGR, Fiona, Shapely

There are lots of MultiLineString features in a polyline shapefile. The problem is to split these lines into separate individual lines. There is a similar question with PostGIS, but I need to code in ...
4
votes
2answers
138 views

Changing default parser in ArcGIS Field Calculator to Python?

Is there a way to change the default parser in the Field Calculator to Python? So annoying to always change now that I'm trying to move away from using VBScript... I'm using ArcGIS 10.1 for ...