Skip to main content
Solved

Allocating duplicate points and duplicate polygons

  • September 15, 2020
  • 9 replies
  • 73 views

simonhume
Contributor
Forum|alt.badge.img+2

Hi

I'm wondering if anyone can give some advice on the following;

If i have 2 simple tables;

One table with 2 records, captured as polygons against the same feature (a building outline); Each record has a unique reference

Another table, also with 2 records, but each captured as a point to represent an address; As with the polygon table, each record has a unique reference.

What i would like to do is allocate the unique reference from each point record to each of the polygon records

It doesn't matter which point reference gets allocated to which polygon record, I only need to be able to allocate.

I should add that the points lie within the polygons

Is this possible in FME? I'm thinking the SpatialRelator may work, but how would FME allocate one reference to another table and then perform the next allocation

thanks

Simon Hume

 

Best answer by simonhume

Good morning

i've finally managed to produce a dataset that combines the polygon data and the address data

In the end i did 2 simple workspaces;

The 1st workspace took the OS Mastermap Topo Line and Topo Area datasets to produce polygons using the Intersector and AreaBuilder Transformers

The 2nd Workspace took the Polygons from the 1st Workspace as well as address data for the whole area, then produced address using the SpatialRelator Transformer

I was then able to produce a final layer using a SQL query in MapInfo

Thanks to all who responded with suggestions as to how i could resolve this

View original
Did this help you find an answer to your question?

9 replies

ebygomm
Influencer
Forum|alt.badge.img+33
  • Influencer
  • September 15, 2020

Do the polygons have identical geometries? If so, I'd put them through the matcher to compare the geometries (unless you have some other way of identifying they are the same) followed by a counter with a group by of the "match_id". Then I'd use a spatial relator and build a list on each polygon of the point references that fall within it. Finally an attributecreator or a ListIndexer to use the count value to access the reference stored in one of the list elements.

Capture


simonhume
Contributor
Forum|alt.badge.img+2
  • Author
  • Contributor
  • September 15, 2020

Hi

the geometries of the polygons are exactly the same

I've just reconstructed your workspace, but it hasn't worked but i don't know why, so will have a look at it tomorrow

One question re the SpatialRelator. How do i set the 'Group by Mode'to Process at End (Blocking)?

 

thanks

 

Simon Hume

 


Forum|alt.badge.img+2
  • September 15, 2020

@simonhume​  is it always a pair of points and pair of polygons, or sometime one point and on polygon and another three of each?


simonhume
Contributor
Forum|alt.badge.img+2
  • Author
  • Contributor
  • September 16, 2020

@Mark Stoakes​  - No,it could be more, but it's always going to be a minimum of 2. It's actually Flats information, so the Polygon represents the Building and the Point contains the Address and other details. The Point has a unique reference, the UPRN, whilst the Polygon has a randomly generated id. I've received the data from a colleague and am trying to make it more useable before colleague have access to it.


ebygomm
Influencer
Forum|alt.badge.img+33
  • Influencer
  • September 16, 2020
simonhume wrote:

@Mark Stoakes​  - No,it could be more, but it's always going to be a minimum of 2. It's actually Flats information, so the Polygon represents the Building and the Point contains the Address and other details. The Point has a unique reference, the UPRN, whilst the Polygon has a randomly generated id. I've received the data from a colleague and am trying to make it more useable before colleague have access to it.

The workflow I suggested presumes that if there are 2 points inside the building polygon, there are always 2 building polygons, 3 points inside, 3 polygons etc.


Forum|alt.badge.img+2
  • September 16, 2020

@simonhume​  It seems that you could safely drop the duplicate polygons and then just match the addresses to the same polygon - unless there is a rule or criteria that you can use to choose a specific polygon to match an address, like the floor number or something


ebygomm
Influencer
Forum|alt.badge.img+33
  • Influencer
  • September 16, 2020
markatsafe wrote:

@simonhume​  It seems that you could safely drop the duplicate polygons and then just match the addresses to the same polygon - unless there is a rule or criteria that you can use to choose a specific polygon to match an address, like the floor number or something

If I'm reading correctly, each polygon has it's own reference and one point must be matched to one polygon, and the other point must be match to the other polygon (but which way round it is does not matter, i.e. point 1 can match to polygon A and point 2 can match to polygon B, or point 1 can match to polygon B and point 2 can match to polygon A, but point 1 and point 2 cannot both match to polygon A)


simonhume
Contributor
Forum|alt.badge.img+2
  • Author
  • Contributor
  • September 17, 2020
ebygomm wrote:

If I'm reading correctly, each polygon has it's own reference and one point must be matched to one polygon, and the other point must be match to the other polygon (but which way round it is does not matter, i.e. point 1 can match to polygon A and point 2 can match to polygon B, or point 1 can match to polygon B and point 2 can match to polygon A, but point 1 and point 2 cannot both match to polygon A)

@ebygomm​  - yes, that's it in a nutshell, apologies if it wasn't clear in my initial post of this enquiry.

The Polygon records are very basic, the important information is contained in the point dataset (address, UPRN etc). Therefore it doesn't matter which polygon is matched to which point.

 


simonhume
Contributor
Forum|alt.badge.img+2
  • Author
  • Contributor
  • Best Answer
  • October 21, 2020

Good morning

i've finally managed to produce a dataset that combines the polygon data and the address data

In the end i did 2 simple workspaces;

The 1st workspace took the OS Mastermap Topo Line and Topo Area datasets to produce polygons using the Intersector and AreaBuilder Transformers

The 2nd Workspace took the Polygons from the 1st Workspace as well as address data for the whole area, then produced address using the SpatialRelator Transformer

I was then able to produce a final layer using a SQL query in MapInfo

Thanks to all who responded with suggestions as to how i could resolve this


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings