8000 GitHub - and01/OSMNames: Database of geographic place names from OpenStreetMap for full text search downloadable for free
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
/ OSMNames Public
forked from OSMNames/OSMNames

Database of geographic place names from OpenStreetMap for full text search downloadable for free

Notifications You must be signed in to change notification settings

and01/OSMNames

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

OSM Names

Database of geographic place names from OpenStreetMap for full text search downloadable for free. Website: http://osmnames.org

Target of the project

  • Downloadable gazeteer data a la GeoNames.org: http://download.geonames.org/export/dump/ but each record has bounding box and an importance rank known from Nominatim
  • Data are derived primarily from OpenStreetMap
  • The data format is simple to use tab-delimited text in utf8 encoding (as geonames.org). First line has column names.
  • Different type of records are stored in different files (download and index just what you need, sometimes you don't need POIs or addresses with house numbers)
  • Tight to the OSM2VectorTiles generator (class/type from vector tiles, exporting names available in vector tiles, regular diff updates possible)
  • Possible to generate from a country specific extract of Open Street Map (together with vector tiles)

Why to make this

  • Direct indexing via fulltext search engines (SphinxSearch, ElasticSearch, etc.)
  • Simple process to get a basic search in place names on a map within minutes
  • Downloading the basic gazeteer data from OSM in usable format is problematic now (a need to process large OSM Planet files)

Sample search server

Data format of OSMNames

*osm_id - MUST BE UNIQUE "DOCUMENT ID" accross complete database

display_name - exactly as in Nominatim (may be improved later)

*name (=utf-8)
name_en
name_de
name_es
name_fr
name_ru
name_zh

*class
*type

*north (=boundingbox)
*south
*east
*west

*lat
*lon

scalerank - we have it
place_rank - nominatim has it

importance - exactly as in nominatim calculated

country (=country code, ISO-3166 2-letter country code)

street=<housenumber> <streetname>
city=<city>
county=<county>
state=<state>
country=<country>

(= a la nominatim http://wiki.openstreetmap.org/wiki/Nominatim)

? timestamp - osm modification?

REMARKs:

  • Fields like housenumber and postalcode don't belong to this dataset. There's a dataset "OSM Adresses" for that.

Get Started

You need a complete OSM PBF data dump either from a country extract or of the entire world. Download the data and put it into the data directory.

wget --directory-prefix=./data http://download.geofabrik.de/europe/switzerland-latest.osm.pbf

Now we need to set up the database and import the data using the import-osm Docker container.

# This will automatically initialize the database
docker-compose up -d postgres

# Import the OSM data dump from the ./data folder
docker-compose run import-osm

Create the database schema.

docker-compose run schema

We can now export the ranked geonames and their geometries.

docker-compose run export-osmnames

Components

The different components that attach to the postgres container are all located in the src directory.

Component Description
postgres PostGIS data store for OSM data and to perform noise analysis
import-osm Imposm3 based import tool with custom mapping to import selective OSM into the database and reconstruct it as GIS geometries
export-osmnames Export names and their bounding boxes to TSV datasets
schema Contains views, tables, functions for the schema

About

Database of geographic place names from OpenStreetMap for full text search downloadable for free

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 53.6%
  • PLpgSQL 46.4%
0