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

learn more… | top users | synonyms

1
vote
0answers
57 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
61 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
33 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
168 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
62 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
50 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
38 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
107 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
153 views

Only perform Near analysis on selected rows

I am writing a Python script to perform a near analysis on features from two different shapefiles with common attributes. This is happening in a Search Cursor. However, whenever I tried to use the ...
1
vote
0answers
217 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
134 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
120 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
166 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
115 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
148 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
66 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
29 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
52 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
90 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
221 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
73 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
194 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
222 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
177 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
71 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
142 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
121 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
93 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
58 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
47 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
231 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
263 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
88 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
207 views

ArcPy error: Add Feature Class to Terrain.

I'm writing a script to convert lidar data (in .las format) into a terrain without going through all the clicking and so I can send it out to neighboring states with similar programs (I'm using ArcGIS ...
1
vote
0answers
296 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
84 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
87 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
96 views

Can not import qgis.core in python

I installed OSGeo4W. I have no other Python version on my computer. I can import osgeo. But when I try to import qgis.core I am getting the error: >>> import qgis.core Traceback (most ...
1
vote
0answers
51 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
59 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
91 views

How to select from relationship class using python

Good day to all, How can i Imitate the "related table" button and move from selected feature to his relaetd feature using python ? Thanx alot Geog
1
vote
0answers
132 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
92 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
154 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
123 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
125 views

problem in read_shp() to generate a networkx.DiGraph from point and line shapefiles

I tried to use the Python module networkx and specifically the read-shp () to ensure the transformation of a graph to a file sharpe but I always find this error noting that this is the first time I ...
1
vote
0answers
194 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
226 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
77 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
276 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 ...