Tagged Questions
1
vote
1answer
38 views
Generate unique ID upon creating a feature?
Looking for a way to generate a unique Global ID within a feature set when a new feature is created. For example, every time a sewer manhole is added, we need to generate a new unique Global ID that ...
11
votes
2answers
241 views
Measuring Script Writing Competency
I've been asked by my manager to come up with some sort of competency measure for an employees understanding of scripting/programming. Because I am a self taught programmer, I really don't have a ...
1
vote
1answer
43 views
Adding parameters to a category in a script tool
There is plenty of documentation on how to add parameters to a category in a python toolbox,
(See the bottom of ...
3
votes
2answers
124 views
ArcGIS script tool: Can you have an input parameter set to optional and have the tool work when an input is not provided?
I'm building a script tool that processes shapefiles ( GPS data collected on weekly basis). The tool is set up to take an input for each shapefile ( in this case Sewer, Storm, Sign). On some days, ...
2
votes
1answer
76 views
Select and zoom python script
I am attempting to make a simple select and zoom python script for my address points. Currently the script will complete successfully but will not select or zoom to the entered point. I am using two ...
2
votes
1answer
86 views
Difficulty converting standalone script to ArcGIS tool
As my title says, I am currently trying to make my (working) standalone script into an ArcGIS tool so I'm not the only person in my office that can use it. It essentially selects all the data within ...
3
votes
1answer
103 views
Beginning Arcpy: Asking for a quick review of my script
I cobbled this code together from ESRI documentation and stackexchange answers.
I tried to use SearchCursor(points, fields=fieldname) but I get this error:
TypeError: SearchCursor() got an ...
0
votes
1answer
110 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 ...
3
votes
2answers
101 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
440 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
59 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", ...
5
votes
1answer
128 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
92 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, ...
7
votes
1answer
843 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
5answers
277 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
170 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 ...
4
votes
1answer
81 views
Error message from output workspace when using script tool
I am having trouble running a script tool that I just created in Arc 10.1. The script runs fine in PythonWin, but when I create a script tool with it, the tool seems to not want to accept folders or ...
4
votes
0answers
397 views
Inserting a script into ArcGIS model-builder
I am looking for some tips about inserting a script in the model-builder...
I am actually building a model in the Arc-GIS model-builder. At one point I would like to insert a script that crosses ...
1
vote
1answer
93 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
29 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
110 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
116 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
190 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 ...
1
vote
1answer
60 views
Why can't I add GlobalIDs to the table and feature classes I created?
I'm creating a script to which make a blank geodatabase with a required dataset, feature classes, tables, subtypes, relationships.
I've got everything to work expect for the damn GlobalIDs!
I have ...
8
votes
1answer
323 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
91 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
517 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 ...
3
votes
1answer
213 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 ...
0
votes
0answers
88 views
GIS Programmer/Developer [duplicate]
I have already used Quantum GIS and ArcGIS for quite some time now and I think I'm already knowledgable in using it. Now, I want to learn GIS programming and developing (scripts, python). Can anyone ...
31
votes
9answers
2k 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
193 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
1answer
171 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
522 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
2answers
97 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
341 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
774 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.
...
4
votes
2answers
167 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 ...
1
vote
0answers
265 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 ...
2
votes
1answer
218 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 ...
2
votes
3answers
2k views
Python script: Access data from databases [closed]
I need to access data that is inside an oracle database using a python script. Its a Unix server running oracle 10g. I dont have much access to the database server.
It works fine on model builder ...
4
votes
2answers
822 views
Check if shapefiles exists in folder
In ArcGIS modelbuilder I want to check if a shapefiles exists, if not I want to create the shapefile in that folder. I guess the calculate value tool within ArcGIS modelbuilder can be used, but I need ...
1
vote
1answer
83 views
Other than the methods stated on the Desktop 10 Sharing Tools section, are there any other ways to distribute custom toolscripts?
Essentially I want to be able to distribute a custom script and it seems that I cannot create a .tbx file, so I looked into the other methods, but they are all only for Python modules it seems. What I ...
4
votes
5answers
363 views
Can a new point automatically be populated with data from the containing polygon
I need some help to create a script.
Imagine that I'm using 3 shapes: 1 point and 2 polygons. When I create a new point I want it to assume some attributes of the polygons in which that point is ...
1
vote
3answers
978 views
Error when creating insert cursor in arcpy
I've written several scripts that copy data from MS Access db into a new, empty ESRI Geodatabase. I've pretty much copied the code and changed it for each table -- the first two scripts have worked ...
1
vote
0answers
441 views
Python script for running ArcGIS10 Area Solar Radiation tool
I am trying to run the Area Solar Radiation tool using a Python script, because I want to run it on several DEMs at once. I am using a server with Windows 7, ArcGIS 10 and PyScripter.
I am a beginner ...
3
votes
2answers
207 views
Finding script location… dynamically
Should be a simple question... but those can be the hardest. I have created a script that uses ESRI's arcpy site package and it functions properly in a stand-alone environment. I am now trying to ...
4
votes
2answers
255 views
How to import GDAL in Jython?
I'm trying to use jython with GDAL on Windows. Python and GDAL are installed through MS4W and work perfectly together. Jython is installed manually, but I can not import GDAL. I tried to update ...
3
votes
2answers
597 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. ...
12
votes
5answers
4k views
How to get the extent of each polygon in a shapefile?
In arcgis 10 and python I want to get the extent (xmax, ymax, xmin, ymin) info of each of the polygons in a shape file.
I can get the extent of the whole shape file using
...
2
votes
2answers
306 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 ...



