New GitHub Repository : osm postgis scripts

Posted by baditaflorin on 12 January 2016 in English (English)

Openstreetmap Postgis Script Repository For Osmosis Pgsnapshot Schema - QGIS compatibility scripts

Github code here

Youtube tutorial here ( 4 minutes )

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.

3 Ways of making Postgis more easy to use with OSM data


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


  • You will find scope in the repo

II. A central place for osm-postgis-scripts

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

Bonus IV. Let`s use standards and templates so we can easily modify and create something new.

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, Clifford

Hide this comment

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)?

Hide this comment

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. it`s creating the database and then loading the file via osmosis.

You should be abla to make 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 script to allow replication, i did not test it yet, it would be a great addition

Hide this comment

Leave a comment

Parsed with Markdown

  • Headings

    # Heading
    ## Subheading

  • Unordered list

    * First item
    * Second item

  • Ordered list

    1. First item
    2. Second item

  • Link

  • Image

    ![Alt text](URL)

Login to leave a comment