I have a data source, that sometimes returns geometries which are not properly cleaned e.g. enter image description here

the pink polygon is only 0.02 cm wide and is always on the edge of the whole geometry which consists of the brown polygon and the yellow one.

Is there a programmatic way I could prolong the yellow/brown border and with that line slice the pink one and merge the resulting two pink polygons to their neighbor?

So far I had to do this manually in QGIS using the vertex tool, but I would like to do this automatically using JTS or Geotools, as it is a bit time consuming.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.