-
Notifications
You must be signed in to change notification settings - Fork 34
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
+ GeoJSON stats for exports #278
Conversation
Question : How do you think this gonna go to HDX for shapefiles and geopackage ? |
I have to check @kshitijrajsharma it depends on how that works. I think it's by exporting shapefile/geopackage from PostGIS using |
Yes correct , we are fetching directly from database ! Geojson is not popular for large files , shapefiles and geopackage is most downloaded one ! Yes we need to think a way for this ! May be do calculation in db level |
But for HDX we're creating exports for all formats together right @kshitijrajsharma? In that case we could generate the stats file once (when creating the GeoJSON export) and then attaching it to the other formats. Also, we plan to add part of these stats to the dataset's description in markdown format. |
Yes but not for all of the exports include geojson though ! We can further discuss on this ! |
Request for source code of |
Ok, so yes, a different strategy will be needed for other formats @kshitijrajsharma Source code for |
@kshitijrajsharma do you think we're ready to go with this one? it will provide optional metadata stats for GeoJSON exports, that's what we need now. Then I'll add the HTML version of the stats (#281) and transliterations (#280) |
One more : HDX exports are using custom snapshot endpoint , can you add test case for that one too ? With one sample hdx export |
I close this PR because I'm creating a new one that includes also HTML stats and transliterations. |
What type of PR is this?
What does this PR do ?
This PR adds a new file
stats.json
to the exported .zip when"include_stats": true
is in the request.For make this work, a new parameter
plugin_fn
was added to thequery2geojson
function.This function will be executed over every line of the resulting GeoJSON and can be used later to perform other actions like adding transliterations for names.
How to test ?
Send a request with
"include_stats": true
like this one:The resulting .zip file will include a
stats.json
file with statistics for tags.