|
POST
|
Here's an approach that may work for you. After you have a selected set of rows, you can run CopyRows, CopyFeatures, etc. # select no-matches
arcpy.AddJoin(tableview1,field1,table2,field2) # "KEEP_ALL" is the default
prefix = arcpy.Describe(table2).Name
strExpr = "%s.%s IS NULL" % (prefix,field2)
arcpy.SelectLayerByAttribute(table1,strExpr)
arcpy.RemoveJoin(tableview1,prefix)
# select matches
arcpy.AddJoin(tableview1,field1,table2,field2,"KEEP_COMMON")
prefix = arcpy.Describe(table2).Name
arcpy.SelectLayerByAttribute(table1,"0 <> 1") # select all
arcpy.RemoveJoin(tableview1,prefix)
... View more
08-11-2011
01:37 PM
|
0
|
0
|
2495
|
|
POST
|
It would be greatly appreciated if you would be willing to email me a copy for ArcGIS 10. Peter - please email me (contact info in in my sig below)
... View more
08-11-2011
12:34 PM
|
0
|
0
|
3303
|
|
POST
|
Hey Jamie - what's this (from your script tool): import gc
# ...
#enable garbage collection
gc.enable() Does this help with looping geoprocessing tools that seem to eat up memory and crash your session?
... View more
08-09-2011
11:31 AM
|
0
|
0
|
3303
|
|
POST
|
We recently published a toolbox (first prize at the ESRI UC 2011 AppFair!) that includes tools that do overlap processing for statistics and area tabulations, among other things. USGS Open-File Report 2010�??1268 National Water-Quality Assessment (NAWQA) Area-Characterization Toolbox By Curtis V. Price, Naomi Nakagaki, and Kerie J. Hitt http://pubs.usgs.gov/of/2010/1268/ The published version has only limited support for 10.x, but I have an updated version that will be posted there soon. If you are interested, let me know and I can send it your way.
... View more
08-09-2011
11:17 AM
|
0
|
0
|
3303
|
|
POST
|
You were very close! I didn't handle any metadata on the feature dataset itself; you could add that. import arcpy, sys
from xml.etree.ElementTree import ElementTree
from arcpy import env
env.overwriteOutput = True
env.workspace = r"D:\Lakeland_GIS\GDB\Lakeland\Lakeland.gdb\AddPoints"
AGSHOME = arcpy.GetInstallInfo("Desktop")["InstallDir"]
translatorpath = AGSHOME + r"Metadata\Translator\ARCGIS2FGDC.xml"
xmlfile = r"U:\my docs\GIS Projects\Python\Scripts\List Metadata\working_test.xml"
# list any standalone feature classes
fcList = arcpy.ListFeatureClasses()
fcList.sort()
for fc in fcList:
arcpy.ExportMetadata_conversion(fc, translatorpath, xmlfile)
tree = ElementTree()
tree.parse(xmlfile)
spot = tree.find("idinfo/descript/purpose")
print fc
print spot.text
# list feature datasets
datasetList = arcpy.ListDatasets()
datasetList.sort()
for dataset in datasetList:
print dataset
# list feature classes inside the dataset
fcList = arcpy.ListFeatureClasses("","",dataset)
fcList.sort()
for fc in fcList:
arcpy.ExportMetadata_conversion(fc, translatorpath, xmlfile)
tree = ElementTree()
tree.parse(xmlfile)
spot = tree.find("idinfo/descript/purpose")
print " " + fc
print " " + spot.text
... View more
07-29-2011
04:36 PM
|
1
|
0
|
2677
|
|
POST
|
I felt this was worth reposting this in its own thread here as we have seen this too. Up until yesterday everything was fine. I have no idea what setting changed, but I am getting the same window when I try to use any tool - "Navigation to the webpage was canceled" and then a "File Download" window pops up prompting me to open or save a file titled "MdDlgContent.htm" and MdDlgHelp.htm". I click cancel, but the tools just close and repeat the same thing when I try to open again. I am using ArcGIS 9.3.1 and can open all of my files just fine, add layers, but just can't use the Toolbox This fix is documented in KB article 38564: Problem: Opening a geoprocessing tool from ArcToolbox prompts to open or save file
... View more
07-29-2011
04:21 PM
|
0
|
1
|
718
|
|
POST
|
You really need to put these things in code blocks so we can see your loops. bbcode formatting: http://forums.arcgis.com/misc.php?do=bbcode
... View more
07-29-2011
12:27 PM
|
0
|
0
|
2677
|
|
POST
|
I'm not sure what use 42,000 excel tables will be to you, but you may be better off running your model from Python, without the overhead of the arcmap application.
... View more
07-22-2011
02:15 PM
|
0
|
0
|
574
|
|
POST
|
I don't know if this will help with your problem, but the strings "false" and "true" are both true: >>> bool("true")
True
>>> bool("false")
True
>>> You probably want to return python built-ins False or True: return True
... View more
07-22-2011
01:26 PM
|
0
|
0
|
771
|
|
POST
|
I have no idea as to the location where it was being saved In case you want to clean up, the outputs are probably still there in the current workspace (Spatial analyst toolbar - options). The default location is Windows TEMP.
... View more
07-22-2011
01:20 PM
|
0
|
0
|
1227
|
|
POST
|
How do I hard code in a projection, in this case wgs84, so it sets the projection after each ascii file is converted. I believe if you set the output coordinate system environment before you start creating rasters it will write that coordinate system to the output rasters. If that fails, you can allways use the Define Projection (management) tool. gp.outputCoordinateSystem = "GEOGCS['GCS_WGS_1984'," \
"DATUM['D_WGS_1984',SPHEROID['WGS_1984',6378137.0,298.257223563]]," \
PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]]"
... View more
07-20-2011
08:27 AM
|
0
|
0
|
599
|
|
POST
|
You may be at the mercy of the format of ENVI's .tif file output, in which case the best solution is to convert to grid -- the only sure way to control bit depth, etc. I highly recommend you take this to tech support. If the problem is on the ArcGIS side, this is the only way things like this get fixed.
... View more
07-20-2011
07:27 AM
|
0
|
0
|
1583
|
|
POST
|
Thanks for the response, and I see your point, but I'm coming in on a project where a ton of rasters have already been created as geotiffs, and I'd have to write a script to convert them, so... that seems excessively complicated, given the rasters I need to work with have already been created. The Copy Raster tool allows you to set a background and NoData value. However, this requires you to make a new raster. If you're using Arc 10, the batch conversion isn't too hard now that modelbuilder includes iterators. Another approach is to get and use USGS's Batch" rel="nofollow" target="_blank">http://arcscripts.esri.com/details.asp?dbid=15759]Batch Image Toolbox; chances are it will work fine with Arc 10, as it uses arcgisscripting.
... View more
07-19-2011
03:46 PM
|
0
|
0
|
4182
|
|
POST
|
That will work but I have negative values that I need to keep in the raster so getting rid of everything less than zero will not give the desired output. Arc 10: SetNull("MyRaster", "MyRaster", "Value = 0 OR Value = -9999") Arc 9.3 Single Output Map Algebra: setnull(myraster eq 0 or myraster eq -9999,myraster)
... View more
07-19-2011
03:34 PM
|
0
|
0
|
1583
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 08-11-2021 01:26 PM | |
| 5 | 12-10-2021 04:58 PM | |
| 1 | 02-27-2017 09:30 AM | |
| 2 | 12-04-2023 01:05 PM | |
| 1 | 04-12-2016 10:17 AM |
| Online Status |
Offline
|
| Date Last Visited |
06-19-2024
12:10 AM
|