Closed SvenRoederer closed 3 years ago
The geometric type and query by bounding box is probably fine for our purposes. It doesn't have an exact "give me all nodes with max X meters distance", but as far as I can see even the original OWM didn't have that, and it's not really necessary.
We started a new implementation here: https://github.com/freifunk/openwifimap-api/tree/backend-rewrite-36c3 (which is just scaffolding at the moment; I'd probably use FastAPI rather than aiohttp these days, but it doesn't really matter).
The geometric type and query by bounding box is probably fine for our purposes. It doesn't have an exact "give me all nodes with max X meters distance", but as far as I can see even the original OWM didn't have that, and it's not really necessary.
Using the "CIRCLE-type" for this should work. Using an existing node as center and the distance as radius should do, inplace of the BBOX.
fixed in 13c379e
As stated in #9 the current API became unmaintained and was finally shutdown. @sarumpaet mentioned this was caused of required API-change to recent couchDB versions, which nobody was willing to do. @andrenarchy was this the only reason or are there additional ones?
@sarumpaet has the vision of switching to postgres-postGIS. This might be a way to go, as SQL has proven as a stable "API" in the last decades. Also running a postgresql database is more common than a couchDB. What's the advantage of using the postGIS extension inplace of native postgresql? I expect the native Postgresql support of geometric-data (https://www.postgresql.org/docs/12/datatype-geometric.html) will fit our needs also.
this seems to work with native Postgres already.
The compare operators can be found: https://www.postgresql.org/docs/12/functions-array.html