Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 115

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

5 votes

Getting index number of list item using Python?

You could use the index() method: import arcpy mxd = arcpy.mapping.MapDocument("CURRENT") df = arcpy.mapping.ListDataFrames(mxd, "Layer")[0] lyrNameList = [] for lyr in arcpy.mapping.ListLayers(mxd, …
PolyGeo's user avatar
  • 65.4k
1 vote
Accepted

Debugging function takes exactly 3 arguments (1 given)?

When you call it using: numSchools("There are a total of: "),count you are only providing one parameter value i.e. the string "There are a total of: " The above is why Python reports: numSchools … () takes exactly 3 arguments (1 given) Your error is pure Python and nothing to do with ArcPy, which you can see by running: def numSchools(work, shapefile, sTyp): print work numSchools("There …
PolyGeo's user avatar
  • 65.4k
0 votes

how to create graphs while running python with ArcGIS 10

I've only used ReportLab for creating Reports as PDF from Python (with ArcGIS 10) but it also has some charting/graphing capabilities: http://www.protocolostomy.com/2008/10/22/generating-reports-with-charts-using-python-reportlab …
PolyGeo's user avatar
  • 65.4k
5 votes

Arcpy: Calculate new field from user input and existing data

From what I can tell the variable speedField is set to a field name (i.e. text string) and then tested to see whether it is less than a number (30). Try changing if speedField <= 30: cost =(pric …
PolyGeo's user avatar
  • 65.4k
1 vote

How to import DGN geometry into a file geodatabase?

Your "Group Layers" in the file geodatabase will be Feature Datasets because the former exist only within maps and layer files. If you have the same coordinate system stored for both the Feature Data …
PolyGeo's user avatar
  • 65.4k
3 votes

What is the best quick way to populate a field (in ArcGIS 10)? (for rare language/font e.g. ...

If all you want is to see an image on the screen while you are editing the index feature class to manually update the field value, then using the Georeferencing toolbar to choose each ungeoreferenced …
PolyGeo's user avatar
  • 65.4k
2 votes

How to sort a field according to value range?

This Python code should do it ... …
PolyGeo's user avatar
  • 65.4k
2 votes
Accepted

Accumulate value loop

If you use IDLE or another Python IDE to author/test your scripts it should take care of indentation automatically. … You can then copy/paste them into the Field Calculator knowing that your Python syntax is right. …
PolyGeo's user avatar
  • 65.4k
1 vote

Python select by attribute using a variable counter

This should fix the first bit if pgNum is a text field: findMe = ' "pgNum" = ' + " ' " + x + " ' " (but where I have single and double quotes separated by a space for readability they should abu …
PolyGeo's user avatar
  • 65.4k
0 votes

Placing message in geoprocessing progress dialog?

I've made what I think are the variables show up bold below. 4 datasets have been reprojected to: WGS Web Mercator (auxiliary sphere) and saved in S:\GisData I suggest that you use a Python variable …
PolyGeo's user avatar
  • 65.4k
2 votes
Accepted

Adding new field and populating with shapefile name

This is really a Python rather than ArcPy question, so would be best researched at Stack Overflow. …
PolyGeo's user avatar
  • 65.4k
5 votes

Seeking Python tools/modules/add-ins for GIS?

It's free, open-source software written in Python but its syntax is not the easiest that I've ever dealt with :-) At ArcGIS 10.0 it is invaluable for writing reports in PDF format from feature classes …
1 vote

SQLite python command not working

I think: if ext == extension should be: if ext == "extension" unless extension is a variable set further up. If the latter then perhaps check what it is set to using a print statement.
PolyGeo's user avatar
  • 65.4k
5 votes

Add a .lyr file to multiple mxd's within a specified folder using python

Instead of this line of code: env.workspace = workspace = "M:\projects\mcag\Project_Site_Packet" I would use any one of the following: env.workspace = r"M:\projects\mcag\Project_Site_Packet" env.w …
PolyGeo's user avatar
  • 65.4k
1 vote
Accepted

Exposing ArcInfo level liscenses to ArcView desktops via ArcGIS Server and custom python scr...

To expose ArcInfo level licensing my understanding is that you will need ArcGIS Server Advanced when most people have the Standard (or Basic) license level. I think of ArcGIS Server Standard as being …
PolyGeo's user avatar
  • 65.4k

1
2 3 4 5
9
15 30 50 per page