Tagged Questions

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

learn more… | top users | synonyms

2
votes
2answers
565 views

Convert CSV files into OSM with FME

I have a database which i've exported as individual csv files for each table. Below are some of the attributes which exist from two of the csv files: wayPointID linkID order x y z length ...
2
votes
3answers
567 views

How to keep unmatched records (i.e. delete matched records) in table using ArcMap

I need to drop all the records from a table with matching field values in a reference table (i.e. lookup table). Do I join the tables first and keep unmatched records? Or is there any other way to do ...
5
votes
1answer
254 views

Seeing QGIS Python Commands

When learning MapBasic I found the most useful way to learn how to do certain tasks was to do them using the GUI and then watch the MapBasic window in MapInfo to see how they were achieved in code. It ...
0
votes
1answer
1k views

Create HTML report using Python

i want to create Analysis report after createing model for generating cut/fill. Once it will done , basedon this cutfill/table, would be display statics in html formate using python. is it possible. ...
1
vote
2answers
1k views

Getting print statements in Python script to print through a batch file

I'm starting to learn Python and batch files. I have a Python script which selects data by location and exports the selection to a new feature class. The script runs just fine - included in this ...
6
votes
2answers
586 views

Using Python, Batch Project output won't drop in a feature dataset (ArcGIS 9.3 or 10)

When attempting to batch project in ArcGIS (using either arcpy or arcgisscripting), I cannot get my geoprocessing results to drop into the feature dataset that I specify. The results instead are ...
5
votes
2answers
2k views

Efficiency of python script using SAGA and arcpy

