|
POST
|
FGDB do not have a size limit. Support multi user viewing/editing. Topology, domains etc. As of 10.0, there really is zero reason I know of to use a PGDB unless you need to tie it to Access for some archaic reason.
... View more
06-19-2012
12:29 PM
|
0
|
0
|
2495
|
|
POST
|
The does lock file actually stop you from doing anything? I know if FGDB lock files can persist after a session and have no impact on future sessions. I too have some lock files hanging around PGDBs after creation/processing and they don't seem impact on any analysis etc I want to do on them.
... View more
06-19-2012
06:09 AM
|
0
|
0
|
2495
|
|
POST
|
The point of scripting in ArcGIS is not just the automation part of complex tasks, but also to gain granular control over specific tools, inputs, and outputs. Several object creations will accept invalid parameters until a function is called that looks for a parameter in a specific format and does not find it. That's when an error is thrown. That being said, in this instance I cannot replicate this behaviour you are seeing. I have tried in an ArcGIS session and through IDLE. I get an error at mxd object creation with an invalid MXD filename error. What Service Pack are you using?
... View more
06-18-2012
09:24 AM
|
0
|
0
|
3379
|
|
POST
|
It requires the full path. The MapDocument object does not respect workspaces. http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00s30000000r000000
... View more
06-18-2012
08:17 AM
|
0
|
0
|
1360
|
|
POST
|
How far off are we talking? Meters? Kilometres? Your projection sounds like a local system, do you require a grid loaded to complete a transformation? I recall in 9.3.1 you would not get a warning if you were doing a projection with missing transformation files and would simply project it using whatever default.
... View more
06-15-2012
10:01 AM
|
0
|
0
|
1288
|
|
POST
|
Is there any problems with doing this? I take all files associated with a asc or tif and use shutil.copy2. They seem to come out alright but just wondering if I am missing anything behind the scenes? I went this route as I was having trouble using the ListRasters tool efficiently, it would take minutes just to list the rasters I want in my source directory of 14K rasters. I switched to os.listdir to get all the files matching the names I want and is much faster.
... View more
06-14-2012
12:41 PM
|
0
|
3
|
2460
|
|
POST
|
in_memory workspace is in memory with a temporary reference to a directory on disk. It should disappear once you close the process it was opened in.
... View more
06-12-2012
11:12 AM
|
0
|
0
|
2051
|
|
POST
|
You are referencing layer files that were never created it looks like. MakeFeatureLayer creates a temporary layer in memory, not a layer file.
... View more
06-12-2012
10:33 AM
|
0
|
0
|
3973
|
|
POST
|
If you are executing the script from the system it requires UNC paths as opposed to mapped drives if you are referencing those.
... View more
06-12-2012
08:40 AM
|
0
|
0
|
2727
|
|
POST
|
If you go into your geoprocessing dropdown menu and click "Results" find the error for the tool you are running and open the Messages tab to see if there is anymore useful information. You can also copy out the python snippet of the tool and paste it somewhere to see what is being passed into the tool.
... View more
06-12-2012
08:27 AM
|
0
|
0
|
1628
|
|
POST
|
Probably not the best solution, but this should keep your loops running even if an individual iteration fails. for fc in FcList:
try:
areaTab1 = "Metrics_" + os.path.basename(fc)
for field in FieldList:
arcpy.AddField_management(fc, field, "DOUBLE")
TabulateArea(fc, "GID", LC, "Class", areaTab1 , 1) #"UTC_Metrics_" + os.path.basename(fc)
arcpy.JoinField_management(fc, "GID", areaTab1, "GID", ClassList)#"trees11_tab_" + os.path.basename(fc)
rows = arcpy.UpdateCursor(fc)
print str(fc)
for row in rows:
try:
row.setValue(FieldList[0], (row.Shape_Area * m2ac))#Total Acres
rows.updateRow(row)
row.setValue(FieldList[1], row.getValue(ClassList[0]) * m2ac) #Forest Acres
rows.updateRow(row)
row.setValue(FieldList[2], (row.getValue(FieldList[1]) / row.Land_Acres) * 100) #Forest Percent
rows.updateRow(row)
row.setValue(FieldList[3], row.getValue(ClassList[1]) * m2ac) #Veg Acres
rows.updateRow(row)
row.setValue(FieldList[4], (row.getValue(FieldList[3]) / row.Land_Acres) * 100) #Veg Percent
rows.updateRow(row)
except:
pass
del row
del rows
except:
pass
... View more
06-12-2012
08:19 AM
|
0
|
0
|
3181
|
|
POST
|
Do you want your script to process that feature class at all if it doesn't have the required parameters? You could use a try/except block to exit that iteration and go to the next, or you could use a list field check on your feature class to compare against your list of fields that you want to be there.
... View more
06-12-2012
07:56 AM
|
0
|
0
|
3181
|
|
POST
|
Entering valid paths. http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//002z0000000r000000 Have you checked out Spatial Analyst? Since you set your workspace to "C:/Users/cgermain/Desktop/2050Maps" you can just do this. ExtractValuesToPoints ("10000Points_lyr.shp", "FORESTacumina", "FORESTacumina.shp","NONE","VALUE_ONLY") If that doesn't work I would try to test arcpy.Exists on each of those datasets in your workspace. arcpy.Exists("10000Points_lyr.shp")
arcpy.Exists("FORESTacumina")
arcpy.Exists("FORESTacumina.shp") And have you read the help on parameters for the tool you are using? http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//009z0000002t000000.htm
... View more
06-12-2012
07:36 AM
|
0
|
0
|
1628
|
|
POST
|
Either of these should work. "" or "#"
gp.SelectLayerByLocation_management(tableName_e_lyr, "intersect", tableName_vec_lyr, "", "ADD_TO_SELECTION")
gp.SelectLayerByLocation_management(tableName_vec_lyr, "intersect", gate_lyr, "#","REMOVE_FROM_SELECTION") Are you getting an error or anything when these execute? Or just unexpected behaviour?
... View more
06-12-2012
07:25 AM
|
0
|
0
|
2776
|
|
POST
|
# Make a layer from the feature class
gp.MakeFeatureLayer_management(gate, "gate_lyr")
gp.MakeFeatureLayer_management(tableName_e, "tableName_e_lyr")
gp.MakeFeatureLayer_management(tableName_vec, "tableName_vec_lyr")
print "Feature Layers created."
#Selecting the vectors that intersect the gate
gp.SelectLayerByLocation_management(tableName_vec_lyr, "intersect", gate_lyr)
# Add to selection, points that intersect with the previously selected vectors
gp.SelectLayerByLocation_management(tableName_e_lyr, "intersect", tableName_vec_lyr, "ADD_TO_SELECTION")
# Remove initial vector selection
gp.SelectLayerByLocation_management(tableName_vec_lyr, "intersect", gate_lyr, "REMOVE_FROM_SELECTION")
# Write the selected features to a new feature class
gp.CopyFeatures(tableName_e_lyr, tableName_sim) The feature layers are successfully created, and the first "select layer by location " works, but it doesn't seem to perform the 2 subsequent "select layer by location"'s. You need to use the proper syntax. SelectLayerByLocation_management (in_layer, overlap_type, select_features, search_distance, selection_type) http://webhelp.esri.com/arcgisdesktop/9.3/body.cfm?id=1877&pid=1865&topicname=Select%20Layer%20By%20Location%20%28Data%20Management%29&tocVisable=0 You are trying to insert "ADD_TO_SELECITON" in the search distance parameter.
... View more
06-12-2012
06:28 AM
|
0
|
0
|
2776
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 05-17-2011 10:36 AM | |
| 1 | 08-16-2012 10:48 AM | |
| 1 | 10-31-2012 08:39 AM | |
| 1 | 07-16-2012 01:52 PM | |
| 1 | 03-15-2012 10:57 AM |
| Online Status |
Offline
|
| Date Last Visited |
08-22-2024
11:12 PM
|