Select to view content in your preferred language

Direction compressed geometry return rounded coordinates

998
2
09-20-2011 05:48 AM
DmitryAleshkovsky
Deactivated User
I have Route Task that return route and directions.
ArcGIS Server 9.3.1
When I compare coordinates in geometry from directions and coordinates from returned route, I found that coordinates in directions are rounded.
For example
1/ First geometry in directions (first start point)
    +1+8ml3h+6mgbr+0+0 (compressed geometry)
     x=9131121,y=7029115 (uncompressed coordinates)

2/ Route
Polyline:
Path0:[9131120,5196,7029114,5867],[9131712,0392,7028750,7598],[9131801,4032,7028661,28]...247 more...
First point have decimals.
x=9131120,5196, y=7029114,5867

any suggestions?


My goal is find the vertex number of all  stops in the route polyline

request
.../NAServer/Route/solve?stops=%7B%22features%22%3A%5B%7B%22attributes%22%3A%7B%22Name%22%3A%221%22%2C%22PointType%22%3A%22StopPoint%22%2C%22ReturnNumber%22%3A-1%2C%22NumVertex%22%3A-1%2C%22Status%22%3A%22Unknown%22%7D%2C%22geometry%22%3A%7B%22x%22%3A9131340.9466%2C%22y%22%3A7029490.0441%7D%7D%2C%7B%22attributes%22%3A%7B%22Name%22%3A%222%22%2C%22PointType%22%3A%22StopPoint%22%2C%22ReturnNumber%22%3A-1%2C%22NumVertex%22%3A-1%2C%22Status%22%3A%22Unknown%22%7D%2C%22geometry%22%3A%7B%22x%22%3A9184641.8256%2C%22y%22%3A7015380.9878%7D%7D%2C%7B%22attributes%22%3A%7B%22Name%22%3A%223%22%2C%22PointType%22%3A%22StopPoint%22%2C%22ReturnNumber%22%3A-1%2C%22NumVertex%22%3A-1%2C%22Status%22%3A%22Unknown%22%7D%2C%22geometry%22%3A%7B%22x%22%3A9209724.5922%2C%22y%22%3A6993433.567%7D%7D%5D%7D&barriers=%7B%22features%22%3A%5B%5D%7D&outSR=102100&ignoreInvalidLocations=true&accumulateAttributeNames=Minutes%2Cmeters&impedanceAttributeName=meters&restrictionAttributeNames=autos%2COneway&attributeParameterValues=&restrictUTurns=esriNFSBAllowBacktrack&useHierarchy=false&returnDirections=true&returnRoutes=true&returnStops=true&returnBarriers=false&directionsLanguage=en-US&outputLines=esriNAOutputLineTrueShape&findBestSequence=false&preserveFirstStop=true&preserveLastStop=false&useTimeWindows=false&startTime=&outputGeometryPrecision=9&outputGeometryPrecisionUnits=esriMeters&directionsTimeAttributeName=Minutes&directionsLengthUnits=esriNAUMeters&f=html
0 Kudos
2 Replies
DmitryKudinov
Regular Contributor
Hi Dmitry,

You are correct - geometry which comes with Route directions is slightly generalized and this is by design.

You can match Stops with Directions geometry by comparing the Stops' ArriveTime attributes against either ETA or Time attribute on the Directions items (set returnStops=true).

Hope this helps,
Dmitry
0 Kudos
DmitryAleshkovsky
Deactivated User
Thank you, Dmitry!
I'll try your solution. I got this problem only on 9.3.1 server. On AGS-10 directions returned with decimals in coordinates.  Maybe this is about different locale(Russian) on server: comma( ",") as decimal separator? But I changed locale settings for SOC user with no result.
0 Kudos