Question

Is FME the right tool to cluster objects on a cad plan and output the clusters to files?

  • 4 February 2023
  • 2 replies
  • 0 views

The attached plan is a sample of a longer street segment that was divided up so it would fit on a single sheet. Is it possible to identify and output the individual segments and output each to it's own file (like jpg). In this sample the output would be 3 image files, each containing the 3 different street segments.


2 replies

Userlevel 3
Badge +26

Is there a common key or attribute among the features you want grouped? If so, you can use the fanout option on the writer to create images based on that value. Another way (if you don't have a common attribute value) would be to create an area feature within the CAD file that encompasses each group. In FME, you would separate those features and use a workflow similar to the screenshot below. The Counter will create a unique numbered attribute for each of the areas you've created. Then using a SpatialRelator, you can transfer that unique attribute to CAD elements within the area (making sure to use the Within spatial predicate and the Merge Attributes option) From there, you can use the _count attribute to fanout. In the fanout options, you would need to append '.jpeg'.image

Hello, My apologies for not making this clear: the plan itself was created in CAD, but I only have rasters with no underlying data. This is purely a image processing exercise. I can visually inspect the image and see where the breaks are in the street segments and I want to know if there is a CV tool (perhaps FME) that can emulate that. My best attempts are to create buffer bubbles around non-zero pixels within a certain tolerance. As long as intersecting bubbles are below the tolerance they merge. The end result in a bubble around each street segment because they usually have some minimum distance between them for readability. This method doesn't work great because the tolerance isn't consistent across all my plans. Thanks for your help.

Reply