Question

Annotation to Polygon Attribute

  • 11 September 2013
  • 5 replies
  • 29 views

Hi everybody,

 

 

I'm a new-be to FME, but I suspect my issue regarding CAD to GIS is a simple one.

 

 

Context

 

 

I have a polygon areas in CAD that have a piece of text placed inside each of them. The polygons are ROAD SEGMENT AREAS and the text is ROAD SEGMENT TEXTS.

 

 

Goal

 

 

I want the ROAD SEGMENT TEXT to be an attribute of the ROAD SEGMENT AREAS polygons. As the road text is key field for table join, this is the necessary first step. If someone could recommend a polygon check routine before assigning attribute, that would be even better.

 

 

Appreciate any help in the manner; thanks for reading.

 

 

Jesse

 

GIS Technician / DBA

 

Town of Sidney, BC, Canada

 

 


5 replies

Userlevel 2
Badge +17
Hi Jesse,

 

 

If the position (coordinates) of a text feature is always inside of the associated polygon, you can use the SpatialFilter transformer to transfer attributes of the text to the polygon.

 

Send texts to BASE port, polygons to CANDIDATE port; specify "Yes" to "Merge Attributes" parameter of the SpatialFilter; then the features (polygons) coming from PASSED port will have attributes of the spatially associated text.

 

 

Additionally, if two or more texts may be associated to one polygon, consider using the SpatialRelator instead.

 

 

Takashi
Userlevel 4
Hi,

 

 

you do not specify which CAD software, but many formats do have an attribute that links the text labels to their geographic object. E.g. in Bentley MicroStation, the attribute is called either "igds_graphics_group" or "MSLINK", depending on how the drawing was made. The value will be identical for the geometry and the associated label, making it easy to join them together.

 

 

I suggest you look at the CAD drawing using the FME Inspector and see if you can find a common attribute between the label and the object it refers to. If you find one such attribute, you can easily join the label text with the geometry using a FeatureMerger in your workspace.

 

 

If you cannot find such a common attribute, you can use the SpatialFilter solution suggested by Takashi. Just be aware that it might give a lot of false positives if your CAD drawing is crowded.

 

 

David
Hi Takashi,

 

 

Thanks for getting me on the SpatialFilter.

 

 

I've applied topology checks for my polygon layer and fed it to the SpatialFilter. I also fed the text layer to the SpatialFilter. In revealing the right fields in the Reader and creating the corresponding ones in the Writer, I managed to accomplish what I set out to do.

 

 

Thanks for taking the time to respond; I really appreciate it. Have a great day.

 

 

Jesse

 

 

 

 

 

 

 

 

Thank you also for the heads up David, I have noted your input, cheers.
Dan Iseminger, Product Specialist from Safe recommends PointOnAreaOverlay - will check this out as well to round out my knowledge base on the matter. Wow, you FME community folks, great bunch!

Reply