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

learn more… | top users | synonyms

0
votes
1answer
913 views

libmysql.dll-procedure entry point error [duplicate]

Possible Duplicate: How to fix QGIS error “Entry Point could not be located”? I am working with qgis,pyqt4 and python2.5. I was getting error qtcore4.dll could not be located.so ...
0
votes
4answers
419 views

Resolving Arcpy “GetObject not point” Error

I'm new to Python (v 2.6.5) and am trying to write an ArcMap (10) script that reads the vertex coordinates of a polygon shapefile which includes a small hole (doughnut polygon). I've been working ...
1
vote
1answer
11k views

How to fix Qtcore4.dll can't find procedure entry point? [duplicate]

Possible Duplicate: How to fix QGIS error “Entry Point could not be located”? I am working with QGIS, python2.5 and pyqt4 for py2.5. My system variables are as follows: ...
5
votes
2answers
2k views

Use arcpy.mapping to list broken data layers?

I want to list all the broken links in all mxds in a server drive. But whenever I try I get an error come up. Can someone use a specific example, say the drive is D drive, how would I put it into ...
0
votes
1answer
222 views

Insert cursor raises exception on geodatabase

world, I'm having trouble to insert a line geometry into a personal geodatabase (using Python/ArcGIS 9.3.1). Everything works fine if the target feature is a shapefile. My guess is that calling: ...
4
votes
2answers
1k views

arcpy: check for same record in cell above and below

