Skip to content
Snippets Groups Projects
Select Git revision
  • master default protected
  • feature/add-style-file
2 results

database-osmreplication

  • Clone with SSH
  • Clone with HTTPS
  • user avatar
    Cecilia Nievas authored
    e8396e99
    History
    Name Last commit Last update
    README.md
    mapping.yaml

    OSM-Replication Database Management

    This repository handles the structure and migrations in the osm_replication database. Data is imported from OpenStreetMap (OSM) using imposm3 using this configuration file and the imposm3 mapping schema.

    Database tables

    osm_building_polygons

    This table contains OSM polygons tagged as buildings, with a few exceptions (e.g. when it is specified that it is a bridge or a pier).

    The fields of the table are the following:

    column name data type description
    id integer Unique identifier
    osm_id bigint ID of the building polygon
    tags hstore Tags associated with the building polygon
    geometry geometry (Geometry, 4326) Geometry of the building polygon
    building varchar Value of the tag with key "building" associated with the building polygon

    osm_building_relations

    This table contains OSM relations associated with buildings. Each relation may be associated with one or more entries in this table. Each entry corresponds to a component (i.e. individual part) of the relation. If the component is a building polygon, the ID shown under member in the osm_building_relations corresponds to the ID shown under osm_id in the osm_building_polygons table.

    The fields of the table are the following:

    column name data type description
    geometry geometry (Geometry, 4326) Geometry of the building polygon
    osm_id bigint ID of the relation
    tags hstore Tags associated with the building polygon
    id integer Unique identifier
    member bigint ID of the component of the relation (e.g. osm_id of a building polygon)
    index integer The index of the member in the relation, starting from 0
    type smallint The type of the relation member: 0=nodes, 1=ways, 2=relations
    building varchar Value of the tag with key "building" associated with the member
    role varchar Role of the member within the relation (e.g. "part", "outline", "outer")

    osm_lands

    This table contains OSM polygons that possess tags of interest to define land use, such as landuse=forest or landuse=industrial and other OSM keys like "amenity", "leisure", "natural", "place", "tourism", or "wetland". As a condition, they must not contain the "building" tag.

    The fields of the table are the following:

    column name data type description
    id integer Unique identifier
    osm_id bigint ID of the land use polygon
    geometry geometry (Geometry, 4326) Geometry of the land use polygon
    name varchar Value of the tag with key "name" associated with the land use polygon
    key varchar Key of the tag relevant for the land use (e.g. "amenity" in amenity:university)
    type varchar Value of the tag relevant for the land use (e.g. "university" in amenity:university)

    osm_roads

    This table contains OSM linestrings tagged with the keys "highway" and "man_made".

    The fields of the table are the following:

    column name data type description
    id integer Unique identifier
    osm_id bigint ID of the road linestring
    geometry geometry (LineString, 4326) Geometry of the road linestring
    type varchar Value of the tag relevant for the road (e.g. "residential" in highway:residential)
    class varchar Key of the tag relevant for the road (e.g. "highway" in highway:residential)

    osm_spots

    This table contains OSM points ("nodes") with tags that indicate the existence of a point of interest for the population, such as a restaurant, a school, etc. The OSM keys included are "aerialway", "amenity", "building", "historic", "landuse", "leisure", "office", and "shop".

    The fields of the table are the following:

    column name data type description
    id integer Unique identifier
    osm_id bigint ID of the point of interest
    geometry geometry (Point, 4326) Geometry of the point of interest
    name varchar Value of the tag with key "name" associated with the point of interest
    key varchar Key of the tag relevant for the point of interest (e.g. "shop" in shop:butcher)
    type varchar Value of the tag relevant to the point of interest (e.g. "butcher" in shop:butcher)