Let's talk ordered points and lines

09-16-2021 10:45 AM
New Contributor II

I deal with a number of kinds of timed data.  In doing so, I have noticed some definite oddities in what that can look like.

The first (which, strictly speaking, was not a geoprocess, though I'd expect identical results if I called PointsToLines)  involved the path generated by a series of points.  The points were submitted to GeoEvent as a Polyline (via GeoJSON) consisting of one piece (ie: the array of arrays of points had one sub-array with all of the points).

After doing some testing, I realized the lines were split into multiple parts (sometimes as few as four, sometimes as many as 1500).  I eventually realized that the reason for this is that these paths often crossed, sometimes many times.

This led to a couple of problems.  1) The segments of the line were stored, it seemed, in a random order, so it was impossible (well, maybe not impossible, but certainly very, very difficult) to walk the points via the Shape field.  2) There were extra points, representing the intersections, so stats were misleading.

The second context for a problem was a result of projecting a path forward (using BearingDistanceAlongLine), and then generating points along that line to represent  time intervals.  That worked just fine until the line happened to cross the international date line, which resulted in the line being split into two pieces.  Again, the pieces seemed to be in random order (since this was only two pieces, the piece on the "far" side of the date line was first, with the line points in that piece also reversed, in at least one case).

And of course, when the line was split via GeneratePointsAlongLine, those points were in the same order as the points in the Shape of the polyline.  Again, difficult to walk them in time order.

Has anyone else run into either of these problems?

0 Kudos
0 Replies