You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hope this is the right forum but I was hoping to suggest the ST_ForcePolygonCCW function to ensure the RHR (Right-Hand-Rule) is enforced on (Multi)Polygons.
The need for this arises when taking geometry that does not observe the RHR, turning it into Geojson and trying to render it on a map. Some renderers enforce RHR and others don't but will accept RHR geojson.
The below geojson, renders perfect on Mapbox but not my local map renderer.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi @Maxxen,
Hope this is the right forum but I was hoping to suggest the ST_ForcePolygonCCW function to ensure the RHR (Right-Hand-Rule) is enforced on (Multi)Polygons.
The need for this arises when taking geometry that does not observe the RHR, turning it into Geojson and trying to render it on a map. Some renderers enforce RHR and others don't but will accept RHR geojson.
The below geojson, renders perfect on Mapbox but not my local map renderer.
When I lint my Geojson I get the RHR should be followed error.
To fix my issue, I usually wrap the geometries in ST_ForcePolygonCCW before creating the geojson and everything works.
I hope this can be included in the roadmap for the next release.
Beta Was this translation helpful? Give feedback.
All reactions