-
-
Notifications
You must be signed in to change notification settings - Fork 46
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
Use flatgeobuf data extracts #1047
Conversation
@spwoodcock I have pushed minor fixes here. |
@spwoodcock , I can see that you have used get_data_extracts api for downloading the data extracts. But, I think we need to use osm-rawdata in this too since we will need to extract different data according to the category. Is there any reason you have used raw-data-api query directly? |
I commented on that in the original description, but that was how it was implemented until now. We had a function in crud to use osm-rawdata, but it was never actually used by an endpoint. I updated the existing code that uses raw-data-api to add the config param So basically we definitely want to update this to use osm-rawdata, but I wasn't sure if we need to update osm-rawdata to support adding the bind zip param first? (I hope it's quite simple to pass in the extra config. Originally we also had to consider adding auth to osm-rawdata too, but I worked it out with Kshitij so we don't need that anymore). |
I won't have time to fix the broken test or update to use osm-rawdata before the new year, so this will get merged in Jan (unless you are able to work on those @nrjadkry ) 👍 |
Note: modify to address #1056 |
d7bccaf
to
4a056e8
Compare
Fixes #934 and addresses part of #381 and #889
Updates
Custom data extract:
.fgb
is stored inpublic.projects.data_extract_type
(abusing this param for now, but it should be migrated topublic.projects.data_extract_url
eventually).OSM data extract:
project_id
param to return an already existing data extract URL.raw-data-api
. The URL to this extract is stored in our database./task_split
endpoint (eventually the splitting algorithm may accept flatgeobuf instead).Checks
Future updates
As a consequence of this big change, we need to update a few things.
Frontend:
Backend:
raw-data-api
directly.osm-rawdata
instead: project_crud.get_data_extract_from_osm_rawdata.bind_zip=False
param, then use the package instead.Note
We also need to consider regeneration of the extract, as it lasts 90 days.
This should be enough time for most projects, however if the user calls the
get_data_extract
endpoint and the extract is missing (deleted) a new file should be generated (already implemented).We just need to make sure this endpoint is called on the project detail page, to return the flatgeobuf URL and display it on the map.