The support for parsing GeoJSON files on disk has been removed from the BaseMapper class and has been placed inside the main() function that is only used when running basemapper via the command line. The file is to be read and converted to BytesIO object, before passing through to the create_basemap_file function.
Changes
boundry variable is edited to accept str or BytesIO object as the input.
makeBbox Function has been edited so that it can hadle both str and BytesIO input.
main() function has been edited to support parsing GeoJSON files.
PR for outreachy Task
The support for parsing GeoJSON files on disk has been removed from the BaseMapper class and has been placed inside the
main()
function that is only used when runningbasemapper
via the command line. The file is to be read and converted to BytesIO object, before passing through to thecreate_basemap_file
function.Changes
boundry
variable is edited to accept str or BytesIO object as the input.makeBbox
Function has been edited so that it can hadle both str and BytesIO input.main()
function has been edited to support parsing GeoJSON files.Tests According to the guidance given in Basemapper allow for in memory BytesIO GeoJSON for boundary param the code was tested on below commands
pdm run python osm_fieldwork/basemapper.py -b -4.730494 41.650541 -4.725634 41.652874 -z 12-15 -s esri
pdm run python osm_fieldwork/basemapper.py -b yourbbox.geojson -z 12-15 -s esri