|
POST
|
Well if that is what your data actually is you have a pretty simple problem, you have your X and Y points reversed.
... View more
12-15-2011
07:19 AM
|
0
|
0
|
2463
|
|
POST
|
Project them to the same coordinate system, this is the only way to get accurate data. Not doing so I would construe as unethical or even fraudulent, depending on the sensitivity/importance of what you are managing. You are having problems because on the fly projections in scripting will use default transformations and not take into account where you are or what transformations are available (possibly this can change in 10.1 given their new management of coordinate systems, but I don't recall hearing anything about changes to transformations). Operating in WGS84 is a good solution, most other coordinate systems have solid transformations for going in/out of this system.
... View more
12-15-2011
05:37 AM
|
0
|
0
|
430
|
|
POST
|
May be obvious, but are you sure your data is in valid lat/long format? Negative to account for western hemisphere? If you could post your source table, that might help.
... View more
12-15-2011
05:30 AM
|
0
|
0
|
2463
|
|
POST
|
Did you check to make sure your point layer you create has the projection referenced correctly? I would try referencing the projection files directly, rather than copying them into your code.
CSwgs84 = install_dir+r"\Coordinate Systems\Geographic Coordinate Systems\World\WGS 1984.prj"
... View more
12-14-2011
11:43 AM
|
0
|
0
|
2463
|
|
POST
|
If they are spatially connected but separate features, Dissolve will solve this for you.
... View more
12-14-2011
11:37 AM
|
1
|
0
|
2433
|
|
POST
|
You're variables cannot use quotes as this would indicate a string instead of the variable you are trying to pass. inTest != "inTest"
... View more
12-12-2011
07:52 AM
|
0
|
0
|
742
|
|
POST
|
Try moving your workspace to something with a shorter path and no spaces.
... View more
12-06-2011
12:46 PM
|
0
|
0
|
1172
|
|
POST
|
Try executing the projection you want in Arc using the Project tool, and copy the python snippet after it is run to see where there are differences. Also, avoid using spaces in your file names or paths, that causes nothing but problems.
... View more
12-06-2011
12:35 PM
|
0
|
0
|
1172
|
|
POST
|
That's Einstein's definition yes. Try to copy and paste this in the ArcMap python window after a reboot. import arcpy
from arcpy import env
try:
mxd = arcpy.mapping.MapDocument("Current")
df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0]
Parcels = "parcels"
fc = arcpy.mapping.ListLayers(mxd, Parcels, df)[0]
f = open(r"Y:\Notification Radius Pkgs\Setup10\Test\Test.txt", 'w')
# Create a search cursor
rows = arcpy.SearchCursor(fc)
for row in rows:
f.write(str(row.getValue("OBJECTID")) + "\n")
f.close()
del row, rows
except Exception, e:
import traceback
f.close
map(arcpy.AddError, traceback.format_exc().split("\n"))
arcpy.AddError(str(e))
... View more
12-01-2011
11:41 AM
|
0
|
0
|
698
|
|
POST
|
If you are failing on this, rows = arcpy.SearchCursor("parcels")
for row in rows:
print row.getValue("OBJECTID") and "parcels" is a valid feature layer with OBJECTID as a field, you have some other environment problems outside of your code. Try rebooting your computer and running it again.
... View more
12-01-2011
11:31 AM
|
0
|
0
|
698
|
|
POST
|
Oh, your field limiters are taking out OBJECTID... rows = arcpy.SearchCursor(fc,"","","TOWNSHIP; RANGE; SEC; SUBCODE; BLOCK; LOT","") Oh sorry, after testing even that should work, I guess OBJECTID is protected from field limiters. Not sure what your issue is, works fine even with the non raw path and improper indentation.
... View more
12-01-2011
11:18 AM
|
0
|
0
|
1610
|
|
POST
|
It's hard to narrow down your error without the specific code you are using and error messages you are getting. If you are referencing an existing field, it should look like arcpy.CalculateField_management(mag_subset__2_,"RM_DATE_MODIFIED","!REPORT_DATE!","PYTHON_9.3","#")
... View more
12-01-2011
11:06 AM
|
0
|
0
|
1307
|
|
POST
|
Try posting your entire code, use code blocks, like this and hopefully we can get to the bottom of your problem.
... View more
12-01-2011
10:55 AM
|
0
|
0
|
2166
|
|
POST
|
Are you running this as a script tool or as a separate instance?
... View more
12-01-2011
10:10 AM
|
0
|
0
|
2166
|
| 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
|