Skip to main content
Question

Merging different geometries into a single SHP

  • February 20, 2024
  • 6 replies
  • 299 views

boomer87
Contributor
Forum|alt.badge.img+5

Hello everyone!

New to FME here. I have a question regarding merging different geometry types into a single SHP. For example, for my scripts, I am converting over many features from a source DWG into a SHP. It seems to work correctly within FME Workbench where all features seem to be passed through into the SHP, but when I uploaded it onto FME Server to run on a nightly basis to update the resulting SHP, it states:
 


Is there an alternate workflow/transformer to implement that would ensure that different geometry types would be merged into the SHP? For example, I would want line, area and arc geometries to be merged into the final LANE WIDENING SHP. 

 

It seems to work when I run it and examine the SHP in the FGDB that I have created, but many warnings appear once the scripts are loaded up onto FME Server.

Any tips would be appreciated - thank you!

6 replies

dustin
Influencer
Forum|alt.badge.img+30
  • Influencer
  • February 20, 2024

Can you provide more information on ‘examine the SHP in the FGDB’? These are two different file formats. Generally shapefiles only support a single geometry per shapefile, so I’m a little confused on how you aren’t getting warnings from FME Form/Desktop.

Are you tied specifically to a shapefile output? A file geodatabase output would allow you to write multiple geometries to a single geodatabase.


nielsgerrits
VIP
Forum|alt.badge.img+53

This is not possible. These formats (shapefile / file geodatabase) only support a single geometrytype. Points, lines or polygons.


hkingsbury
Celebrity
Forum|alt.badge.img+51
  • Celebrity
  • February 20, 2024

You could also look at writing to three separate shapefiles, one for each geom type


boomer87
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • February 20, 2024

Got it! @dustin  Right now, I have two sets of scripts running. One that converts features from the DWG into SHP, then another script that takes that output of a SHP from the first script I posted about and imports it into a FGDB.

So the end goal is still a FC in a FGDB that would update whenever the features in the source DWG are updated.

I am not tied to a SHP if this isn’t necessary, as this was the only workaround that I could find that would enable me to run a script with the geometries combined (i.e. polyline, arc, area) into a single SHP then import it into an FC.


dustin
Influencer
Forum|alt.badge.img+30
  • Influencer
  • February 20, 2024
boomer87 wrote:

Got it! @dustin  Right now, I have two sets of scripts running. One that converts features from the DWG into SHP, then another script that takes that output of a SHP from the first script I posted about and imports it into a FGDB.

So the end goal is still a FC in a FGDB that would update whenever the features in the source DWG are updated.

I am not tied to a SHP if this isn’t necessary, as this was the only workaround that I could find that would enable me to run a script with the geometries combined (i.e. polyline, arc, area) into a single SHP then import it into an FC.

@boomer87 There’s no reason you couldn’t convert directly from DWG to FGDB with a single script/FME workspace. Whether you are going to shapefile or file geodatabase, you still have the same limitations with geometry storage. It’s just that the file geodatabase is arguably easier to manage due to it being a single database storing a feature class for each geometry, opposed to multiple shapefiles for each geometry.

The attached video might be beneficial. It’s dealing with DGN, but the same concepts.

 


boomer87
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • February 20, 2024

Thank you @nielsgerrits, @hkingsbury and @dustin for clarifying the limitations with mixed geometries.

@dustin, this video is very useful - thanks for this. It makes note of the fact that features within dwg/dgns are able to exist despite having different geometries, whereas the same is not the case with SHP/FGDB as you indicated.

If that’s the case, I’ll separate the different geometries into different feature classes and group them into individual groups within a map service based on specific layers. Have a great week everyone, thanks again!


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