Deadwood-ai / deadwood-api

Main FastAPI application for the deadwood backend
GNU General Public License v3.0
0 stars 0 forks source link

Add OSM admin-level tags #23

Closed mmaelicke closed 3 months ago

mmaelicke commented 3 months ago

closes #10

Lookup looks quite good. Finally found a way to download only the OSM tags, not the geometries, which made the query way faster (< 500ms instead of ~8sec).

It uses the name:en tag for admin_level=2 and the name tag is name:en is not present. For admin_lvl 4 and 8, name is always used. If admin_level=8 is not present, it will try 7 and 6.

This one only looks up the admin_level info, if the Metadata.admin_level_1 is not present in supabase. If the POST request contains admin_levels, these are used instead of a OSM level lookup.

Still have to test this on the database.