I'm trying to create road Routes in ArcGIS, which traditionally have been created using workstation. I've managed to write a Python script to do this, however, unlike ArcInfo, the attributes MEASURELENGTH, LOWMEASURE and HIGHMEASURE are not automatically created as you could do with the WorkStation 'routestats' command.

Anyone know how to do this in ArcGIS or Python?

| improve this question | | | | |
  • Have you looked at the Linear Referencing tools in ArcToolbox? – Fezter Mar 12 '15 at 7:00
  • I don't use Low measure and High Measure unless they fall at the line ends. I only use from measure and to measure, which are !Shape.FirstPoint.M! and !Shape.LastPoint.M! and the measure length between the two is ABS(!Shape.LastPoint.M! - !Shape.FirstPoint.M!). I do use a formula for MMonotonicity to detect routes that are not continuously increasing and could adapt it to find the low and high measure if I wanted to (I don't). That formula is here: geonet.esri.com/message/196206#196206 – Richard Fairhurst Mar 12 '15 at 7:14
  • Have looked at the Linear Referencing tools - are using Create Routes and Calibrate Routes tools to create the routes. – Brett Coxhead Mar 13 '15 at 4:21
  • Following your lead @Richard, I looked into the arcpy.Geometry resources.arcgis.com/en/help/main/10.2/index.html#//… but haven't been able to successfully get, for instance, the polyline M geometry length, which I'm hoping would have returned the polyline route length (as opposed to the polyline arc length). I couldn't even get their code sample they have at the bottom of the page working - it said " 'Polyline' object has no attribute 'Length' ". – Brett Coxhead Mar 13 '15 at 4:38
  • How are you developing your code? The examples I have given work in the Field Calculator with the Python option. The example does not work in the field calculator and would only work in the Python window or in .py file run from Idle or another Python IDE. If you used Create Route and your measures should be continuously increasing, then my formula would work to get measure length as opposed to geometry length (i.e., if gaps were measured then that measure length is reported by the ABS(!Shape.LastPoint.M! - !Shape.FirstPoint.M!) calculation.) Length will only return geometry length. – Richard Fairhurst Mar 13 '15 at 6:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.