Skip to main content

Hi,

I have a file of points which correspond to buildings. Each point or building has a number of apartments (total 9000). from this layer, I would like to create zones for every 500 apartments, without intersection. I tried the neighbor finder with sorter assending on the distance then range mapper attributes but the result is not good because I should not have any intersection between the polygons.

Help please :)

 

Thanks a lot

 

 

 

Hi @mohamedl​ thanks for your question! There is likely a number of ways you can achieve this with FME. Could you provide some sample data or maybe a screenshot of what your data looks like so we can have some idea of what you have and what you want the outcome to be?

Not knowing what your data looks like, the NeighborFinder is one way to group these features together, or you can create a new group attribute and specify how many features you want in each group with a GroupCounter custom transformer. If you have a common field to group by (i.e. groups of 500) then you might be able to dissolve or aggregate the features with the group by function. If you then want 'zones' or polygons that would encompass these features then I would use either a BoundingBoxAccumulator or a HullAccumulator depending on your desired output.

Let me know if this helps 🙂


Hi Evie,

I do have a similar question. I want to group points together firstly on a spatial basis, the group size do not need to be even because I also want to take into account a field (called NUMBER in the sample dataset) so the sum of this field for a defined group is the closest to 35.

In summary, I want to create non overlapping zones of cluster of point which are spatially closed where the field NUMBER of the point in each group is the closest to 35. I aggree that the BoundingBox Accumulor or the HullAccumulor would work for the zone but I have trouble to get the group of points.

I have attached a dataset so we can talk about the same thing.

 

Any help is greatly appreciated


Hi @Evie Lapalme​ ,

Is the PointClusterer not working anymore in FME 2022 (not upgraded for Python 3.6+)? It's clearly what I am aiming for.

Thanks for your help


Hi @Evie Lapalme​ ,

Is the PointClusterer not working anymore in FME 2022 (not upgraded for Python 3.6+)? It's clearly what I am aiming for.

Thanks for your help

Sorry @amy4810​ I didn't see your previous reply until you tagged me. This is an interesting problem!

I'm not sure this can be done natively in FME at this time, you might be able to use a Python or R library to do this for you. Unfortunately, the PointClusterer Hub transformer is not maintained by Safe Software but you might be able to use this transformer if you have FME 2020.2.4 or earlier. Although, I don't think this would be your answer either...I tried this with 2020.2.3 and got a sum anywhere between 2 and 99 for your attribute NB_OBJET. This transformer would be good if you wanted to prioritize spatial clustering, but if you wanted to prioritize the attribute weight/sum then I think there needs to be another method.

 

You can also submit an idea for this use case, or vote on this idea I found. Sorry I could not be of more help.


Hi @Evie Lapalme​ ,

Thanks for your help, I voted for your idea. Hopefully new development will go in that direction soon.


Hi @Evie Lapalme​ ,

Thanks for your help, I voted for your idea. Hopefully new development will go in that direction soon.

@amy4810​ hope so too! And in case you wanted to try out the PointClusterer I have created an updated version that you can use in 2022.2 (attached). Hope that helps as well 🙂


Hi @Evie Lapalme​ ,

Thanks for your help, I voted for your idea. Hopefully new development will go in that direction soon.

@amy4810​ hope so too! And in case you wanted to try out the PointClusterer I have created an updated version that you can use in 2022.2 (attached). Hope that helps as well :)

Hello @evieatsafe Please, could you attached here this new version of transformer?

 

Thanks in Advance,


Hi @mohamedl 
A very easy, no Python (hence no upgrade problems) way of clustering points is a point cloud coercion method. First, we combine the points into a single point cloud (PointCloudCombiner), and then coerce into multipoints with PointCloudToPointCoercer using one of three methods - Spatial Equal Points, Sequential Equal Points (needs sorting first), or Nested Equal Area (this one rather preserves the spatial size of clusters but will work with consistent density of points). Once we have groups of points, it is easy to build polygons (Bufferers, Intersectors, CenterlineReplacers etc).
See my old article here (scroll down until you see Poland, or read the whole blog for more ideas):
https://engage.safe.com/blog/2016/05/point-cloud-power/

Here is a screenshot of the workspace and the output:
 

Dmitri


Hi @Evie Lapalme​ ,

Thanks for your help, I voted for your idea. Hopefully new development will go in that direction soon.

@amy4810​ hope so too! And in case you wanted to try out the PointClusterer I have created an updated version that you can use in 2022.2 (attached). Hope that helps as well :)

I see the attachment was lost! I have reattached it here


Hi @Evie Lapalme​ ,

Thanks for your help, I voted for your idea. Hopefully new development will go in that direction soon.

@amy4810​ hope so too! And in case you wanted to try out the PointClusterer I have created an updated version that you can use in 2022.2 (attached). Hope that helps as well :)

I see the attachment was lost! I have reattached it here

Hi ​@evieatsafe ,

Can you attach PointClusterer again? The access was denied for me to download it.

Thank You! Best regards!


Hi ​@glpaulinoal I haven’t seen a permissions issue before, but it looks like it was a temporary issue on our side. You can try downloading it again, and let me know if the issue persists. 


Hi ​@glpaulinoal I haven’t seen a permissions issue before, but it looks like it was a temporary issue on our side. You can try downloading it again, and let me know if the issue persists. 

Hi ​@evieatsafe . Thank you for helping me. It was very important for my work. You were very kind.


Reply