as the title says: I want to draw (C#, WinForms application) adjacent polygons stored in an GIS-database (SQL Server 2012, geography-datatype). The data source is OpenStreetMap administrative boundaries (country / state / county borders).
I imported them into SQL as "MultiPolygons" myself, with correct represantation of areas and also cases of "stacked into holes of each other". I know how to draw them, including the holes, and also how to draw a nice darkened line along the border.
The images do look bad, especially in coastal areas with deep land inlets (think Norway) or when the border does "jiggle" around a little river between to shapes. What I would like to do is enhance the visual quality of the image.
I tried to use the "REDUCE" (or SIMPLIFY) method to get the number of points down to a reasonable amount before drawing, but that produces very rough and ugly borders and gives no better image.
Also, doing that to a number of adjacent shapes does open up "cracks" between them, or makes shapes overlap on some border pixels. That happens because the the REDUCE acted differently on the two shapes (although they share the same border originally).
What I read here is that I should first "BUFFER" the shape (with positive amount) to smooth, then "BUFFER" again with negative to go back to previous shape size, and then "REDUCE" to draw them - is that a good approach, does that "cracks and overlap" not happen then? Or is there something else I can try?
I guess I could use INTERSECT on the two shapes to get the common border between them as LINESTRING. That would mean I could work on the common border of two shapes just ONCE to keep it from "opening cracks".
But is there a way to then get "the rest" of the border of both shapes? DIFFERENCE of the polygon area and the line does not work (or does it?). I would need to transform the area down to a ring line first, but how?
If I went this way I am still stuck with ugly rough edges as I cannot BUFFER up and down on lines (or can I?).
أكثر...
I imported them into SQL as "MultiPolygons" myself, with correct represantation of areas and also cases of "stacked into holes of each other". I know how to draw them, including the holes, and also how to draw a nice darkened line along the border.
The images do look bad, especially in coastal areas with deep land inlets (think Norway) or when the border does "jiggle" around a little river between to shapes. What I would like to do is enhance the visual quality of the image.
I tried to use the "REDUCE" (or SIMPLIFY) method to get the number of points down to a reasonable amount before drawing, but that produces very rough and ugly borders and gives no better image.
Also, doing that to a number of adjacent shapes does open up "cracks" between them, or makes shapes overlap on some border pixels. That happens because the the REDUCE acted differently on the two shapes (although they share the same border originally).
What I read here is that I should first "BUFFER" the shape (with positive amount) to smooth, then "BUFFER" again with negative to go back to previous shape size, and then "REDUCE" to draw them - is that a good approach, does that "cracks and overlap" not happen then? Or is there something else I can try?
I guess I could use INTERSECT on the two shapes to get the common border between them as LINESTRING. That would mean I could work on the common border of two shapes just ONCE to keep it from "opening cracks".
But is there a way to then get "the rest" of the border of both shapes? DIFFERENCE of the polygon area and the line does not work (or does it?). I would need to transform the area down to a ring line first, but how?
If I went this way I am still stuck with ugly rough edges as I cannot BUFFER up and down on lines (or can I?).
أكثر...