Question

Polygon inside polygons

  • 20 February 2019
  • 4 replies
  • 76 views

Hello.

A relative beginner in FME that need help with the following.

I have two different types of polygons, one representing districts and one representing postal codes.

I want to find out what districts the different postalcodes belong to, the borders do not exactly match so I want postalcodes that appear in several districs, to display all the districsts they appear in, not only one.

I have tried in FME but have not gotten it to work,

I have managed to solve it in Arcmap but it then takes me quite a while. There I have to select one district, then got to select by location and select all postalcodes that intersect within the selected district. Export this as an own file and give all the postalcodes here a name of the district they appear in. Then redo this for every single district, and finally merge all these files.

Appreciate help.

 

Regards

Jonathan


4 replies

Userlevel 1
Badge +21

A clipper or spatial relator will give you this output in FME.

For the clipper, your districts will be the clipper and the postcode areas the clippee. You will want to merge the attributes if you want the postcodes to inherit the district name

 

A clipper or spatial relator will give you this output in FME.

For the clipper, your districts will be the clipper and the postcode areas the clippee. You will want to merge the attributes if you want the postcodes to inherit the district name

 

Worked like a charm. Thanks alot!

I was messing around with the areaonareaoverlayer.

 

Userlevel 4
Badge +25

I agree with @egomm - the SpatialRelator is the way to go here. The Spatial Predicates setting is where you define what sort of relationship (like intersects, contains, overlaps, etc). Use the Generate List option and you will get a list of the different districts each postcode overlaps. From there you can either concatenate that list into a single attribute (ListConcatenator) or split it up into a separate record (feature) per result (ListExploder).

Userlevel 4
Badge +25

I agree with @egomm - the SpatialRelator is the way to go here. The Spatial Predicates setting is where you define what sort of relationship (like intersects, contains, overlaps, etc). Use the Generate List option and you will get a list of the different districts each postcode overlaps. From there you can either concatenate that list into a single attribute (ListConcatenator) or split it up into a separate record (feature) per result (ListExploder).

But as soon as I posted that I see you have it working already! So all is good.

Reply