=== SUMMARY === I have created a process to import a LAS point cloud, clip it, select the ground points and save the output as an XYZ.txt for clients to use. This uses a python based script (will ...
2
votes
2answers
374 views

how to calculate a field from a shp currently sected in a arcmap session using a Python script in ArcMap 10?

Hi I nedd to create a script in Python for use in ArcMap 10. This script must be able to calculate a field from the shp currently selected in ArcMap. Any ideas?, I'm new to Python so any code example ...
0
votes
1answer
858 views

It is possible to edit selected features with Python?

I'm trying to edit some fields of the selected features in ArcMap. It's possible to do this with Python (ArcPy)?
2
votes
1answer
2k views

Issue with Mosaic to New Raster tool

I am having a major issue with the Mosaic to New Raster tool when importing ASC files. It processes the first few files but not all of them. I thought it was a space issue and tried to split the input ...
6
votes
1answer
125 views

Would it be possible to construct a stand-alone grass.script python package?

I would like to migrate dependency on ArcPy to grass.script without requiring the full installation of Grass. Would it be technically possible to have a portable directory containing grass.script and ...
2
votes
1answer
1k views

Using a geodjango PointField with geography=True, my distance calculations are wrong

Here's my model: class ExchangeArea(models.Model): """ An Exchange Service Area, calculated from a phone exchange and surrounding census tracts. """ coordinates = ...
0
votes
1answer
173 views

How do I assign a variable to a SQL Server ArcSDE database's feature class?

I'm using ArcGIS Desktop 10 and have no experience using Python with a SQL Server ArcSDE database. When using a shp file or file gdb it is very simple to reference a given feature class by simply ...
2
votes
2answers
491 views

Parameterized insert query to PostGIS fails

I have a PostGIS database table that I need to insert data into. I'm using Python 3 and the pg8000 interface to Postgres. Somehow, parameterized inserts do not work. If I do iq="INSERT INTO ...
2
votes
1answer
469 views

How to determine area of pixel in meters with GDAL and Python?

I have a raster loaded in Python using GDAL bindings. I'd like to be able to determine the area of a pixel in meters although I'm not confident that the projection is in meters. On this page I see a ...
3
votes
2answers
809 views

Unzip a file using python caller in FME 2011

The idea is to download a zipped file from a website and unzip it using FME 2011. I have attached a screenshot of FME workbench which is not working. Any help is greatly appreciated. Thanks. Sam
3
votes
2answers
1k views

How to write a SQL WHERE Clause using Multiple Choice values in FME?

I published a parameter which is of Choice Multiple type. I wish to use values from this parameter for WHERE Clause when Reading Inputed Data in the begin of Workbench. So there is no problem if I ...
2
votes
1answer
166 views

Limits to processing files from a list of rasters

I have written a script which selects all files that are within or subset by an area of interest polygon. This works fine but when the file list it's working has more than 150 records it stops ...
2
votes
1answer
478 views

Running C# code from a python tool (ArcMap 10)

It appears that the only way to copy individual rows of data while preserving GlobalIDs in code is by using C# or VB.NET. I need to run the C# code from the above link within a python tool, and I am ...
6
votes
1answer
693 views

Mapnik/Python Compatibility

Anyone know what versions of Python Mapnik is compatible with? I'm having trouble getting Mapnik to work. I'm thinking it might be because I am on 64-bit Win 7 and installed the 64-bit Python (v2.7) ...
10
votes
3answers
595 views

How to download and process raster files in Python?

I am fairly new to python and seek guidance for a question which might sound trivial to many. Is there a way to use 'wget' in a python script to download raster files from a server and process them ...
3
votes
1answer
466 views

Want to use GDAL in Arc10 toolbox via subprocess call

I'm attempting to launch a version Python 2.5 that supports GDAL from an ArcGIS10 toolbox script. I'm doing this because I'm having loads of trouble importing the GDAL library directly into Arc, and ...
5
votes
2answers
2k views

GDAL Python bindings not picking up OGR PostgreSQL driver

I have a windows server (Microsoft Windows Server 2003) with: Python 2.7, PostgreSQL 9.04-1, GDAL 1.8.1 (installed from the windows installer (gdal-18-1500-core.msi) hosted at ...
3
votes
1answer
2k views

How do I 'select' using ArcPy?

When using a cursor to loop through an attribute table, is it possible to iteratively select each row? I want to clip a line to a polygon grid (see previous question); due to the size of the grid the ...
4
votes
2answers
909 views

How to merge street layers in QGIS for exporting to PostGIS?

Is there any way of merging lots of street data in QGIS and getting one layer for exporting it to Postgresql? I know one method using mmqgis "Merge Layer" tool. It works in Ubuntu but not in ...
0
votes
1answer
1k views

How to solve an installation problem involving QGIS, Python, and a plug-in?

In an attempt to get the plugin "Profile Tool" working, I installed geoslib and python Shapely 1.2.10 module as requested using following: sudo port install geos Then install Shapely once ...
6
votes
1answer
1k views

arcpy: Compare extents of rasters

I am writing a script that takes an input of an Area of Interest (AOI) and then walks through the base directories to find any file that has an extent that intersects with the AOI, clip it and ...
1
vote
2answers
437 views

How to translate (reposition) a raster in Python?

I tried to use QGIS GeoReferencer to translate a raster layer, but somehow failed. It just goes to somewhere unexpected. Now I decide to do it myself, with python. I think some libraries like GDAL ...
5
votes
2answers
265 views

Finding Raster Overlap within a Directory

Here is the scenario: I have a directory with 100+ map projected, single band, rasters that weighs in a 40GB+. I have used ArcMap's built-in mosaicing tools to create a raster mosaic. I am using a ...
5
votes
5answers
1k views

Python, shapely library: is it possible to do an affine operation on shape polygon?

I am trying to create a rotated rectangle in lat/lon coordinates. Basically I have the coordinates of the center and rotation angle around the center. Is it possible to do using, shapely or gdal, or ...
6
votes
1answer
3k views

In an arcpy script, how do I convert ArcGIS date value to a string reading in mm/dd/yyyy format?

I am writing an arcpy tool script in ArcGIS 10.0. In a fGDB feature class, I have a Date type field. I gather that the values in the Date field are stored as long integer dates, but they display in ...
6
votes
4answers
8k views

How do you test for a NULL string field in the Field Calculator with Python?

I am trying to perform an operation on a string field with a condition that it contains data. Referencing None with Python does not appear to work when the field is nullable and contains <Null> ...
8
votes
3answers
4k views

How to find the locations of the highest values in a raster?

Using ArcGIS 10, I have a raster where I would like to find the pixel with the maximum value in the raster and return its location (center of pixel) in decimal degrees. I would like to iterate through ...
5
votes
4answers
1k views

Does File Geodatabase performance degrade as it fills up?

I'm having a memory leak issue. Upon investigating this more, it seems the file based geodatabase I write to in a loop, is growing very large, and as it grows, it significantly degrades the ...
6
votes
2answers
845 views

How can you insert a table record without geometry into a feature?

I am working with ArcGIS and Python and trying to append table rows into a featureclass. You cannot use append and you cannot just make a tableview of the featureclass and then try to append it in. ...
0
votes
4answers
511 views

How to unproject a shapefile in Python?

I have one shapefile with XY coordinates in meters. Now, I want to develop one script in Python which converts meters to decimal degrees. Please help me to develop this. Thanks
9
votes
3answers
3k views

Setting parameters in Script Tool using Python

I hate to bug you all with the same problem over and over again but I run into a new problem everytime I make a slight change to the code. All I did to the code below was to replace field names to ...
4
votes
2answers
3k views

arcpy, “.lyr” file to shapefile or raster

i am using arcgis server 10 and python 2.6.5. i have created a "test.lyr" file, now i wanted to convert it either to shape file or raster file. i have created the "test.lyr" from "test0.tif" and ...
7
votes
3answers
1k views

Use Esri Geoservices REST as backend for Python web framework (Django?)

I would like to know if it's feasible to use an existing Python web framework such as Django/GeoDjango as a frontend to work with Esri's Geoservices REST API? I envision developing a database engine ...
3
votes
2answers
614 views

Arcpy: print to PDF with Vector shapefiles, text etc

I have a small python script which exports a set of data driven pages to PDF. This works fine, including appending each page to an 'all' pdf. My issue is that it creates rasters of each layer in the ...
3
votes
1answer
503 views

Adding Descriptions to custom ArcToolbox 9.3.1

I looked http://webhelp.esri.com/arcgiSDEsktop/9.3/index.cfm?TopicName=Setting_script_tool_parameters and couldn't find how to add Descriptions for each parameter in the script tool. I see how to add ...
7
votes
1answer
235 views

Efficient Network Neighbors?

I would like to identify the Kth order neighbors of an edge on a network, specifically the neighbors of a large set of streets. For example, I have a street that I'm interested in looking at, call ...
1
vote
1answer
342 views

How to tranform a column field into a list using Field Calculator

I'm trying to make a simple field calculation with ArcGIS 9.3: New field = Old field - Old field(first value) which in Calculate Field with python code should be Expression: !Old field! - first ...
1
vote
2answers
739 views

What changes will be made to arcpy in ArcGIS 10.1? [closed]

I heard that two big changes to arcpy will be add-ins and new, faster cursors. Also, new features include "the ability to administer your enterprsie geodatabase (ArcSDE) using Python scripting" and ...
4
votes
3answers
5k views

ArcGIS 10/arcpy: Help needed with syntax for CalculateField_management in Python script

I need to use CalculateField_management in a Python script, and the calc expression needs to concatenate a runtime variable, a string, and a field (string) value. I have searched all over for ...
1
vote
0answers
247 views

arcgis server 10, vb.net, non pooled service, web adf

i am running arcgis server 10. i created a A.MXD file, then started arcgis server and successfully added non-pooled service using A.MXD. i also installed visual web developer 2010 express and created ...
7
votes
2answers
3k views

How to create a checkbox parameter in a ArcGIS custom Python tool?

I am working on creating an ArcGIS tool from a Python script I am writing. I am wondering if it is possible to have a checkbox parameter. Basically what I want to do is have a parameter where the ...
2
votes
1answer
185 views

ArcGIS 10 SP2 issue with AggregatePoints

Esri persuaded us to upgrade to SP2 and now we cannot use the code we have, as it doesn't work. According to the download material, NIM063853 is when AggregatePoints doesn't create the derived ...
8
votes
2answers
865 views

ArcMap running scripts slower if you import Arcpy

I am finding ArcMap runs slower, if you have written a script, which imports arcpy. You may wish to write a script that can be operated in ArcMap, through the python window, or as a standalone ...
2
votes
0answers
250 views

RT Sql Layer plugin giving an error [closed]

I am trying to use the aforementioned plugin with QGIS 1.7 and Postgres 9.0/PostGIS 1.5. Added a PostGIS spatial layer w/out a problem and then clicked on the RT Sql layer button which displayed the ...