GeoMedia Discussions

Search for an answer, post a question, or answer other users' questions in our GeoMedia support discussions. This discussion board is a great way to collaborate with industry peers around the world. It is intended for discussion and support of the GeoMedia Desktop and Add-on applications.
Showing results for 
Search instead for 
Do you mean 
Reply
Highlighted
Occasional Contributor
Posts: 53
Registered: ‎08-25-2017

How to "explode" a geometry collection into individual features?

If I have a feature that is made up by a geometry collection of several geometries and want to convert this into different individual features - one feature per geometry (I beleive this is called "Exploding feature" in some other applications). How do I best accomplish this in GeoMedia? Preferably "by hand", since the need occurs sometimes for the end user and needs to be easily accomplished.

 

The way I have figured out has been this:

  1. Select the collection geometry feature
  2. Activate the Split command.
  3. Use "By polygon"
  4. Draw an area around one of the geometries and double click to accept.
  5. Press OK on the two attribute dialogs.
  6. Repeat previous step for all the remaining parts of the geometry collection.

As an alternative to repeatedly draw polygons around the different geometries, I could use the option "By Existing Feature" in the split command, but then I still need to create the split polygons in advance.

 

Is there a better way? Or do we need a new "Explode" command in GeoMedia?

Highlighted
Occasional Contributor
Posts: 53
Registered: ‎08-25-2017

Re: How to "explode" a geometry collection into individual features?

I should probably add - the attributes from the original features needs to be copied to the new features.

Highlighted
Technical Evangelist
Technical Evangelist
Posts: 386
Registered: ‎02-03-2016

Re: How to "explode" a geometry collection into individual features?

No time to work it out in detail, and perhaps it won't fly anyway, especially since you're looking for an interactive (by hand) mechanism rather than one that performs it in bulk, but the GEOMETRIES expression function does this in the functional attribute system and it's interesting to consider how to leverage it.  For example, you could compute COUNT(GEOMETRIES(Input.Geometry)) to attach a geometry count to each feature, then create an attribute filter for those greater than 1.  Now run that query through another Functional Attributes query in which you actually generate new geometries via GEOMETRIES(Input.Geometry).  This is called an expansion function so it will generate new features, copying the attributes as you wish.  Use OTFC to dump those "exploded" features to a new table, delete the original collection features, then dump the new table results back into the original table to replace the deleted originals.  Complex, perhaps too much so for your purposes, but it feels like it would work.  - Hal

Highlighted
Occasional Contributor
Posts: 53
Registered: ‎08-25-2017

Re: How to "explode" a geometry collection into individual features?

Thanks Hal,

 

I figured Functional Attributes would be a possible way to accomplish this, but as you suspected... this workflow is too cumbersome for my users. My alternative way (splitting with polygons) is, despite its repeatadly moments preferably for them. But I will add the need for a "Explode" command as a product idea.

Highlighted
Occasional Contributor
Posts: 12
Registered: ‎03-22-2016

Re: How to "explode" a geometry collection into individual features?

Here is how I've done this in the past:

 

Select the geometry collection.  Use 'Select Set to Query' to make this collection query.

Use the resulting query as input the the GEOMETRIES functional attribute.

Output the result of the FA to a "dummy" feature class (I usually just create an Access warehouse for this).

Delete the original collection feature.

Select the features in the "dummy" features class using the legend, then do Change Feature Class and move them into the original feature.

 

Hope this helps.

Highlighted
Occasional Contributor
Posts: 53
Registered: ‎08-25-2017

Re: How to "explode" a geometry collection into individual features?

Thanks for the suggested workflows.
Unfortunately they are not fulfilling the need of a fast and easy-to-use command that my customers are asking for. I have therefor posted a product idea for a new command in GeoMedia: https://community.hexagongeospatial.com/t5/Product-Ideas/Explode-feature-command/idi-p/31120