bchapuis commented on PR #948:
URL: 
https://github.com/apache/incubator-baremaps/pull/948#issuecomment-2645112759

   > I tried to use the `simplify` method of `DouglasPeuckerSimplifier` in the 
`MultiPolygonDataType` class for simplification, but I couldn’t figure out 
where the simplification should be applied, so I couldn't implement it.
   
   I think the boundaries should be simplified using materialized views in the 
sql database with `st_simplifypreservetopology`. For instance, here are the 
simplifications applied to the natural layer (i.e. polygons).
   
   I think that on the java side, we should probably add logic to build complex 
geometries corresponding to Boundaries which are not necessarily MultiPolygons. 
For instance, these geometries may be MultiLineString or GeometryCollection. 
There is probably some [openstreetmap 
documentation](https://wiki.openstreetmap.org/wiki/Key:boundary) reading to be 
made as I'm not sure how communities create boundaries. According to the wiki, 
all types are involved (nodes, ways corresponding to lines, ways corresponding 
to polygons, and relations).
   
   ![Screenshot 2025-02-08 at 12 29 
55](https://github.com/user-attachments/assets/e11a2797-3f54-4bd0-af66-2f4f6a5b0325)
   
   As the name suggests, the current implementation of the 
`RelationMultiPolygonBuilder` probably miss the lines which are parts of 
boundaries, hence the discrepency when looking at the raster map. Maybe, we 
should introduce a new RelationBoundaryBuilder` that specifically focuses on 
creating geometries for boundaries and skip the other entities. This would 
allow to focus solely on this case.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to