|
POST
|
The last line shouldn't be indented. Are you getting a syntax error or some other error? Also, what is the value of your input variable? Try using AddMessage to see if it is passing how you would expect it to.
... View more
09-10-2012
08:38 AM
|
0
|
0
|
2488
|
|
POST
|
Polygons require at minimum 4 points to create a triangle. The start and end points must be coincident to close the polygon. The polygon object won't "jump" from the last point to the first point to close itself. Edit: Ignore the above, I see you did that already. Seems like you are adding both polyline and polygon features to the same feature list and trying to copy them out at the same time. That seems to be the most likely issue. If you need to export both the polyline and polygon features you will need two separate copy feature calls.
... View more
09-06-2012
11:37 AM
|
0
|
0
|
2564
|
|
POST
|
Seems unnecessarily verbose. import arcpy as gp
gp.env.workspace = r"your_input_path"
feature_list = gp.ListFeatureClasses("*.shp", "Polygon")
out_fc = r"your_output_path"
gp.Merge_management(feature_list, out_fc)
... View more
09-06-2012
07:47 AM
|
0
|
0
|
1051
|
|
POST
|
The NaN values are there are placeholders for z and m values. Essentially it is a null.
... View more
09-06-2012
06:25 AM
|
0
|
0
|
2564
|
|
POST
|
Not recommended. Python is a dependency, there are several tools that will break if you remove Python.
... View more
09-06-2012
05:36 AM
|
0
|
0
|
4804
|
|
POST
|
SDE connection files are stored by default in your application data profile directory. 10.0 os.path.join(os.getenv("APPDATA"), r"ESRI\Desktop10.0\ArcCatalog") You can copy these to whatever directory you would like.
... View more
09-05-2012
01:23 PM
|
0
|
0
|
4992
|
|
POST
|
I don't think it should matter, but try 'arc' instead, all lower case.
... View more
09-05-2012
09:35 AM
|
0
|
0
|
2281
|
|
POST
|
As an example, this is how I export features from a coverage. I navigate to each coverage and make it my current workspace so I simply export by feature class name. covList = arcpy.ListDatasets()
for cov in covList:
arcpy.env.workspace = os.path.join(directory, folder, cov)
if arcpy.Exists("polygon"):
print "Converting", cov
arcpy.FeatureClassToFeatureClass_conversion("polygon", outPath, cov)
elif arcpy.Exists("arc"):
print "Converting", cov
arcpy.FeatureClassToFeatureClass_conversion("arc", outPath, cov)
... View more
09-05-2012
08:35 AM
|
0
|
0
|
2281
|
|
POST
|
Is this a line coverage or a polygon coverage? I'm assuming polygon since you talk about other features. Using the coverage toolbox, rebuild and/or clean it. Or if you are comfortable with ArcInfo Workstation you can try building and cleaning with that. Is this the only coverage you are having an issue with or is it every arc feature of all your coverages? Also, if you can post your code you are having problems with that would help.
... View more
09-05-2012
06:41 AM
|
0
|
0
|
2281
|
|
POST
|
Yep, manual exports work, only in ArcMap. All tools work through Model builder and as standalone tools, again only in ArcMap, not ArcCatalog... So in ArcMap you load the whole coverage and can export the arc, but in ArcCatalog you cannot navigate to the arc feature at all, is that right?
... View more
09-05-2012
05:53 AM
|
0
|
0
|
2281
|
|
POST
|
Can you do the export manually through ArcCatalog or ArcMap?
... View more
09-04-2012
02:53 PM
|
0
|
0
|
2281
|
|
POST
|
Using the following code, I get this error message: "TypeError: ListVersions: Could not open SDE Workspace." import arcpy,os #path to database connections path = "C:\\Documents and Settings\\jwinoker\\Application Data\\ESRI\\Desktop10.0\\ArcCatalog\\" dirs = os.listdir(path) #list of the full paths of SDE databases in Database Connections dbs = [(path + dir) for dir in dirs if dir.endswith(".sde")] for db in dbs: dbName = db.replace(path,"") print(dbName) #print a divider underneath the database Path print("-" * len(dbName)) #for each SDE database, creates a list of its versions versions = arcpy.ListVersions(db) for version in versions: print version # create whitespace between each database and list of versions print("\n") Have some problems with your paths I would think. Us os.path functions to properly define paths in python. Changing the red bold parts worked for me. import arcpy
import os
#path to database connections
path = os.path.join(os.getenv("APPDATA"), r"ESRI\Desktop10.0\ArcCatalog")
dirs = os.listdir(path)
#list of the full paths of SDE databases in Database Connections
dbs = [(os.path.join(path, dir)) for dir in dirs if dir.endswith(".sde")]
for db in dbs:
dbName = db.replace(path,"")
print(dbName)
#print a divider underneath the database Path
print("-" * len(dbName))
#for each SDE database, creates a list of its versions
versions = arcpy.ListVersions(db)
for version in versions:
print version
# create whitespace between each database and list of versions
print("\n")
... View more
09-04-2012
01:54 PM
|
0
|
0
|
934
|
|
POST
|
I don't know a lot about the European datums, but going from an old local to a recent world datum will offer many variations. Generally when going from a larger datum to a small datum the positions will shift towards 0,0. This may be more coincidental, I haven't worked out the math myself. Also, the terms GRS80 and WGS84 are not interchangeable, though the variations are insignificant for most applications. You can look up the details of the 7-parameter transformation in your documentation if you want some hard numbers. The XYZ shift for your transformation is this -89.5, -93.8, -123.1.
... View more
09-04-2012
05:57 AM
|
0
|
0
|
4084
|
|
POST
|
In the field calculator window there is a checkbox called show codeblock, that needs to be checked and your code needs to be split between the two boxes. If the example I sent you isn't working though I'm not sure what the issue is.
... View more
08-30-2012
01:40 PM
|
0
|
0
|
2640
|
|
POST
|
I'd remove your print statement. I'm not sure what that would do in a field calculator. Also are you using the advanced tab and calculating with python option? Try loading this and see if it does it for you.
... View more
08-30-2012
01:19 PM
|
0
|
0
|
2640
|
| 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
|