After using the find duplicates in arcmap 10, I want to check if the feat sequence ("find duplicates" marks all records with the same attributes with the same number [in "feat_seq"] and creates a ...
1
vote
1answer
235 views

GeoDjango 'NoneType' error when using 'distance' function

I have a site that's working on our staging server but after copying it to the live server I am getting the following error when trying to perform a distance() call (code cut down to minimum) ...
2
votes
1answer
407 views

How can I, in a general way, rescale a raster in ArcGIS Model Builder

What I want to do is rescale a few rasters from whatever they are now (i.e., values between -99 and +1000 OR -256 - +256 OR 0 - 3.23) to a normalised value (i.e. values between 0 and 1). I would ...
3
votes
3answers
431 views

How to package up a Python script for an end user to run

I have a Python script that I have made to some basic data management tasks. I want to package up a Python script in a nice user friendly way for an end user to run, they do not know how to run ...
3
votes
1answer
348 views

gp.CreateFeatureClass(..) and gp.CopyFeatures(..) isn't copying all fields of feature class

How do I get the ArcGIS 9.3 geoprocessor to copy all of the fields of a feature class? Here is a description of what I'm trying to do: I am modifying an existing script created by a developer not on ...
1
vote
1answer
1k views

Automate converting labels to annotation in ArcMap at multiple scales?

I need to be able to convert labels to Annotation feature classes at multiple scale levels for both address and street data. Similar in concept to generating tiled layers for a web service, I have 5 ...
0
votes
2answers
2k views

Cause of expected an indented block error in Python script?

I have been trying to list all the field names of a shapefile but it is showing 'expected an indented block'. What should I do? import arcpy fieldList = ...
3
votes
1answer
460 views

How do I perform one-step transformation in python?

I would like to perform transformation for this example data set. I have here four pairs of adjustment points and want to transform given point coordinates from primary system to secondary system ...
2
votes
1answer
2k views

how to calculate RMS 2D and RMS 1D, using python?

I would like to calculate: RMS 2D: standard deviation for the two coordinates of flat (67% confidence level) and RMS 1D: standard deviation for height (67% confidence level) What is the formula and ...
2
votes
1answer
523 views

Get Raster Catalog Names from a File Geodatabase Programmatically

I'm trying to get only raster catalog entries from a file geodatabase using the arcgisscripting geoprocessing API. So far I am able to do this using the ListDatasets function using the ALL argument. ...
5
votes
3answers
1k views

How to repair paths of an unmanaged raster catalog in file GDB?

I'm using ArcGIS 9.3.1 and I have an unmanaged file geodatabase with raster catalogs in it. Tiles are loaded inside the catalog and each tile has a "Full Path" property which is environment specific. ...
8
votes
4answers
1k views

Is there a mapping between OGR and python data types?

I'm writing a shapefile using OGR in python, creating fields on-the-fly from a python data source. Creation of a new field requires an OGR data type, is there a mapping between OGR and python data ...
7
votes
4answers
3k views

How to remove numeric characters from alphanumeric value in field calculation?

I have a field containing alphanumeric values in the following format: A-AA00 Sometimes they are also A-AAA0 I need a Python script I can put in the field calculator in ArcMap 10 that will at ...
6
votes
5answers
3k views

How to interpolate points along a line in Python for ArcGIS 9.3?

I am building a Python geoprocessing script for ArcGIS 9.3. In the script, I have a simple LINE feature class with one row, one line. How can I use a linear referencing system to interpolate a point ...
5
votes
1answer
1k views

How to use QGIS Time Manager sample data?

I've downloaded the Time Manager plugin for QGIS for Windows, version 1.7.1. I'm not sure whether I should really be asking a question on here, but since there doesn't seem to be an issue tracker on ...
19
votes
5answers
4k views

How to use ArcGIS functionality in Python without running ArcMap (e.g. separate editor/environment)

I'm trying to take the next step in programming ArcGIS with Python and see if its actually possible to run my script/code without having to load ArcMap and paste them into the Python window. I imagine ...
12
votes
4answers
503 views

Mirror of Michigan State University's Python geoprocessing course materials

Been learning geoprocessing with Python using MSU's GEOG 825 ( python geoprocessing ) course. Unfortunately the link is dead now. I know this is a long shot but does anybody have a copy of the ...
1
vote
1answer
307 views

How to correctly use cursor.execute() with PostGIS?

I do not understand how the operator works some times... Here is an example that works, "SELECT ST_Distance(ST_GeomFromText('POINT(-3.16496271127842 ...
9
votes
3answers
5k views

How to round a column in attribute table (ArcMap)

I want to use the Field Calculator in ArcMap to round an existing column to two decimals. Currently I have a column that is 6 decimal places long and would like to simply round it down to 2 decimals. ...
1
vote
1answer
1k views

Radius of Curvature Python/Arc, how access x,y coordinates

I have a polyline in ArcMap 10 and I am able to script the length of the line in Python using this bit of code: #Calculate Radius of Curvature #try: # Import system modules import sys, string, os, ...
3
votes
1answer
538 views

Batch clip feature class to preserve area field

I have a large land cover map in a geodatabase, that I want to batch clip by defined catchments (about 63 polygons). The output files are named based on a field in the "clipper" (sys.argv[2]) called ...
1
vote
2answers
544 views

Python Mapscript 6.0.1 layer.getShape API

I am attempting to follow the mapscript example described here - http://trac.osgeo.org/mapserver/wiki/RasterQuery but ran into some trouble with s = layer.getShape(result.shapeindex, ...
1
vote
3answers
2k views

Using QGIS with a pre-existing installation of Python 3.2 and matching GDAL

I need to have GDAL/OGR working with Python 3.2 because of another dependency. However, I also want to have QGIS for convenience. However, QGIS - FWTools in particular is built against Python 2.5, ...
1
vote
1answer
740 views

How to refresh QgsMapcanvas?

I am using Qgis 1.7 and I want to refresh the mapcanvas so I am using refresh() function of QgsMapcanvas class and Nothing is happening to the Map Canvas. I am using Python for customizing
4
votes
2answers
430 views

How to run an external exe in ArcGIS Python?

I need help with one question. I would like to run an external executable written in fortran which provides one of the inputs inside a python code. Is it possible to run that exe inside python script? ...
2
votes
3answers
878 views

Accessing GEOS functions in Python

The issue: I am using Windows 7, 64-bit operating system with Python 3.2. I must continue to use Python 3.2 because of a dependency with another API. I need some functions in GEOS that are not ...
1
vote
1answer
484 views

Copying and renaming files on SDE connection

I have a script that renames and copies files (feature classes) on an SDE connection. This script works just fine if the feature class name does not start with an 'S'. If the feature class name does ...
4
votes
2answers
682 views

Update Multiple Metadata Tags at Once

ArcGIS 10 SP3 Hello! I have read the other posts in this forum about updating metadata programmatically, and have examined Esri's help topics regarding xslt stylesheets to update metadata, but am ...
3
votes
1answer
1k views

Buffer Selected Line Segments Using ArcGIS 10 or Python

I haven't quite found a solution for buffering selected line segments of a road network without extporting the selected line segments to a new file and then buffering. I want to avoid creating a ...
2
votes
1answer
145 views

Locate DTEDs from one layer that intersect a polygon in another layer

I'm new to the GIS world, and using ArcGIS 10, so please forgive me if this is a simple question. I have DTED files (level 2) that I have placed into a mosaic dataset, and I'm trying to determine ...
13
votes
2answers
2k views

Multiprocessing Errors - ArcGIS implementation

I was wondering if anyone else in the community here has attempted to use multi-processing for spatial analyses. Namely I am trying to iterate through a series of rasters, create a multiprocessing job ...
1
vote
1answer
322 views

Arcpy ChangePrivileges_management not working

I was trying to revoke access for a user using Python script, but it does not seem to work. I mean the script runs successfully without any error, but does not what it's intended to... Here're the ...
1
vote
1answer
595 views

Spatial Analyst Cell Statistics tool in Python gives inaccurate results

My question is similar to the Cell Statistics gives Wrong Answer question. In Python, I'm using the MINIMUM parameter to execute the cell statistics tool on several reclassified rasters ('0's and ...
4
votes
2answers
2k views

ArcGIS Geoprocessing Services - Don't work if 'Run python script in process' not checked

I have a standard geoprocessing toolbox that I am exposing as a geoprocessing service. The tools in this toolbox are plain 'ol python scripts. All of this is being done in ArcGIS 9.3.1. As a ...
8
votes
2answers
2k views

Converting File Geodatabase Table to Access 2007 ACCDB table programmatically?

Does anyone know of a method to convert a File Geodatabase Table into an Access 2007 Table programmatically. I have been trying using the PYODBC library and a series of insert statements but am ...
2
votes
1answer
454 views

Perform Multiply (Times) Function on Several Reclassified Rasters Using Python

I have several reclassified rasters (0 = snow cover, 1 = no snow) and I would like to use the multiply function on all rasters that have the same spatial extent. In ArcGIS 10 this function can be ...
2
votes
1answer
354 views

Search Raster Files from Folder that Have Same Spatial Coordinates Using Python

I have approximately 700 raster files in a single folder and I need to find files that have the same spatial extent and copy to a different folder. The raster files measure daily snow cover and ...
2
votes
2answers
129 views

Finding Two locations with a conditional search on DEM

I want to find two locations H difference in elevation between two locations on a DEM. Ex: point A and B are my output after search on DEM. conditions are (1)buffer R distance around point A and (2) ...
6
votes
3answers
6k views

Programmatically start and stop map services with Python

Is it possible to programmatically stop and start ArcGIS Server map services using Python?
3
votes
2answers
2k views

Batch Processing 400 MODIS HDF4 Files Using Several Tools In ArcGIS 10

This is my first post, I hope I don't screw it up. We have about 400 MODIS HDF4 files we are looking to batch process in the ArcGIS 10 or Python environment. The tools we are looking to use are ...
6
votes
3answers
2k views

Why is an extra field necessary when creating point shapefile from csv files in Python?

I have a Python script that creates a point shapefile from a csv file within a Python script. This script gives me a ValueError for the longitude field (LON) if there isn't an extra nonsensical field ...
6
votes
4answers
5k views

Field Calculation - Python - If/Then over multiple data columns

I have some VB code saved that looks at two columns of data, and populates a third with the low value. Pre-logic Script Code: Dim output as double if [MIN_LEFT] < [MIN_RIGHT] Then output = ...
11
votes
1answer
801 views

automating roof orientation detection from satellite imagery

A while ago I did a neighbourhood roof orientation survey for solar panel deployment, by visually checking each roof and marking individually whether they were south or almost south-facing. As this ...
4
votes
1answer
1k views

Multiple Conditional Reclassification - ArcGIS

This is a question out of curiosity rather than a problem as I am not the most experienced with raster datasets and I wonder if there is a better solution to my current approach. I am trying create a ...
11
votes
4answers
1k views

Efficiently finding the 1st order neighbors of 200k polygons

For every one of the 208,781 Census block groups, I'd like to retrieve the FIPS IDs of all of its 1st order neighbors. I have all the TIGER boundaries downloaded and merged into a single 1GB ...