01-28-2019 01:42 AM
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!
01-28-2019 03:29 AM
there are basically two ways:
01-29-2019 11:48 PM
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.
02-04-2019 08:24 AM
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 ...