|
POST
|
Relationship classes can only be created in the same geodatabase that contains the feature classes or tables. Therefore, the feature class, relationship class, and attachment table must reside in the same geodatabase.
... View more
09-08-2011
09:52 AM
|
0
|
0
|
605
|
|
POST
|
Open ArcMap and take a look at the very top left corner. It should read something similar to: Untitiled - ArcMap - ArcView Untitled = Map Document Name ArcMap = Product ArcView = License level Or you can go to Help > About ArcMap. This should also list the license type. If you are using ArcView you will not have the ability to create a geodatabase topology. There are 3 license levels for ArcGIS Desktop: ArcView, ArcEditor, and ArcInfo. You will need at least an ArcEditor license to create a geodatabase topology.
... View more
09-08-2011
08:04 AM
|
0
|
0
|
1467
|
|
POST
|
You can select all of the feature classes under the Contents tab within ArcCatalog and it will give you a count at the lower left of all the feature classes selected. However, this will not include feature classes within feature datasets. To get a count of both you may need to result to a python script. I've attached one here that you can use. Browse to the toolbox in the Catalog window, double-click the script within the Toolbox, and then browse to the File Geodatabase. The script will report how many feature classes exist within the geodatabase.
... View more
09-08-2011
07:31 AM
|
0
|
0
|
3312
|
|
POST
|
I highly recommend the class 'Introduction to Geoprocessing Scripts Using Python'. It gives a great overview of using python with ArcGIS and the new Esri-developed Python site package Arcpy.
... View more
09-02-2011
09:17 AM
|
0
|
0
|
2970
|
|
POST
|
You could write something similar to the code below. You will probably have to add a try/except clause to pass feature classes that do not contain the corresponding fields. import arcpy
from arcpy import env
env.workspace = r"C:\temp\python\test.gdb"
lstFCs = arcpy.ListFeatureClasses("*")
for fc in lstFCs:
rows = arcpy.UpdateCursor(fc)
try:
for row in rows:
if row.Value >= 0.0 and row.Value <= 0.2:
row.Class = 1
if row.Value > 0.2 and row.Value <= 0.4:
row.Class = 2
if row.Value > 0.4 and row.Value <= 0.6:
row.Class = 3
if row.Value > 0.6 and row.Value <= 0.8:
row.Class = 4
if row.Value > 0.8 and row.Value <= 1.0:
row.Class = 5
if row.Value > 1.0 and row.Value <= 1.2:
row.Class = 4
if row.Value > 1.2 and row.Value <= 1.4:
row.Class = 3
if row.Value > 1.4 and row.Value <= 1.6:
row.Class = 2
if row.Value > 1.6 and row.Value <= 2.0:
row.Class = 1
rows.updateRow(row)
except RuntimeError:
pass
del row, rows
... View more
09-02-2011
08:11 AM
|
0
|
0
|
1918
|
|
POST
|
You can use the python open function to accomplish this. You could write to a text file whether a script/tool was executed successfully or not. Below is an example. If the text file does not exist, it will automatically be created. import arcpy, os
from arcpy import env
env.workspace = r"c:\temp\python\test.gdb"
outtable = open(r"C:\temp\results.txt", "w")
try:
arcpy.FeatureClassToFeatureClass_conversion("Airports", env.workspace, "Airports2")
outtable.write("Converted successfully")
except arcpy.ExecuteError:
outtable.write(arcpy.GetMessages())
outtable.close()
... View more
09-02-2011
07:25 AM
|
0
|
0
|
2970
|
|
POST
|
By default, ArcSDE for Oracle stores text fields as nvarchar2. The maximum size for nvarchar2 is 2000. When a field is larger than 2000, SDE will convert the field to NCLOB. To avoid this issue you will need to update your dbtune table so that text fields will be converted to varchar2 rather than nvarchar2. To do this, export your dbtune table to a text file. Ex: sdetable -o export -f c:\temp\dbtune.txt -i sde:oracle11g -u sde -p sde@orcl Add a parameter UNICODE_STRING with a string value of FALSE under the DEFAULTS keyword. Save the text file and re-import into SDE: sdetable -o import -f c:\temp\dbtune.txt -i sde:oracle11g -u sde -p sde@orcl Now you can import tables into SDE with text fields of size 4000 and it will be varchar2 rather than NCLOB. Here is some further information on this: http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//002n00000067000000
... View more
09-01-2011
12:19 PM
|
1
|
0
|
5958
|
|
POST
|
You won't be able to add the point as a graphic, but you can add it as a shapefile/feature class using the PointGeometry class and the CopyFeatures_management function. Here is an example: import arcpy
from arcpy import env
env.outputCoordinateSystem = r"Coordinate Systems\Geographic Coordinate Systems\World\WGS 1984.prj"
env.workspace = r"C:\temp\python\test.gdb"
point = arcpy.Point(-97.36, 101.56)
pointGeometry = arcpy.PointGeometry(point)
arcpy.CopyFeatures_management(pointGeometry, "Hydrant")
... View more
09-01-2011
11:03 AM
|
0
|
0
|
1780
|
|
POST
|
You can do this by specifying an index value. Say, for example, you want to select the data frame called 'Philadelphia', and it's the 3rd data frame in your MXD. You would use the following: df = arcpy.mapping.ListDataFrames(mxd)[2] The first data frame in your MXD starts with index 0. Here is some further information: http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00s30000001p000000.htm
... View more
08-29-2011
11:55 AM
|
0
|
0
|
1510
|
|
POST
|
Here is a link to some ESRI training courses: http://training.esri.com/gateway/index.cfm?fa=search.results&searchterm=python+arcpy I highly recommend 'Introduction to Geoprocessing Scripts Using Python'.
... View more
08-29-2011
08:47 AM
|
0
|
0
|
938
|
|
POST
|
If you are using ArcGIS 10, the new Transpose Fields tool may be of some help.
... View more
08-29-2011
07:25 AM
|
0
|
0
|
736
|
|
POST
|
Here is an example on how to do this. The code uses the Summary Statistics tool to summarize the Area field in each polygon feature class within feature datasets, then writes the feature class name and Area sum to a previously created table. import arcpy
from arcpy import env
env.overwriteOutput = True
env.workspace = r"C:\MapsandGeodatabase\LocalGovernment.gdb"
arcpy.CreateTable_management(env.workspace, "AREA_SUM")
arcpy.AddField_management("AREA_SUM", "Name", "Text", "75")
arcpy.AddField_management("AREA_SUM", "SUM_Shape_Area", "Double")
for dataset in arcpy.ListDatasets("*"):
lstFCs = arcpy.ListFeatureClasses("*", "", dataset)
for fc in lstFCs:
desc = arcpy.Describe(fc)
if desc.shapeType == "Polygon":
rows = arcpy.InsertCursor("AREA_SUM")
row = rows.newRow()
row.Name = fc
sumArea = arcpy.Statistics_analysis(fc, "Stats", [["Shape_Area", "SUM"]])
rows2 = arcpy.SearchCursor(sumArea)
for row2 in rows2:
totArea = row2.getValue("SUM_Shape_Area")
row.SUM_Shape_Area = totArea
rows.insertRow(row)
totArea = 0
del row, rows, row2, rows2
arcpy.Delete_management("Stats")
... View more
08-26-2011
04:26 AM
|
0
|
0
|
938
|
|
POST
|
You could do this using a 'while' loop. Ex: x = 4
while x < 10:
lstRasters = gp.ListRasters("*" + str(x))
for raster in lstRasters:
print raster
x += 1
... View more
08-23-2011
07:05 AM
|
1
|
0
|
1034
|
|
POST
|
Sorry for the misunderstanding. Here is an example on how to change the layer names: import arcpy, os
from arcpy import env
from arcpy import mapping
env.workspace = r"C:\temp\python"
env.overwriteOutput = True
for (path, dirs, files) in os.walk(env.workspace):
for file in files:
if ".mxd" in file.lower():
mxd = os.path.join(path, file)
mxd = mapping.MapDocument(mxd)
for df in mapping.ListDataFrames(mxd, "*"):
for lyr in mapping.ListLayers(mxd, "*", df):
if " " in lyr.name:
lyr.name = lyr.name.replace(" ", "")
for lyr in mapping.ListLayers(mxd, "*", df):
if "," in lyr.name:
lyr.name = lyr.name.replace(",", "")
mxd.save()
del mxd
... View more
08-23-2011
06:24 AM
|
0
|
0
|
1523
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 03-25-2026 04:16 AM | |
| 1 | 03-16-2026 01:00 PM | |
| 1 | 12-22-2025 10:39 AM | |
| 1 | 01-20-2026 04:04 AM | |
| 1 | 12-29-2025 06:27 AM |
| Online Status |
Offline
|
| Date Last Visited |
18 hours ago
|