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

learn more… | top users | synonyms

1
vote
0answers
93 views

Reference to Basemap instance's coordinate system

I use the matplotlib basemap toolkit (mpl_basemap.Basemap) to plot GeoTIFF images on a map background using pcolor() or pcolormesh(). For this purpose, I need to transform a meshgrid of x and y ...
1
vote
0answers
72 views

How to create a schematic view of a line feature?

DEAR PEOPLE FROM THE FUTURE: Here's what we've figured out so far… I have a line feature (polyline with curves) in ArcGIS Desktop, and I want to create a linear representation (straigth line) of the ...
1
vote
0answers
41 views

Qgis 1.9 commitChanges() and Redraw a temporary layer

Using QGIS 1.9 and writing a python plugin. I have a function that connects points into polylines and draws them as a temporary, in memory layer. Membership in a polyline is determined by a field in ...
1
vote
0answers
183 views

Calculating the closest distance between two points in ArcMap 10.2

I am looking for a script to calculate the closest meter to a set of addresses. I have a feature class of meters and a feature class of addresses. I have populated the address with fields for ...
1
vote
0answers
75 views

Automated attribute update geometric network

I have a Network Dataset of a storm water system containing two feature classes of points and lines. (All data is topologically sound with pits and pipes snapped and linework captured in direction of ...
1
vote
0answers
65 views

How to rotate u and v components of wind in rotated gribs?

I have a grib message of a rotated hirlam product. The gribmessage states, that the u and v component contained are relative to the rotated grid. How can I unrotate them?
1
vote
0answers
43 views

Deleting network features in python script doesn't create net junctions

I have a script that makes a copy of a network dataset for a 3rd party app to use. One of the junction feature classes causes problems with the app. The ideal solution would be to remove it from the ...
1
vote
0answers
129 views

Can ModelBuilder be used to export different versions of the same mxd with various constraints?

I am currently trying to use modelbuilder to go through each row in an attribute table, select the streets that intersect the polygon (which is the row in the attribute table), zoom to the selected ...
1
vote
0answers
240 views

Loop though records in PostGIS (using PL/PYTHON or PGSQL)

I've seen many example of loops, but I can't get that one to work. I work for a regional transit agency and each year, we conduct several surveys. I geocode everything to the house level for internal ...
1
vote
0answers
90 views

how to avoid Intersection of polygons via python code

i am using QGIS 1.8 and i can set the check box in Setting\Snapping Options "Snapping and Digitizing " dialog to avoid polygon intersections and enable topological editing but i am looking for a way ...
1
vote
0answers
266 views

Why does ArcGIS Resample tool change cell size and numbers of columns and rows?

I am working with images of oxygen distribution within individual plant root systems submerged in water. The program I use to acquire these images, LookatRGB, splits the green band in half and makes ...
1
vote
0answers
163 views

problem with WFS Data, GDAL, Python, ArcGIS, & Defining Projection

I'm pulling in data in gml2 format with a EPSG#4267 from a wfs. I create a datastream in python and then run the following from the python window in ArcMap: data = datastream.read() #write the gml ...
1
vote
0answers
127 views

How to shift vertices of shapes in shapefile using FOSS python library?

I need to shift each vertice of shape in a shapefile (of any type:point, line, polygon, multiline etc.) with Python. I need to loop in all shapes, get the vertices, get it's coordinates and for each ...
1
vote
0answers
205 views

XY event source layer problem (converts into feature class after running python script ) in ArcMap 10.1

I am using ESRI 10.1 suit (ArcGIS Desktop & ArcGIS Server, No ArcSDE) at my end and after running python script n number of times event layer converts into feature class. Following steps I am ...
1
vote
0answers
135 views

How to create multi-image single band single file geotiff?

I have a geotiff file that is single band but contains multiple subdatasets. I use gdal with numpy to open a specific subdataset and mask some of its values. Example: $ gdalinfo sample.tif ... ...
1
vote
0answers
186 views

Add metadata to dataset (feature class, coverage or shapefile) from a .csv using arcpy?

I am looking for a script that will take metadata information provided in an excel table, convert it to a .csv and import the values to populate some of the dataset's ArcGIS metadata elements. I came ...
1
vote
0answers
82 views

QGIS GPS bluetooth connection

I have setup a Haicom bluetooth gps on a machine running Windows8 and have used GPSGate to create some virtual COM ports. I have valid data arriving at the COM port, but then I run QGIS and try to ...
1
vote
0answers
36 views

Problem in analyzing data in a stream segment

I have to find out the head difference along the stream segment. For that I used Spatial Analyst Tool>Extraction>Sample. With that I got the elevation values in points. But after doing so, i found ...
1
vote
0answers
56 views

Ubuntu Raring - Openlayers Plugin 1.8 or 1.9 Master

Relative newbie to Ubuntu and QGIS. Many questions are posted relating to the Openlayers plugin. It works fine in windows but I cannot get it to work or even appear in either 1.8 or 1.9. The "fetch ...
1
vote
0answers
115 views

Python Script Producing Empty Cost Path Rasters

I'm trying to run a script that will create cost paths for a large number of randomly generated points then assign the cost to those points. But my script is beginning to create cost path rasters ...
1
vote
0answers
262 views

Install shapely for QGIS on Mac

I know there are a number of similar questions, but none of them have answers that allow me to use shapely in QGIS. In particular I am trying to install the Contour plugin, but this fails with the ...
1
vote
0answers
90 views

Subset a GeoTIFF image into regular grids and extract mean latitude, mean longitude, and mean RGB for each grid

How can I subset a GeoTIFF image with 1000 by 1000 pixels into regular square grids of 50 by 50 pixels (400 grid objects in total); and calculate mean latitude, mean longitude, and mean RGB for each ...
1
vote
0answers
261 views

Why does XYToLine_management give ExecuteError ERROR 999999 The table was not found?

I've written this script to import a csv file using ArcGIS' flavor of python.. ArcPy.. It seems to run fine up until the XYtoLine tool runs and then it fails.. This is the error message... Traceback ...
1
vote
0answers
267 views

Python Addin toolbar- Environment mask parameter not being recognised?

I've created a button on a python addin toolbar which uses the selected features from the selected layer in the TOC, creates a feature layer from that selection and uses that feature layer to set the ...
1
vote
0answers
260 views

How to write vector layer to csv file with geometry by PYTHON?

I use Python try to write vector layer file to csv file with this code QgsVectorFileWriter.writeAsVectorFormat(mylayer, r'c:\temp\xyz.csv', "utf-8", None, "CSV") It can export to xyz.csv but only ...
1
vote
0answers
89 views

Python GDAL/OGR: check lines geometries connectivity

I'm working with shapefiles representing roads, so basically it's stored as (poly)lines. I need to perform a road connectivity checking. In other words, I want to ensure that roads meant to ...
1
vote
0answers
174 views

Problems running zonal statistics - not all zones represented

I have been working on a Python script to automate the steps illustrated by whuber here:Create points around the edge of viewshed results I am trying to create a horizon graph illustrating the ...
1
vote
0answers
154 views

qgis python app how to add edit feature button?

I'd like to develop a QGIS Python app for plotting points and editing the attributes. I've started with the tutorials here: http://blog.qgis.org/?q=node/59 and read the cookbook ...
1
vote
0answers
156 views

Averaging satellite data with missing values (using Python)

I am using sea surface temperature, chlorophyll, and other data parameters as covariants in a model, and I would like to average them over a particular time period. I am currently doing this using a ...
1
vote
0answers
120 views

How to programmatically change an SVG symbol in the Vector Layer?

I'm trying to change the symbol used in a layer via Python. I've been able to tunnel through a vector layer to the symbol layer, but I don't know how to change the symbol it's using. I'd like to ...
1
vote
0answers
66 views

Clipping Buffers

I have buffered a line shapefile where many lines are intersecting but not broken at intersections. I am trying to select each record in the buffer file and clip all intersecting polygons in the same ...
1
vote
0answers
55 views

How to identify grid shift file used by osgeo in Python?

I wrote a Python script reprojecting points from a source coordinate reference system (SCRS) to a target one (TCRS) both identified by an EPSG code. I would like my python script to retrieve details ...
1
vote
0answers
323 views

How to transfer the attributes of features based on their spatial relationship?

I'd like to check if a point feature class is placed on a line feature using python in ArcGIS 10.0. I have created a set of point features and placed them directly on a group of line features at ...
1
vote
0answers
339 views

How to calculate average value within a polygon(in Qgis with Python)?

Now I have a point and polygon shapefile and I want to calculate the points' average value within each polygons How to do it with python? I tried to find out but google gives me a lot of raster ...
1
vote
0answers
100 views

Using Python to Switch Layout Templates

Using ArcMap 10.1: Since there is not a way to control portrait or landscape of the layout view through python, is there a way to switch layout templates without opening a new mxd through python? ...
1
vote
0answers
334 views

Get the distance between 2 WGS84 GEOSGeometries

I currently want to check if 2 given GEOSGeometry objects of type Point are within 100m of each other. (length flexible) Looking at previous asked questions on this topic, most of the answers were ...
1
vote
0answers
88 views

Creating Raster with values based on function output

I have a function that calculates a price based on the input slope and distance. I want to write the price to a raster as the rastervalue. How do I do that? OpenSource and ArcMap solutions would work. ...
1
vote
0answers
101 views

Couldn't load SIP module - python disabled

Recently my QGIS started refusing to load SIP module, from day to day without any significant changes in the system (I'm on Windows7 x64). Message thrown at startup: Nie można wczytać modułu SIP. ...
1
vote
0answers
60 views

Python Program for “QC of PDFs Created from Data Driven Pages”

I need some help. I am fairly new to Python. I found a sample code and I need to change a couple things in it for it to work. I need it to make sure that all PDFs were created from the Data Driven ...
1
vote
0answers
62 views

Script Tool Problems ArcMap 10.0

I Have a scipt tool that runs when input shape files are added from the table of contents (added from drop down menu.) However this tool will not run when they shape files are added using the add file ...
1
vote
0answers
166 views

Why is not ST_GeomFromEWKB() working?

The following SQL is working fine from the terminal: SELECT MIN(ST_Distance( ST_Transform(ST_GeomFromText('POINT(-3.163916 55.926528)',4326),32630), ...
1
vote
0answers
106 views

Extract an ArcSDE datasets (rasters/shape files) using python?

I would like to write a python script to extract/export a dataset (rasters/shape files) in ArcSDE. I saw this posts to connect to the server: Define Workspace for SDE Connection in Python But how ...
1
vote
0answers
190 views

How to handle mmqgis geocoding IOError: [Errno socket error] [Errno 101]?

I try to geocode a .csv file with QGIS + mmqgis plugin. But, since some days the plugin always crashes. I tried it with QGIS 1.8.0 on an Ubuntu 11.10, OSGeo-Live v6.0 (which is Xubuntu 12.04.2 LTS) ...
1
vote
0answers
153 views

Table record counts change when using python tool

I have a python tool which investigates mxd files and clips/projects and exports all visible datasets. Recently I've found that the record counts (even on non-clipped data) is different. It's ok if I ...
1
vote
0answers
230 views

Morphometric and hydrological analysis with Python and ArcGIS

How can I write a program using python, that calculates some morphometric and drainage indexes using numeric attributes in the attribute table with ArcGIS? The data I have in my table are area and ...
1
vote
0answers
234 views

How to update polygon field with point count for multiple rows? (Temporal point-in-polygon)

I have a shapefile with several regions. It contains basic info like ID, Code, Name1, Name2, etc. It is overlaid with a shapefile of points (nearly 200k). Each point represents an event with a type ...
1
vote
0answers
80 views

Why does the method partCount in ArcGIS always give back a value of 1?

Does anyone knows why method "partCount" in arcgis version 10.0 always gives me back value 1, even when I have object with interniorring or multipart object? partnum = 0 partcount = feat.partCount ...
1
vote
0answers
323 views

How do I find the pgAdmin connection parameters?

I need to create a connection from arcmap to pgadmin using a python module because of an arcpy script, but I am unsure of how to get the pgadmin connection parameters. I think it may be some kind of ...
1
vote
0answers
211 views

How does QGIS execute Python plugins?

I am trying to run a python script from within a python plugin. The script runs a CGIHTTPServer in a separate thread. It works as expected when executed from the command line and i can issue requests ...
1
vote
0answers
55 views

Is it possible to script ISIS Mapper?

Does anyone have any experience of scripting or batch processing with ISIS Mapper? I am working on a large modelling and mapping project that will require the processing of significant numbers of 1d ...