Skip to main content

Hi all,

I have a shapefile with roads and another shapefile with points that contain a field with the mileage of that roads, and I use the latter to calibrate the routes I create with the former in ArcMap.

Both shapefiles are related with IDs, so there is no risk of asigning a mileage point to the wrong road if it's not snapped to it.

My problem is that the mileage data of some points is out of place, for example you can find:

...42 - 43 - 44 - 0 - 45 - 46 - 47...

And that zero causes the calibrating tool to fail. I've tried to spot it so I can generate a new shapefile without the incorrect mileage points but it always returns me another points and I can't find a way to get it right.

Here is an example:

 

Gaps in the enumeration are not a problem, but some times there are not only one but a group of points out of place. For example :

...42 - 43 - 44 - 178 - 177 - 176 - 175 - 51 - 52 - 53...

In this case there would be no problem with the gap between 44 and 51. The numbers in between are the ones I would have to spot.

Notice that the growing/descending order of the wrong group of numers is random, so it doesn't have to be the same as in the main correct enumeration.

Here is another example. As you can see, roads are divided into sections and sometimes they do not connect with eachother:

And these would be the tables:

The first one is the roads:

- "id_vial" is the identifier of each road, and shared by all sections of a road

- "uuid" is the identifier for each road section

The second one is the mileage points:

- "id_porpk" is the identifier of each point

- "id_vial" is the field that relates each point to its correspondant road

- "numero" is the mileage value for each point

 

Also I attach a sample to test. Two shapefiles, one with a couple of roads with these two cases and the other with its correspondant mileage points.

 

Thank you all in advance for your answers!

I would only use the points and see which other points are in the neighboorhood grouped by id_vial and then search where the gaps are too great:


I would generate a measure on your line and then use a point on line overlayer, followed by a measure extractor to transfer that measure to the point data. You can then sort by the measure distance, and use adjacent attribute handling in an attributecreator to flag out of sequence points.

(The complication in your data is that the lines aren't drawn in the same direction as the points are numbered)


I'd suggest a geometric solution.

If you draw a line connecting the points having the number as y-coordinate and ordered along the corresponding line, the discontinuous points would form spikes like this.

You can then remove the spikes with the SpikeRemover.

This is a complete example: remove-spikes.fmwt (FME 2018.1.2)

Hope this helps.


I'd suggest a geometric solution.

If you draw a line connecting the points having the number as y-coordinate and ordered along the corresponding line, the discontinuous points would form spikes like this.

You can then remove the spikes with the SpikeRemover.

This is a complete example: remove-spikes.fmwt (FME 2018.1.2)

Hope this helps.

Nice, that gets round the issue with determining whether the numbers are increasing or decreasing along the line


Reply