GithubHelp home page GithubHelp logo

barrycug / everything-is-osm Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wilsaj/everything-is-osm

0.0 1.0 0.0 2.25 MB

Simple automated setup of PostGIS + OpenStreetMap data. More free time for your OSM community!

Makefile 12.16% Shell 87.84%

everything-is-osm's Introduction

Everything is OSM

Get started with PostGIS + OpenStreetMap data in minutes. Works on Windows, Linux, and Mac. More free time for your OSM community!

This project uses popular development and system configuration tools to build and configure a virtual machine, then download and import OpenStreetMap data extracts from mapzen and geofabrik.

Quickstart

Requirements

First, install recent versions of these:

Choose your extracts

Decide what part of the world you want to import data for. The metro extracts cover major metropolitan areas, and the geofabrik extracts cover countries and international regions.

Note: Larger volumes of data will take more time and might require more virtual machine memory to successfully import; see the section on customizing for instructions on how to increase the amount of RAM if that's happening to you. Also, extremely large amounts of data (larger than a few GB) are not currently supported.

Edit variables.yml so it contains the extracts that you want to include. For example:

metro_extracts:
  - "austin_texas"
  - "barcelona_spain"
  - "portland_oregon"

or:

geofabrik_extracts:
  - "south-america/ecuador"
  - "south-america/peru"

Get the party started

From the command line, just run vagrant up and give it a few minutes to do it does its thing. When it finishes running, a PostGIS database will be ready to go and loaded up with OSM data!

Everything is OSM

The PostGIS database will be available on localhost. For example, to connect to the database from Tilemill:

dbname=osm host=localhost port=5432 user=osm password=osm

Tilemill Screenshot

Or from QGIS:

QGIS Screenshot

Additional Usage

Customizing

The file variables.yml contains the database name, user and password (all default to "osm"), as well as port number (default 5432), and settings for virtual machine memory and number of cpus. Feel free to open up variables.yml and change any of these values. You will need to reload the virtual machine for settings to take effect.

Vagrant Basics

This project uses vagrant to manage the virtual machine. Vagrant provides a pretty simple interface. These are the most relevant commands:

vagrant up starts up the virtual machine and runs through the configuration and import scripts.

vagrant halt stops the virtual machine. This releases any RAM you've dedicated to the virtual machine. After this, the PostGIS database will not be available until vagrant up is run again.

Advanced Vagrant

vagrant reload restarts the virtual machine. It is equivalent to vagrant halt then vagrant up.

vagrant up --no-provision will skip the import phase. This will save time if data extracts have previously been imported and the virtual machine was stopped with vagrant halt.

vagrant destroy will completely wipe out the virtual machine. All the files and data on the virtual machine will be removed, including anything in the database. It is useful if you want to reclaim disk space or just start over from scratch.

vagrant provision will just run through the setup and import phase without stopping the virtual machine. This can be slightly faster than a vagrant reload if new extracts have been added to variables.yml and those need to be imported.

everything-is-osm's People

Contributors

wilsaj avatar jseppi avatar

Watchers

张宝才 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.