Giter Club home page Giter Club logo

pgosm's Introduction

PgOSM: Making PostGIS + OpenStreetMap easier!

Welcome to the PgOSM project! The goal of this project is to make it simpler to load an OpenStreetMap .pbf file into PostGIS. Additionally, the resulting data structure provides spatial analysts easier access to open-source spatial data. One focus of this project is to be easy to setup and run on low-power (e.g. non-server) hardware. The target machine for this process is a virtual machine within a consumer-grade laptop given 1GB ram and a single core processor.

See included LICENSE file for more details about licensing.

How it Works

In a nutshell, the process looks like this:

  • Download OSM PBF file
  • osm2pgsql loads PBF -> Postgres
  • pgosm converts into user-defined layer tables
  • Happy spatial data analysis!

The pgosm database is intended to be short-lived, disposable, and not on a production server. This process trashes your I/O for a while, depending on your hardware and the size of the data being processed.

Using PgOSM

The RustProof Labs blog has a two-part post explaining how to load OpenStreetMap data to PostGIS using PgOSM

Why use PgOSM?

Before PgOSM

When data is loaded from osm2pgsql into your database you're left with a set of three (3) planet_osm_* tables split based on type of geometry, not by type of data.

  • public.planet_osm_point
  • public.planet_osm_line
  • public.planet_osm_polygon

This means that all the data representing waterways are found in the table public.planet_osm_line. So are all the roads, sidewalks, rivers, railways, and administrative boundaries. This setup makes it impossible for an analyst used to a properly normalized relational database to simply connect to the database and be productive.

After PgOSM

When pgosm runs it creates a schema named osm and loads layer-specific data into each table. The current default configuration generates 38 tables of logically grouped data. A few examples:

  • osm.road_line
  • osm.natural_point
  • osm.building_polygon
  • osm.waterway_line

The natural_point layer, for example, contains trees, peaks, and other items with nature-related tags in OpenStreetMap.

pgosm's People

Contributors

rustprooflabs avatar frogcat avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.