Tagged Questions

The act of setting up computing instructions, usually stored in a file and interpreted at run time.

learn more… | top users | synonyms (1)

0
votes
1answer
696 views

Invalid topology error when running script

I am trying to run a python script and I get an invalid topology rule when I get to the feature to line tool. I am using arc 10.1 but I think the script was written in 10.0. I know it was built in ...
4
votes
2answers
284 views

Running python 2.6 and 2.7 in ArcGIS 10.0

I figure that there must be a way for me to run python 2.6 and 2.7 on the same computer. I've got a program that requires 2.7, but ArcGIS requires 2.6. I'd like to be able to run both programs at ...
5
votes
2answers
2k views

How to use QGIS Zonal Stats Plugin from Python Console?

I am using the Zonal Stats plugin in QGIS to extract raster statistics from overlaying polygons (I have shapefiles of species distribution and I want to extract environmental data from within each ...
1
vote
1answer
968 views

How to use OL Script protocol callback

I have a layer with a BBOX strategy with a script protocol to get the data from our server. I'd like make use of the callback function ...
1
vote
1answer
116 views

arcpy.sa.CostDistance from Python gives error about number of args but executes fine through Toolbox

I am attemping to call arcpy.sa.CostDistance to calculate the cost distance to a source point as well as generate the optional Cost Back link raster: arcpy.sa.CostDistance("input", cost, "costDist", ...
1
vote
1answer
241 views

ArcPad get vbs script location

Within arcpad (edit form) I want to get the current location of the vbs script running. This simple vbs script outside of arcpad works fine. wscript.echo " " + Wscript.ScriptFullName However, when ...
5
votes
1answer
331 views

Error using con in Map Algebra in Python script

I am experiencing a painful problem in the middle of a Python script I am writing. When I get to a Map Algebra function, I have tried two different options and both return a different error. At first ...
3
votes
2answers
229 views

ArcGIS Calling Wrong fme.exe When Python Script Converted To An ArcGIS Script Tool

I'm using this this bit of code to execute a FME Workbench file through a Python script ... import os os.system("fme.exe P:\\Mapping\\Scripts\\FME\\Easements_ROW_Extract_From_CAD.fmw") However, ...
0
votes
2answers
242 views

How to create a route and add that route as layer to map using ArcPy?

I wrote a little script for ArcGis, and when I make it run by GUI it happens that it seems to create routes but the routes do not appear in the TOC. Consequently, when the script tries to execute ...
3
votes
1answer
307 views

How to run OSgo4W shell script on Windows?

I have a lot of DEMs that I want to use to create hillshades, slopes and color relief from and would like to automate the processes using a shell script within OSgeo4W shell. Here is the code I used ...
10
votes
2answers
5k views

How to export only certain columns to a CSV file in ArcGIS?

I've written a python script using arcpy which outputs a polygon feature class into a File Geodatabase. I have added a function to export the attributes to a separate CSV file. I am using the code ...
4
votes
3answers
395 views

ogrinfo bash script failure

I need to recursively document a bunch of Shapefiles using orginfo in many directories. For example, $ tree -P *.shp . ├── acfish2s │   └── acfish2.shp ├── airports │   ├── airport_runways.shp │   ...
4
votes
5answers
788 views

Python loop Polygon to raster not working

I want to convert a large number of different shp polygons to raster in ArcGIS 10.1, using an existing field column "class" for the new raster classes. I am not very fluent in python but I thought ...
1
vote
3answers
326 views

Can one edit xls, and convert xls to csv - with a portable python or Perl module? [closed]

I am on a network and computer where nothing can be installed. On this computer i run portable apps through a USB, however I need also to to edit xls, and save as csv. Since i cannot install anything ...
3
votes
1answer
602 views

Automate removal of duplicate polygon nodes from shape file in Arcmap

I have a whole lot of polygon shape files, many of which have got duplicate nodes. This makes processing difficult as almost all tools (erase, union, calculate area) do not work. I found that by ...
4
votes
0answers
3k views

How to inserting script into ArcGIS ModelBuilder? [closed]

I am looking for some tips about inserting a script in the ModelBuilder... I am actually building a model in the ArcGIS ModelBuilder. At one point I would like to insert a script that crosses ...
5
votes
1answer
1k views

Working around the raster calculator in ModelBuilder - ArcGIS

I am experiencing a problem with the raster calculator in the Model Builder under ArcMap 10. I need to combine two layers: a drainage map (issued from a series of previous operations on a DEM) and a ...
5
votes
2answers
984 views

Describing a coordinate system in arcpy

I have a python script in ArcGIS 10.1 which takes in a few inputs from the user. One of the inputs is a coordinate system. I would like to test whether the coordinate system the user chose was ...
1
vote
1answer
164 views

Is there a bug when creating a relationship class with Python using a GlobalID?

I'm trying to create a relationship class with Python using a GlobalID. When I use Python it gives me the error: Failed to execute. Parameters are not valid. ERROR 000800: The value is not a ...
1
vote
0answers
59 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 ...
1
vote
1answer
405 views

Can I use arcpy.Exists for domains?

A script I made creates domains within a selected geodatabase. I need it to not create the domains if they already exist because if they do, it gives an error saying invalid domain name. Is there ...
3
votes
1answer
224 views

How can I put coded domains into a list to be created in python script?

I have a large list of coded domains. They are numbers like: 01.6530.01, 05.7991.08, 05.7991.01, 05.7991.06 The code will be the exact same as the description. I've tried to make a list using: ...
3
votes
2answers
278 views

How to generate Buildings ID numbers inside parcels

In order to decrease manual data entry, I would like to automate a task to generate numbers for all buildings inside a parcel starting with 1. For example, I have 4000 parcels and each parcel has ...
8
votes
1answer
1k views

How to make a new raster using con() script in Python?

I'm new to Python and have been trying to code a raster calculator style script. Basically, I want to convert a raster that has values 0 to -10,000 into a raster that is populated by 1s between ...
3
votes
1answer
111 views

Is there any way to speed up the script I wrote?

I have a pretty simple script which gets 2 parameters from the user: 1)Geodatabase location 2)Spatial reference It then creates a dataset with 6 feature classes. It also adds a large amount of ...
9
votes
2answers
2k views

