Hexagon Geospatial
MENU

GeoMedia

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
Occasional Contributor
Posts: 18
Registered: ‎11-03-2016

How to implement Split Feature in own program

Hi,

 

I want to create an own program with Geomedia 14 functions, where I can make a script or algorithm, based on the Split Feature in Geomedia.
But I cannot find any objects in the Geomedia Object Reference for the solution.

I know about the two Break methods, but those are not good for the process.

 

My goal is to break polylines or areas, which cross themselves. And this works with the Split Feature in Geomedia. But I want to automate it in my program.
Sorry for my bad English!

Thanks,
Chris

Technical Evangelist
Posts: 532
Registered: ‎09-11-2015

Re: How to implement Split Feature in own program

Hi Chris,

 

there are basically two ways:

  1. Use SpatialIntersectionPipe and save the results into a table
  2. Use Topology Automation Objects. This is a little bit more complicated, on the other hand it gives you full control over the operations and their results.

Pavel

Occasional Contributor
Posts: 18
Registered: ‎11-03-2016

Re: How to implement Split Feature in own program

Hi Pavel,

 

I've already tried SpatialIntersectionPipe, but its not useful, because it requires two recordsets. I use one, containing the same one polygon object for the two inputs, but cannot select the right SpatialOperator for the expected result.

However, when I select this polygon in Geomedia Mapwindow, then select the Split Feature button, and then I draw a random line somewhere in the Mapview, Geomedia recognises that this polygon bends over itself, and it cuts this polygon into 3 pieces.
That is what I want to automate in my code. Split polygons that blended over itself...

Whit polylines, the same (and expected) thing happens, if I use the polyline's geometry for the SPlit Feature-(cutter)line. But I think I cannot copy this function with SpatialInterSectionPipe.
Any suggestions?

Chris

Highlighted
Regular Contributor
Posts: 207
Registered: ‎05-25-2016

Re: How to implement Split Feature in own program

Hi Chris,

 

if I understand you correctly, you would like to have the split command from GeoMedia Professional in the Essential tier?

I did that once by code with the Spatial Pipes from the GeoMedia API as Customcommand.

 

Two points were significant:

a) The split geometry has to be a polygon not a polyline (the reason relates to b)). Save this split geometry in an InMemoryRecordset (created with CustomDataPipe).

b) The spatial split operation fall in two parts: For the geometry splits inside the split polygon use a SpatialIntersectionPipe. For the geometry splits outside of the split polygon use a SpatialDifferencePipe.

 

The result of the spatial split operation is the union of the outputrecordsets of the two pipes.

 

I didn't find an easier solution if you use the existing pipe objects in the API.

Otherwise you have to implement the spatial intersection directly on the geometry elements. But for this case you can implement your own GIS ... Cat Happy

 

Best regards,

hesrah

Do you need immediate support?
If you encounter a critical issue and need immediate assistance please submit a Service Request through our Support Portal.