Skip to content

Switch HSLMapServer layers to pg_tileserv service #66

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
hbruch opened this issue Nov 16, 2024 · 14 comments
Closed

Switch HSLMapServer layers to pg_tileserv service #66

hbruch opened this issue Nov 16, 2024 · 14 comments
Assignees

Comments

@hbruch
Copy link
Contributor

hbruch commented Nov 16, 2024

Currently, stadtnavi still use HSLMapServer to generate vector tiles for weather stations.
This should be implemented via the new pg_tileserv service.

To use pg_tileserv,

  • the weathe rstations need to be imported regularly into the postgres database (e.g. via ogr2ogr, see e.g. this blog post) and
  • possible pg_tileserve needs some custom configuration

Note: roadworks vector tiles will be retrieved from mobidata, parking, sharing and stops layers are nowadays retrieved directly from OTP, charging stations via ocpdb. Switching the weather stations will turn hsl-map-server service obsolete so it should be removed.

@leonardehrenfried
Copy link
Contributor

I completely forgot everything about the weather feature so I dug through the ansible code and found out that the export to geojson that I set up in 2020-ish still works! https://api.dev.stadtnavi.eu/herrenberg/weather/weather.geojson

I will see if I can make ogr2ogr work.

@leonardehrenfried
Copy link
Contributor

leonardehrenfried commented Dec 4, 2024

Looking good.

Image

Frankly I can't believe how easy it was.

@leonardehrenfried
Copy link
Contributor

@stadtnavimanager
Copy link
Collaborator

@hbruch implementation in digitransit

@hbruch
Copy link
Contributor Author

hbruch commented Feb 3, 2025

While https://api.dev.stadtnavi.eu/herrenberg/weather/weather.geojson (and it's pendant at https://api.stadtnavi.de/herrenberg/weather/weather.geojson) are continuously updated, this is not the case for https://features.stadtnavi.eu/:

Image

Could you have a look again, please @leonardehrenfried?

@hbruch hbruch assigned leonardehrenfried and unassigned hbruch Feb 3, 2025
@hbruch
Copy link
Contributor Author

hbruch commented Feb 3, 2025

Looks like the issue is rather that features are not replaced but rather added for each import...

Image

@leonardehrenfried
Copy link
Contributor

Yikes!

@leonardehrenfried
Copy link
Contributor

Do you know how you can teach ogr2ogr to delete the old entries?

@hbruch
Copy link
Contributor Author

hbruch commented Feb 4, 2025

-overwrite should according to the docs be the option to go

@hbruch
Copy link
Contributor Author

hbruch commented Feb 4, 2025

updatedat still shows 2024-12-04(?)

@leonardehrenfried
Copy link
Contributor

Sorry, the vector tiles are cached by the browser. I think featureserver looks ok, doesn' it? https://featuredetails.stadtnavi.eu/collections/public.weather_stations/items.json

@hbruch
Copy link
Contributor Author

hbruch commented Feb 4, 2025

Another request: could you please use LAUNDER=NO as import option so that column case is preserved as was before? Currently import switch column names to lowercase requiring, besides changing the layer names, additional changes, which I'd like to avoid. Thanks

@leonardehrenfried
Copy link
Contributor

Does this make a difference? 3cef8db

@hbruch
Copy link
Contributor Author

hbruch commented Mar 13, 2025

Closing as completet

@hbruch hbruch closed this as completed Mar 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants