Select to view content in your preferred language

Code that Generates 3D Lengths for Route M Values

3433
10
10-27-2011 04:26 PM
RichardFairhurst
MVP Alum
In the Desktop forum this thread has code I have written to assign 3D Lengths to the M values of polylines that are both Z and M aware.  The code works but it is very skelatal and basic at this point.

I am looking for others interested in testing the code and offering comments on what user options should be added to the code.  For example, I could rewrite the code to work on a Feature Selection, or allow a user specified offset to the beginning measure, or give options for how gaps will be handled on multi-part routes.  Also the code needs a user interface.  I was thinking about an Add-In or if someone could help me do the basic function in Python it could be a geoprocessing script tool.

Please lend me your thoughts on how best to expand this functionality and more fully integrate the complete spectrum of a Route feature's geometry for analysis and real world uses.
Tags (1)
0 Kudos
10 Replies
RichardFairhurst
MVP Alum
Richard,

Thank you for contributing this add-in, however I cannot use it.  Have installed it, turned on extension, and turned on dialog no problem.  But the "Z and M Enabled Projected Layers" dropdown list remains consistently empty, even when I have perfectly good PolylineZM layers in my map that I would like to re-measure honouring the z values (i.e. in 3D).  Any idea why this is happening?  Using ArcGIS 10.0.5 at ArcInfo license level.  Have tried polylineZM input layers that are both file GDB feature classes and shapefiles.




First of all this thread is outdated and this was a known problem with the code referenced in this thread.  Try using the Add-in from this thread first.  If that does not work then provide the information below.

Are you sure the data is in a Projected Coordinate System, not a Geographic Coordinate System?  Only XY coordinates in Linear Units like feet or meters can be used, not coordinates in Angular Units like decimal degrees or radians.  I don't know how to work with those units for determining measure lengths.

If that is not the problem then what kind of data is it?  File Geodatabase, Personal Geodatabase, SDE, Shapefile?  There is separate code for each, since I have to be able to correctly detect the source in order to start or validate an edit session different ways depending on the data source.  So i need to know which you have tried to know what to test.  I personally prefer file geodatabases or SDE and did more testing on those than personal geodatabases or shapefile (which I personally avoid if at all possible).  Is the data local or on a network drive?  Anyway, all aspects of your set up could affect the code I need to examine.

What operating system are you using?  I have only tested it on a Windows NT machine, so I have not yet tested it against Vista, 7 or 8.  Some aspects of the code could be affected by the OS and I would have to research it.  Again, the code has to be able to initiate or validate that an edit session has started to work, and there are many variables.  Some database types are more dependent on OS subroutines than others.  I can try it on a Windows 7 machine next week, but it would be nice to know more about your configuration.

Anyway, I thought I had isolated the problem, but if not I have not yet been able to reproduce the problem so far.  I need more information, since it works with all of the test databases I have tried on my own system.
0 Kudos