hotosm / galaxy-api

Backend to fetch data from Underpass
https://galaxy-api.hotosm.org/latest/redoc
GNU Affero General Public License v3.0
14 stars 5 forks source link

Support Shapefile output Format in Galaxy API : Rawdata #199

Closed kshitijrajsharma closed 2 years ago

kshitijrajsharma commented 2 years ago

In export tool most of the people use Shapefile data type format, plan is to go one by one starting with Shapefile for now. This is targeted to redirect Shapefile output format to galaxy from export tool without any changes to frontend

ramyaragupathy commented 2 years ago

@itskshitiz321 - per chat w/ @robsavoye I understand you will start OGR python binding to provide SHP file output. Could you please confirm?

kshitijrajsharma commented 2 years ago

I have tested out popular OGR binding library Fiona, It is a clean Binding of OGR specifically focused on I/O operations of geospatial binaries for python developers ! So that we can do our manual steps as well with the help of it ! I have ogr2ogr command line functionality already implemented in API here,https://github.com/hotosm/galaxy-api/blob/1b44451ec17be763f6157bc0f92171b63de00b6d/src/galaxy/app.py#L863 with Fiona, it enables us to use python binding of ogr as well , Here this function uses clean ogr binding with Fiona https://github.com/hotosm/galaxy-api/blob/1b44451ec17be763f6157bc0f92171b63de00b6d/src/galaxy/app.py#L745