Osm2pgsql: Unterschied zwischen den Versionen

Aus Geoinformation HSR
Wechseln zu: Navigation, Suche
Zeile 3: Zeile 3:
 
Siehe auch:
 
Siehe auch:
 
* [[OSM-Technisches]]  
 
* [[OSM-Technisches]]  
* [[PostGIS-Terminal]].
+
* [[PostGIS-Terminal]]
 +
* [[EOSMDBOne]]
  
 
osm2pgsql is mainly written for rendering data with data. So it only imports tags which are going to be useful for rendering. These tags are defined in the file 'default.style' ([http://svn.openstreetmap.org/applications/utils/export/osm2pgsql/default.style svn], [http://trac.openstreetmap.org/browser/applications/utils/export/osm2pgsql/default.style trac]). It also manipulates data for mapnik (i.e. placing nodes in the centre of gravity of polygons).
 
osm2pgsql is mainly written for rendering data with data. So it only imports tags which are going to be useful for rendering. These tags are defined in the file 'default.style' ([http://svn.openstreetmap.org/applications/utils/export/osm2pgsql/default.style svn], [http://trac.openstreetmap.org/browser/applications/utils/export/osm2pgsql/default.style trac]). It also manipulates data for mapnik (i.e. placing nodes in the centre of gravity of polygons).

Version vom 23. Juli 2011, 20:47 Uhr

Einer der beliebtesten "OSM-Daten zu PostgreSQL/PostGIS-DB" Converter und Loader. (Autor: jburgess777(at)googlemail.com).

Siehe auch:

osm2pgsql is mainly written for rendering data with data. So it only imports tags which are going to be useful for rendering. These tags are defined in the file 'default.style' (svn, trac). It also manipulates data for mapnik (i.e. placing nodes in the centre of gravity of polygons).

Installation

> osm2pgsql -d <pg_database> --hstore <osmdumpname.osm>
or
> osm2pgsql -c -d liechtenstein -U postgres -W -H localhost -P 5432 -s -k -x -p osm -S default.style ..\liechtenstein.osm.bz2
  • Everything will be automatic after that and the result is ready-to-use PostGIS tables '_point', '_line' and '_polygon' containing OSM data.

Output Database

Original-Dokumentation der Schemata von OSM und Osm2pgsql:

Overview with notes on the Osm2pgsql output schema (default.style):

  • Table group 'OSM original'
    • osm_nodes:
    • osm_ways:
    • osm_rels:
  • Table group 'Osm2pgsql':
    • osm_point: with point geometry
    • osm_line: with polyline geometry
    • osm_polygon: with polygon geometry (one of the unique features of Osm2pgsql!
    • osm_roads: a special table with polyline geometry