Skip to main content

Folks,

I have a challenge and I'm not sure if FME has this capacity. I have some Mapinfo co-located points that need to be written as attributed blocks. This I know FME can do and I have done this successfully. Now the challenge has been set to come up with "placement rules" that "move" each block insertion such that it DOES NOT overlap its co-located partners.

As far as the logic is concerned what I would want to do is test each input object(point) to see if there are co-located points. Then based on the number of co-located objects loop through the objects placing them at some fixed incrementing\\decrementing Y(North South axis) coordinate.

eg var NumPoints = 5

for i = 2 to Numpoints

fetch rec(i)

insert block X,Y+(i*-10)

next

Is there any sort of construct that would support this?

I'm also aware I'd need a way to ensure I didn't test an already tested point and inserted\\offset block.

Any advice appreciated.

Hi @andyew,

 

 

Custom Transformers have the ability to loop, you could use a NeighborFinder and some tests along with an Offsetter to shift the locations. The NeighborFinder can give you distances (and direction) to it's nearest points. You can also set it to look for all points in a radius. You may not even have to do this in a loop - Check out the candidate only input mode: https://docs.safe.com/fme/2017.0/html/FME_Desktop_Documentation/FME_Transformers/Transformers/neighborfinder.htm

 

 

Alternatively you can use a PythonCaller if you know more specifically what you want to do.


Hi @andyew,

You may want to have a look at the FME Hub custom transformer CoincidentPointOffsetter. It may not offset the points exactly as you prefer, but if you Edit the transformer, you may find the logic of the transformers within it to be useful for your own solution. They are fully annotated for clarity.


Reply