3

All in all, I would describe myself as a QGIS (3.12.2) beginner and have now contact with GRASS (7.8.2) for the first time.

I want to simplify the boundaries of my polygons considering the topology. I came across v.generalize and did it with the following settings:

layer=1 type=area type=boundary method=douglas threshold=4000 look_ahead=7 reduction=50 slide=0.5 angle_thresh=3 degree_thresh=0 closeness_thresh=0 betweeness_thresh=0 alpha=1.0 beta=1.0 iterations=1 output=generalized

It actually looks exactly the way I want it to, except that some borders have been left out of the algorithm. I get the message: "8 boundaries were not changed because changes would damage the topology"

It doesn't seem to me that fundamental topology problems of my polygons are responsible for the error, because depending on the threshold value, more or less (and sometimes also other) boundaries are affected. But i could be wrong.

Could someone give me a hint where the problem could be and how I can solve it?

My ShapeFile via Dropbox: ShapeFile

problem issues with GRASS v.generalize

original data

7
  • Are there any sliver-polygons between the areas so that there would result new overlappings when generalizing? Did you check the layer for validity? In case you could share your data for the (original, not generalized) layer, that could help. – Babel May 4 '20 at 15:34
  • Did you set a v.in.ogr snap tolerance? If not you might try one. You might limit the tool to area input and output. – johns May 4 '20 at 16:07
  • With sharing the date I meant the original layer-data (Geopackage, ShapeFile or whatever you use), not an image file - on an image, you can't see geometry-errors and other problems – Babel May 4 '20 at 17:42
  • 1
    Suggestion: give a try to github.com/eurostat/RegionSimplify which should better handle complex topological situations – julien May 4 '20 at 20:35
  • With qgis:checkvalidity is everything fine. I had not yet set a snap tolerance, but my current attempts have so far not been successful. I will keep trying tomorrow. I attached my ShapeFile to the posting. – Johannes Wolf May 4 '20 at 20:37
1

Sorry, my orginal answer seems to have some problems as it happens to show a workaround (for the values I unintentionally used), but does not really adress the main problem. So what happened in your case is connected to be a problem described in the Grass manual

Simplification can fail for many boundaries if the simplification parameters would result in a large reduction of vertices. If many lines/boundaries could not be simplified, try different parameters that would cause a lower degree of simplification.

That seems to be the case whith those borders that did not change. I used in my first answer (see below) a max. tolerance value of 1000. This happened to give nice results and starting from this already generalized layer, I could further generalize. That is what you should do: just first generalize with 1000, than generalize the resulting layer again with 4000.


Original answer:

There were some geometry errors in your shapefile that I corrected using geometry cheker plugin (menu vector). As well, there were no useful information about the projection in your shapefile: when you open it with a basemap (like openstreetmap) does it lie exactly where Romania is?

I corrected the projection to EPSG 3844 (which seems to be the correct one) and saved the corrected Geopackage - you can download it here It's one simple file. Import it in QGIS: is it better like that? I used a max. tolerance value of 1000 in v.generalize.

corrected file

and still more generalized (with a setting of 10.000): more generalized

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.