tordans left a comment (openstreetmap/openstreetmap-website#6234)

> MapLibre GL JS has built-in support for GeoJSON overlays, so we only need a 
> library for the conversion from that JSON format to GeoJSON, but not for the 
> overlay classes themselves. I know of three such libraries: osmtogeojson, 
> osm2geojson-lite, and osm2geojson-ultra. 

Or, we find a way to do the conversion to GeoJSON on the source: 
* For Overpass there is https://github.com/drolbr/Overpass-API/issues/761 but 
there is also 
https://github.com/drolbr/overpass-doc/blob/master/en/targets/formats.md which 
explains how to transform the overpass JSON output with `convert item 
::=::,::geom=geom(),_osm_type=type();`. We would have to test this against what 
osm2geojson does, though. 
* And for anything we server directly, something like a proxy in Rails that 
does the transformation would work. There are/where projects like this already 
https://blog.k-nut.eu/overpass-geojson-proxy and I think this would be a nice 
but small addition to our service area (AKA services that we offer). It would, 
hover, require us to find a shared way to define how what lines we consider an 
area. I see that osm2geojson-ultra does this [in a static 
file](https://github.com/dschep/osm2geojson-ultra/blob/main/src/polytags.json). 
iD and OSMCha use a different approach, AFAIK both 
https://github.com/ideditor/id-area-keys which is not updated ATM. Maybe we 
should try to revitalize this projects?

(Thanks for pointing out `osm2geojson-ultra`, did not know about that, yet.)

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/6234#issuecomment-3678580089
You are receiving this because you are subscribed to this thread.

Message ID: 
<openstreetmap/openstreetmap-website/issues/6234/[email protected]>
_______________________________________________
rails-dev mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/rails-dev

Reply via email to