Python scripts that run inside ArcMap vs ones that run outside?

I'm just starting to get into Python scripting for work.. I'm currently creating a script to automate a process. Basically, it asks the user the client name, gets a projection if available, creates ...
2
votes
1answer
1k views

Regarding property setMinScale(scale) and setMaxScale(scale) in ArcGIS Java script API

I am new to programming in JSAPI. I have two dynamic layers and I want to set the property setMinScale(scale) and setMaxScale(scale) to layers so how do I Set ? ex. I tried using ...
3
votes
1answer
616 views

Get extents of vector shape features in python

i am just wondering if it is possible to iterate through vector features and return the extent per feature without clipping the vector shape? The code looks like this and comes from the ...
4
votes
1answer
916 views

How to automate the drawing of polygons (square) around a number of points in QGIS?

In QGIS (or alternatively any other scripting + GIS stack), how can I automate drawing a 100km x 100km square around a number of points, with the point being dead in the center? I'd need to loop ...
44
votes
10answers
3k views

Alternatives to using Arcpy

I seem to use ESRI's Arcpy site package for virtually all of my python geoprocessing. To ESRI's credit, these are an incredible suite of tools that can help accomplish a great deal. However, I would ...
2
votes
0answers
353 views

How to access mysql data from python built-in console?

I'm writing a QGIS Plugin, and somewhere I want to present data from a MySQL database. It's simple data(strings,etc), not Geospatial, or vector data. I'm familiar with querying databases from python ...
1
vote
2answers
205 views

Way to script customization for ArcPad AXF file?

I have an ArcPad AXF file, created from a geodatabase. I've opened the AXF in ArcPad Studio and created some a custom edit form. It's all great. But if the original geodatabase ever gets destroyed ...
3
votes
3answers
678 views

How to merge a large amount of polygon-features in a script?

We have a very large shapefile with over 30000 features and want to merge it with a script on a server. Currently we try it with QGIS, but the processing takes way too much time. Is there a way to do ...
13
votes
1answer
2k views

