pnorman/ogr2osm

add bounding box information

kfjahnke opened this issue · 0 comments

Hi all!
I'm processing shapefiles with org2osm to feed the resulting data to osmosis (to create an android map with the mapfile-writer plugin). I found that I needed to include bounding box information in the XML file to have it processed. I've modified ogr2osm to accept a parameter '--add-bounds', which makes the script add an XML element 'bounds', like

<bounds maxlat="46.432232" maxlon="8.332256" minlat="46.399087" minlon="8.285852"/>

I have a git branch here containing the changes which I'd push to the repo, but I don't have permission. I've attached my new version so you can check if you'd be happy with the changes - rather than doing it the long way by creating a pull request etc., you may find my contribution acceptable and take it in like that. You may use my code freely. I had to change the extension to .txt, since uploading .py files is not supported...
Kay
ogr2osm.txt