Question

Working on a polygon road segmentation project. We are trying to find the best method to split very complex road polygons into almost equal length smaller polygons

  • 14 February 2022
  • 9 replies
  • 13 views

Badge

I think I've used QGIS to its limits and as far as I know ArcGIS don't have any tool different that might be of help for me. Since I've heard about it a a lot yet never used it, I thought FME might have more options to do what I need. If I can do what I've got in my mind I am going to purchase the required license.

 

Basically I've got a very large and complex polygon road network and my main target is to divide those polygons into smaller polygons with almost equal lengths. Also divide them vertically with a centreline if the width of the polygon is above a certain length. But complexity makes things really difficult.

 

In two separate questions, more details on this issue are available on gis stackexchange.

 

https://gis.stackexchange.com/questions/423160/how-to-subdivide-road-polygons-into-equal-distance-polygons-while-also-verticall

 

https://gis.stackexchange.com/questions/423773/subdividing-very-complex-and-big-road-polygon-data-into-almost-equal-sized-piece


9 replies

Badge +15

Hi @sanozmen​ ,

I would try with a combination of CenterLineReplacer + Chopper + Buffer (with None as End Cap Style). I just did a small test with a fake dataset and it doesn't look too bad, although you'll have to think of some logic to decide which sections to keep at the intersections:

CenterLineReplacer + ChopperOther transformers you might want to look at are the Clipper, Intersector and the Overlayers (AreaOnAreaOverlayer, LineOnAreaOverlayer, and so on).

 

Anyway, if you're looking for an excuse to get an FME license you don't need any. FME is really cool and everybody should be using it 😀

Badge

Hi @fgrion ,

 

Thanks a lot for your time and the solution offer. It seems like there are some different tools/algorithms in FME which might really help to me but I'm still very confused on what to do at complex intersections and traffic islands like the ones shown in the image attached. That's an screenshot from a sample result I created wit QGIS. But as you can see , when it comes to splitting the polygons at intersection, things get really messy. Actually this is the tidiest I can get with a lot of thinking and fine tuning. Yet it's hard to come up with a generic workflow which is applicable when there are too many different varieties of road intersections in a very large dataset. So, I'm really curious if there is anything in FME that can help with this complexity.

 

Screenshot_5

Userlevel 5
Badge +25

Just a thought... Take the output of @fgiron​'s suggestion, assign a unique id to each polygon (simply using a Counter for example), create centerpoints for the polygons and then Voronoi polygons from those centerpoints. Clip them with the original polygons, making sure to group by that unique id.

Badge +15

Great addition @Hans van der Maarel​ ! I did a test creating the centerpoints directly from the Chopper and I'd say it looks pretty well 😊

VoronoiDiagrammer

Badge +15

Ah, and obviously I also used FME to vectorise the image posted above ;-)

Badge

Thanks a lot both. My initial approach was more based on the creation of centreline as I was also hoping to use that centreline while dividing polygons vertically. However this method you both designed works like a charm. The only missing thing is that as a last step I'd like to divide those chopped polygons vertically based on the width of the polygon. If it is let's say wider than 7 metres than I should divide those polygons vertically along that road. If not, they will remain as they are. Do you think that this would require me to change the entire process you outlined above?

Badge +15

Hi @sanozmen​, the centrelines are the input of the Chopper above, you can still use them to divide the polygons. You can also calculate the width of the polygons via the centreline of their rotated bounding box, for example, or maybe a line perpendicular to the centreline. There's probably many ways to do it.

Badge

Hi @fgiron​ sorry my bad, I couldn't notice that. I've already installed FME guys thanks a lot again.

Userlevel 4
Badge +36

For (almost) rectangular shapes, I often approximate length and width from area and circumference:

Length: @Evaluate(@Length()/4 + @sqrt(@pow(@Length()/4,2)-@Area()))
Width: @Evaluate(@Length()/4 - @sqrt(@pow(@Length()/4,2)-@Area()))

(for polygons, @Length gives the circumference)

Only with these small objects, it's not always clear whether the length or the width of the object corresponds with the width of the road.

Reply