How do you write a Python script for repairing data sources in ArcGIS 10

So, I have about 50 mxd's with all broken layers that I have been going through and manually resetting. The data was moved from another computer and the folder structure was changed so it isn't just ...
0
votes
1answer
159 views

How to show script tool dialog from a button in ArcMap 9.3.1?

Thanks to Jason I was able to properly set up the parameters of a script tool. I would like to get the same dialog box from the script tool to appear when used from a button in ArcMap. I know how to ...
1
vote
1answer
263 views

Setting Script Tool Parameters Using Python and ArcGIS 9.3.1

Can't quite figure this out and i'm sure it's a simple fix. I have a script that utilizes the AGSSOM tool. It first stops all published services, allows for databases to be tidied up by ...
2
votes
2answers
1k views

Help with ListFields and CalculateField_management syntax

I need some assistance with the syntax for a CalculateField_management calculation as I have still yet to master all the python syntax rules. What I am trying to do is find the max value in a ...
3
votes
3answers
212 views

ArcGIS NEAR returns -1

We are running an ArcGIS 10.0 geoprocessing script written in Python that (as part of many steps above & below) runs the NEAR command. Both the input and output datasets (shapefiles & ...
2
votes
1answer
241 views

How to import datasets into OpenStreetMap?

A coworker of mine was recently given permission to import our local county government's GIS data into OpenStreetMap. I've made single edits on the OpenStreetMap site before, but I have never imported ...
5
votes
2answers
339 views

Better “ESRI recommended” method other than Pythonscript for filling in patterns into attribute table column?

Attribute tables in ArcGIS are not nearly as easily editable in comparison to something like Excel. For example, you have sorted the table based on some column value, and now want to fill in the ...
2
votes
1answer
379 views

Splitting large shapefile into numerous smaller files based on number of objects in each smaller file

I have a shapefile containing approximately 600 000 point-objects. Unfortunately, for a couple of reasons I need to split this file into a larger number of shape-files each containing approximately ...
7
votes
1answer
492 views

How to simulate moving vehicles?

I have a point layer (stored in SQL Server 2008) that is being served up by a map service in ArcGIS Server 10.1. I am consuming this service in a web client. Lets say the points are boats out at ...
2
votes
1answer
822 views

Importing QGIS core into Python on OSX

I am interested in learning how to write standalone scripts using QGIS. An answer to my previous question directed me to the PyGIS CookBook which has the following instructions for importing the ...
6
votes
1answer
3k views

How to write standalone Python scripts using QGIS?

I've been learning how to use the Python Console in QGIS using references from qgisworkshop.org. I'm familiar with writing standalone scripts in ArcGIS and want to learn how to do the same with QGIS. ...
7
votes
2answers
3k views

How to calculate XY coordinates in Decimal Degrees from projected dataset in model or script?

Is it possible to calculate points XY coordinates in Decimal Degrees in model or script when a feature class is in projected coordinate system? It's easy when a FC is in geographic coordinate system: ...
5
votes
2answers
288 views

ToolValidator not doing anything

I have created a simple script tool which has a single parameter of type "String". I have written the tool validation to disable the input field (simply trying to learn tool validation). The ...
3
votes
1answer
289 views

How do I stop GP script from adding temporary data to Table of Contents?

I have a script that does a series of calculations, producing temporary data along the way. However, at each step of the script, data is added to the TOC and then removed when I call the ...
2
votes
0answers
700 views

Dynamic Contour generation and project on google maps

Is it possible to generate contour map layer at runtime and overlap or project on google maps. I am using google map api v3 and want to generate contour map layer using data from sql server and ...
1
vote
0answers
542 views

Variable stored as NoneType in Python with updateCursor

SOLVED: although the field was not nullable (no null values), a glitch created one in the heading field, so the variable was stored as a null value and thus the NoneType. I am using updateCursor to ...
3
votes
1answer
441 views

Python conditional on current and previous row

I need to calculate a new field with a python conditional where some values only occur if a sequence in a separate attribute field (X) occurs. For instance my data set looks like this. Y is the ...