I have a dataset with 3000 polygons represting streets. Each street is divided into subparts and need a unique code to be assgined. The first part refers to the streetname and is the same for each subpart, 2nd part is a unique counter.
Image below shows my current (top) and wanted situation (bottom part).
Any support is appreciated!
Page 1 / 1
Potentially, you can use combination of SpatialSorter and Counter (groupBy: Street Name). However, this might not work exactly as you expect it. Specifically, consecutive numbers might not always be assigned to adjacent street parts.
@hvukasinovic thanks for your response! I tested the approach 5 min ago and the results are interesting but not good enough at the moment. The output of the SpatialSorter shows the 2nd street part as the 1st record in the table, thats not correct. It should be the first.
Is that orange line that you show in your first screenshot a real geometry? If so, you could use the MeasureGenerator and the LineOnAreaOverlayer to get the Measures on to the polygons. Then that gives you at least the order for the polygons, on which you can sort them. And then giving them a sequential number is easy, that would be just a counter.
Not tested this approach, but I think using dynamic segmentation you can get what you are looking for. Alternatively you could try playing with the LeftRightSpatialCalculator, but I’m not sure that’ll give you what you want.
@s.jager thanks for your reply, sounds good! I will give it a try once I am back on the project. For now we used a Python solution to get the job done.