Github code here https://github.com/baditaflorin/osm-postgis-scripts/tree/master
Youtube tutorial here ( 4 minutes ) https://www.youtube.com/watch?v=vhJQbKey9EI
The licence is AGPLV3+
Here at Telenav , in the Map Analyst Team we use Postgis a lot.
In the real world, Postgis and OpenStreetMap seems to be used more only in Academics or by people that know a medium or high degree of programming.
I think that we should change that and make more simple the availability of Postgis as a tool that can help us visualize information’s from the OSM database much faster.
# I. - SCOPE
For this i will release SCOPE ( databaSe Creator Osmosis Postgis loadEr ), a command line tool for easy loading of a osm.pbf file into Postgis, via osmosis
The idea is to have a central place were we can find different Postgis scripts, so when we want to do a statistic or something regarding the OSM data, to have a place were you can download, fork and store the scripts that you are using in your Projects
The same is when you want to make a map, visualize some things, etc
# III. Qgis + Postgis = Speed
Because people from different parts of the world can use the same script, this will mean that we can also use the same QGIS Style , so in the repo you can also upload your Qgis Style that you have used with one of the scripts, and even if i will work on a different country, i will use the same DB schema and the same script, so the style will be compatible to use.
Check it out here https://github.com/baditaflorin/osm-postgis-scripts/tree/master
I have made this example as a blueprint for creating a new sql script file.
Need input from you, how should we do with the names of the files, so that they respect some sort of standard
And also if people want to add a QGIS Style, to respect a format
If the sql script is called nodes_show_adresses.sql
the Qgis Style should be nodes_show_adresses_QGIS_description.eml
I am bad at the last part, so need your input so we can create something nice for the future.
Comment from Glassman on 14 January 2016 at 00:49
I’m looking forward to trying out your code.
Thanks for sharing,
Comment from Iyan on 8 March 2016 at 09:57
Thank you for sharing the code, is it possible to re-use Scope to update the database (ie. import daily changeset)?
Comment from baditaflorin on 8 March 2016 at 11:09
@iyan If you fork it and modify the code, i think you should be albe to do this.
scope.sh it`s creating the database and then loading the file via osmosis.
You should be abla to make scope.sh output a file with the database that you had created and the filename of the osm.opbf file that you used and then use osmosis code
I also think that you will need to change the scope.sh script to allow replication, i did not test it yet, it would be a great addition