|
POST
|
Unless I'm missing something, you just need to change the symbology - Drawing a layer using categories.
... View more
04-24-2012
09:05 AM
|
0
|
0
|
674
|
|
POST
|
Is "for fc in fcs_workspace(env.workspace):" supposed to be "for fc in fcs_in_workspace(env.workspace):"? Also, is the indentation above truly correct? It doesn't look like you ever actually call the function "fcs_in_workspace". In any case, you should somewhere test "if workspace != 'Project.gdb': ", or remove the workspace from your list of workspaces altogether.
... View more
04-20-2012
09:46 AM
|
0
|
0
|
1502
|
|
POST
|
Just FYI, this works as the expression in ArcGIS 10, SP2: !Hyperlink!.replace("originalstring","replacewiththis")
... View more
04-20-2012
07:47 AM
|
0
|
0
|
3701
|
|
POST
|
Create a counter = 1 before the loop. Enter loop. Is counter <= 7? Yes. Load raster into first variable. Add 1 to counter. Next. Reset the counter and run your stats when it gets to 8.
... View more
04-19-2012
02:35 PM
|
0
|
0
|
4398
|
|
POST
|
I'm not sure what the performance implications to this would be, but you might just abandon the UpdateCursor idea and run Calculate Field for each field. This is untested, but I think it should work. import arcpy
inFeatures = r"X:\DATA\ROW_SP_areaTab
fieldList = arcpy.ListFields(inFeatures)
for field in fieldList:
codeblock = "def func(field):\n if field == 0:\n return 9999"
expression = "func(!" + field.name +"!)"
arcpy.CalculateField_management(inFeatures, field, expression,"PYTHON",codeblock)
Alternatively, for your code you're looping through the rows twice, not the columns at all. import arcpy, os
from arcpy.sa import *
from arcpy import env
arcpy.CheckOutExtension("Spatial")
arcpy.env.overwriteOutput = True
areaTab1 = r"X:\DATA\ROW_SP_areaTab"
rows = arcpy.UpdateCursor(areaTab1)
cols = arcpy.ListFields(areaTab1)
for row in rows:
for col in cols:
if row.getValue(col.name) == 0:
row.setValue(col.name, 9999)
row.updateRow(row) edit: changed some "col" to "col.name"
... View more
04-19-2012
11:13 AM
|
0
|
0
|
3931
|
|
POST
|
ListWorkspaces looks at the workspace environment (arcpy.env.workspace) for the path to look in. So, you need to change the workspace each time through the loop to look for mdbs in each folder. import arcpy
arcpy.env.workspace = "X:"
ws = arcpy.ListWorkspaces("*","Folder")
print ws
for w in ws:
arcpy.env.workspace = w
gdb = arcpy.ListWorkspaces("*", "Access")
print gdb
... View more
04-19-2012
10:41 AM
|
0
|
0
|
825
|
|
POST
|
1.) List and loop through your folders (ListWorkspaces) 2.) List and loop through your geodatabases (ListWorkspaces) 3.) Use a SearchCursor to read the values in the point feature class
... View more
04-19-2012
07:37 AM
|
0
|
0
|
825
|
|
POST
|
If your data is at 1:300 and it doesn't fit your data frame exactly, then there is a problem with your index layer dimensions (or your expectation that it will fit). You either need to adjust your data frame to fit the index features, or accept that they won't fit. You can't set the zoom level (1:300) and then expect the image to stretch to fit the data frame without zooming in.
... View more
04-19-2012
07:16 AM
|
0
|
0
|
5246
|
|
POST
|
First, you need to decide if you are using the field calculator or actually writing a full Python script. The answer above (expression = "[POPULATION] / [SQMILE]") would go into a full script, if you choose to write one. Or, much easier, you could just use the expression [POPULATION] / [SQMILE] in the expression box of the field calculator. Quotes group together pieces of text. Square brackets indicate fields. You should really start here and go from there if you are determined to learn Python. It's a fairly simple language, but it still takes time to learn.
... View more
04-19-2012
07:04 AM
|
0
|
0
|
1775
|
|
POST
|
I'm not sure I get the problem, but to make your DDPs at 1:300, zoom to 1:300 and select "Center and maintain scale" from the Extent tab on the Data Driven Pages Setup. Then click OK to make the DDPs. The default extent is 25% larger than the extent of the index shape.
... View more
04-18-2012
12:33 PM
|
0
|
0
|
5246
|
|
POST
|
There are other options for creating grids and graticules here (personally, I'm a fan of the Grids and Graticules Wizard option).
... View more
04-18-2012
11:12 AM
|
0
|
0
|
836
|
|
POST
|
From the FocalStatistics version 10 help: If the input raster is of floating point type, only the Mean, Maximum, Minimum, Range, STD, and Sum statistics are available; the Majority, Minority, Median and Variety statistics are not permitted. If the input raster is of integer type, all the statistics types are available. Unfortunately, the version 9.3 help has no mention of float vs integer, at least on the Focal Statistics page. Honestly, the reply from Steve Lynch to read the help is below the standards I expect from an ESRI representative, especially when the answer is hidden so deeply in the help pages (for 9.3).
... View more
04-18-2012
08:56 AM
|
1
|
0
|
2783
|
|
POST
|
You can either use the Calculate Field geoprocessing tool (basically, the field calculator in a script - one line of Python code), or use an UpdateCursor (more complicated - several lines in your Python code).
... View more
04-18-2012
07:56 AM
|
0
|
0
|
1775
|
|
POST
|
What version of ArcGIS are you using? Mine (v10) has the option to calculate DMS under units. edit: you have more options for units in a text column. Obviously, you can't jam DMS into a numeric field because there are spaces, letters, quotes, and degree symbol.
... View more
04-13-2012
12:42 PM
|
0
|
0
|
1358
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 08-30-2013 02:22 PM | |
| 1 | 04-12-2011 11:19 AM | |
| 1 | 09-17-2021 09:43 AM | |
| 1 | 04-04-2012 12:05 PM | |
| 2 | 07-16-2020 11:31 AM |
| Online Status |
Offline
|
| Date Last Visited |
07-15-2023
12:11 AM
|