|
POST
|
Hi Mike You could use wildcards for the field names. Ex: fc = "Airports"
lstFields = arcpy.ListFields(fc, "addr*")
for field in lstFields:
rows = arcpy.SearchCursor(fc)
for row in rows:
print row.getValue(field.name)
del row, rows The above code will print values for fields with names addr, address, address_1, etc.
... View more
10-11-2012
12:54 PM
|
0
|
0
|
777
|
|
POST
|
Hi Crystal, Are you saving your MXD after you apply the change? Ex:
import arcpy
from arcpy import mapping
prjFile = r"C:\DATA\VECTOR\LOCAL\chester_county.prj"
sr = arcpy.SpatialReference(prjFile)
mxd = mapping.MapDocument(r"C:\temp\python\Airports.mxd")
for df in arcpy.mapping.ListDataFrames(mxd):
df.spatialReference = sr
mxd.save()
del mxd
... View more
10-11-2012
12:39 PM
|
1
|
0
|
1845
|
|
POST
|
You can unregister the mosaic dataset as versioned, and then add the additional raster datasets. First, you should execute a Compress, then execute the Unregister as Versioned tool. If you need to edit the footprints and then add new raster datasets often, take a look at Configuring an ArcMap edit session to perform nonversioned edits.
... View more
10-10-2012
05:09 AM
|
0
|
0
|
1629
|
|
POST
|
Hi Patrick, Do you receive an error when you attempt to disable editor tracking on the one feature class? How large is the File Geodatabase? If it is relatively small, can you copy/paste the feature classes into a new File Geodatabase to see if it exhibits the same behavior?
... View more
10-05-2012
11:26 AM
|
0
|
0
|
991
|
|
POST
|
Hi Jann, Change the following line: row.top = arcpy.GetRasterProperties_management(raster, "top") to: row.top = str(arcpy.GetRasterProperties_management(raster, "top"))
... View more
10-05-2012
10:39 AM
|
0
|
0
|
1995
|
|
POST
|
Hi Ryan, Are you copying a mosaic dataset from SDE into another instance of SDE? If you are, the overviews will automatically be copied. All you need to do is right-click on the Mosaic Dataset > Copy > right-click on the other SDE instance > Paste. During the paste, the dialog will report what is being pasted into the geodatabase. You will see 'AMD_<dataset name>_OVR'. This represents the Mosaic Dataset's overviews.
... View more
10-04-2012
02:50 AM
|
0
|
0
|
747
|
|
POST
|
Hi Nikhil, Is your Mosaic Dataset stored in SDE? If so, you'll have to register the footprint layer as versioned. After the mosaic dataset is added to ArcMap, you can run the Register As Versioned geoprocessing tool and select the 'Footprint' layer.
... View more
10-04-2012
02:41 AM
|
0
|
0
|
1629
|
|
POST
|
Try placing the field name in brackets. Ex: where = "[First Name] = 'Tom'"
... View more
10-02-2012
11:53 AM
|
1
|
0
|
899
|
|
POST
|
Hi Robert, Try changing your where clause to: where = "NAME = 'Tom'"
... View more
10-02-2012
02:49 AM
|
0
|
0
|
899
|
|
POST
|
Hi Irene, I would first make sure that you have the correct coordinate system for the shapefile. You previously stated that the coordinate system was undefined for both the shapefile and TIFF. How did you determine that WGS84 was the correct coodinate system? If the shapefile was created in another coordinate system, i.e. STATE_PLANE_83, but was defined to another, it will not display in the correct area. Here is a helpful link that will determine the coordinate system of the shapefile. Once you have the correct coordinate system of the shapefile, you can try defining the TIFF to the same projection and see if that overlays the two correctly. Also, does the TIFF file have a .tfw associated with it? You can check in Windows Explorer for this file. It will be in the same directory as the TIFF and have the same name, but just ends with a .tfw extension.
... View more
10-01-2012
05:35 AM
|
0
|
0
|
3465
|
|
POST
|
Hi Irene, You can georeference your raster dataset to overlay your shapefile: http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Georeferencing_a_raster_dataset/009t000000mq000000/
... View more
10-01-2012
03:21 AM
|
0
|
0
|
3465
|
|
POST
|
Hi Scott, Remove the extra lines after the last line in the text file and it should work.
... View more
09-28-2012
04:52 AM
|
0
|
0
|
1075
|
|
POST
|
Hi John, I don't believe you be able to use pop-up message box when executing the script from a toolbox. See the following post. One suggestion is you could create a check box within the tool to have the user specify whether the file exists. You can set up a Parameter as a Boolean data type. If the box is checked, have your code do something, if not, use the 'arcpy.AddMessage' to report that the user needs to download the files.
... View more
09-27-2012
09:22 AM
|
0
|
0
|
3645
|
|
POST
|
Hi Steve, Unique indexes are not supported on File Geodatabases. See the section Unique Indexes here.
... View more
09-27-2012
09:00 AM
|
1
|
0
|
2677
|
|
POST
|
Try the following: mxd = arcpy.mapping.MapDocument(r"Z:\02_GIS\Project\mxd\P01.mxd")
df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0]
for lyr in arcpy.mapping.ListLayers(mxd, "*", df):
if lyr.name == "_kabel":
lyr.replaceDataSource(r"Z:\02_GIS\Project\wektor", "SHAPEFILE_WORKSPACE", "P01_River")
mxd.save()
... View more
09-27-2012
06:26 AM
|
0
|
0
|
5175
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 3 weeks ago | |
| 4 | 05-07-2020 05:14 PM | |
| 1 | 03-25-2026 04:16 AM | |
| 1 | 03-16-2026 01:00 PM | |
| 1 | 12-22-2025 10:39 AM |
| Online Status |
Offline
|
| Date Last Visited |
yesterday
|