Points to Line Tool not ordering correctly

989
6
09-01-2011 01:13 PM
RichardBaker
New Contributor III
Points to Line Tool in Data Management / Features is not sorting properly nor orienting vertices correctly. I have a points layer that I am using to create a line layer by sorting. I use the GPS_Time column as my sort perameter. I have also tried GPS_Second. It seems to be ignoring those sort columns and sorting by some unknown. It even is missing points in the original file. I have attached a points layer and associated PointsToLine layer to show the comparison.
Thank you
Richard
0 Kudos
6 Replies
XanderBakker
Esri Esteemed Contributor
Hi Richard,

That is an interesting case you have here. I�??ve tried to do it also and get the same result you have. Apart from the wrong order, and the missing points, ArcGIS seems to invent its own point locations! When you zoom to the lower left corner of the data, you�??ll see that the a vertex of the created line is between the points with FID 31 and 32. This happens at several locations.

I tried a workaround the sort order by adding X and Y columns and exporting the table to DBF. In Excel I sorted the data on the GPS_second field and saved the file. After adding it to ArcMap, I created XY Events and exported the layer to a featureclass (in a FGDB). Using this point featureclass in the Points to Line tool resulted in the proper order of the points, but still there are points missing and new locations created.

I seems to be related with the coordinate system. If you project the points to a projected coordinate system (like NAD_1983_UTM_Zone_15N) and then use the Points to Line tool, it will honor the sort field and the locations.

In 10.0 the results is correct (locations and sort order). The underlying script has been rewritten in 10.1 beta to implement the new da (data access) module. Apparently, there are some situations where it is not working correctly. Esri should look into this!

Cheers!
0 Kudos
DanPatterson_Retired
MVP Emeritus
By any chance is this thread related to this thread, re the sorting issue?
http://forums.arcgis.com/threads/36757-No-sort-option-in-the-DA-module-cursors
0 Kudos
DavidWynne
Esri Contributor
By any chance is this thread related to this thread, re the sorting issue?
http://forums.arcgis.com/threads/36757-No-sort-option-in-the-DA-module-cursors


Yes it is
-Dave
0 Kudos
DanLee
by Esri Regular Contributor
Esri Regular Contributor
Points to Line Tool in Data Management / Features is not sorting properly nor orienting vertices correctly. I have a points layer that I am using to create a line layer by sorting. I use the GPS_Time column as my sort perameter. I have also tried GPS_Second. It seems to be ignoring those sort columns and sorting by some unknown. It even is missing points in the original file. I have attached a points layer and associated PointsToLine layer to show the comparison.
Thank you
Richard


Thank you for reporting the problem and providing the repro data. We have resolved this problem in Points To Line for the upcoming Beta 2. Please use the attached pointtoline.py file to replace the one in your install folder ..\ArcGIS\Desktop10.1\ArcToolbox\Scripts. I have tested it with your data and received the correct result - a line following the GPS_Time order.

Thanks for testing!
0 Kudos
XanderBakker
Esri Esteemed Contributor
Great fix, works like a charm!
0 Kudos
DanLee
by Esri Regular Contributor
Esri Regular Contributor
Thanks for your confirmation on the fix.
0 Kudos