3

I currently have a long-running scrape that collects geojson data for Zürich bike-sharing. Each file is appended with a timestamp of when it was collected. The file structure doesn't change.

What's the best way to share multiple geojsons (timeseries)?

The data once packaged should be publicly available, but as individual files it's becoming cumbersome.


Some options I've considered

  • (current solution) One big folder in git, with individual files

    • (good) Can be viewed on the map
    • (bad) Needs to be downloaded all together as zip or git pull/clone
  • One big file with individual rows per geojson? e.g. jsonlines http://jsonlines.org/ (always updating)

    • (good) Easy to parse
    • (bad) Many versions of the same file will exist
  • Individual zips, based on time range? (no updates to historical files)

    • (good) easy to understand and access
    • (bad) takes time to package files

—-

Update:

Related question, but not a useful answer: https://gis.stackexchange.com/q/131920/112869

3
  • 1
    til about jsonlines....neat
    – albert
    Commented Mar 25, 2020 at 16:32
  • 1
    for the current solution, under bad, why do they have to be downloaded together? can't users just download from individual uri, like this: raw.githubusercontent.com/swiss-bike-data/…
    – albert
    Commented Mar 25, 2020 at 16:34
  • 1
    @albert if I host in a bucket, it works ok with gsutil, which has some rsync capabilities. But otherwise you’d have to list the folder and then download one by one. I assume most users want all files at once.
    – philshem
    Commented Mar 25, 2020 at 18:47

2 Answers 2

1

One possibility might be a Postgis server

Postgis is a Postgres extension that allows the storage and querying many types of GIS data including geojson. This would also allow you to store the data along with the timestamp for it's creation.

If you know the users who need to access the data you can create accounts for them and they can submit queries to the database using the api to download the data.

1

You probably want to use a GIS Server such as GeoServer for something like this. PostGIS will allow you to store the data or you can store it other ways with GeoServer.

https://geoserver.org

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.