POST
|
I am using ArcGIS 10.0 with an ArcInfo license. The road network is for a region without much complexity, I'm looking for a barebones analysis of distances between points using the network. Not worried about hierarchy, restrictions, etc. right now.
... View more
06-13-2011
12:39 PM
|
0
|
0
|
251
|
POST
|
I have a feature class that is comprised of roads in a country. I've created a network that includes this feature class with the following relevant options: 1. Vertex connectivity (not end point). 2. No elevation modeling 3. Length as cost attribute is the only attribute 4. Global turns When I attempt to complete analysis tasks such as OD matrix or even Route, the only paths that are found are those where the points are on the same edge or on edges connected via endpoint. I've taken a good look at this and as soon as I place the next point of the route onto an edge that is joined by intersection, the error dialog pops up saying there is not path to that next point. What should I do next?
... View more
06-13-2011
11:00 AM
|
0
|
3
|
2418
|
POST
|
I found the problem (which was two-fold). First I was setting the x and y members of the new Point class, not the X and Y. Second, the script I referenced used row.shape = p to change the shape, while I was using row.setValue( "Shape", p). In my case, this caused a crash because Shape was not part of the UpdateCursor field, so I added Shape as a field. This now executes as expected. Why not a better error message when attempting to set a field via an UpdateCursor where the field was not selected? Why the difference between Point.x/Point.y and Point.X/Point.Y?
... View more
03-30-2011
06:43 AM
|
0
|
0
|
186
|
POST
|
I am attemping to snap points in a feature class to their nearest points on a line feature. See the code mentioned here: http://blog.rtwilson.com/how-to-snap-points-to-lines-in-arcgis-with-python/ I've been playing with this code in ArcGIS 10.0 with Windows 7 Enterprise 64 bit using the Python window where all the data is in a geodatabase. My problem is when the script gets to the iterative use of UpdateCursor to access the point feature to iteratively update the shape (with the new point), I get an error in execution. When I moved to trying to move through the loop I found that the code failed when trying to update the actual Shape field. In an attempt to debug this, I tried to manually access the point feature's shape object: # updated each point using a cursor
rows = arcpy.UpdateCursor( inputFeature, "", "", "NEAR_X, NEAR_Y" )
row = rows.next()
# attempt to access point object
p = arcpy.getValue("Shape") The last line will always crash ArcMap. I have attempted the following: 1. Check geometry 2. Repair geometry 3. Tried moving the cursor forward 6-7 times to make sure it wasn't a specific feature in the class that had the problem. None of these have yielded any result, attempts to access the Shape field programatically still cause ArcMap to crash. Where do I go next?
... View more
03-30-2011
06:06 AM
|
0
|
2
|
594
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|