I want to know if simplification of orthogonal polygons can be done with OpenCarto Java Library. If yes, does it have any API documentation?
Cheers, Sanjeewa
|
I want to know if simplification of orthogonal polygons can be done with OpenCarto Java Library. If yes, does it have any API documentation? Cheers, Sanjeewa |
||||
|
|
|
Yes it is. Use the class ShortEdgesDeletion in the opencarto-algo module. You have to give as parameters the polygon you want to simplify, and the tolerance wall length (the algo tries to delete all walls shorter than this distance). The higher this distance is, the more the polygon is simplified. If you want more detail on the algo, let me know. It works mainly on polygons with squared angles. The whole API is there (I have just uploaded it - it is brand new!). Here is an output example, with different parameter values (black line is the initial, grey fill the final):
|
|||||||||
|