|
|
Line 4: |
Line 4: |
| |Sources=https://en.wikipedia.org/wiki/OpenStreetMap, http://www.openstreetmap.org/ | | |Sources=https://en.wikipedia.org/wiki/OpenStreetMap, http://www.openstreetmap.org/ |
| }} | | }} |
− | == OSM in oedb == | + | == OSM in oedb<br/> == |
| | | |
− | OSM can be imported in PostgreSQL. <br/>The '''oedb''' has the schema openstreetmap. | + | OSM can be imported in PostgreSQL.<br/>The '''oedb''' has the schema openstreetmap.<br/> |
| | | |
| + | All keys and tags are stored in the '''tags '''column with format [https://www.postgresql.org/docs/9.6/static/hstore.html hstore].<br/>To query hstore is different but simple:<br/> |
| + | <pre>SELECT * FROM openstreetmap.osm_deu_point WHERE tags ? 'research_institution'</pre> |
| + | <pre>SELECT tags -> 'name' AS name, tags -> 'short_name' AS abbreviation FROM openstreetmap.osm_deu_point WHERE tags @> '"amenity"=>"research_institute"'</pre> |
| | | |
| | | |
− | The import is done with [https://github.com/openego/data_processing/blob/refactor/as-a-python-script/data_processing/tools/osm2pgsql/osm2oedb.txt osm2pgsql], [https://github.com/openego/data_processing/blob/refactor/as-a-python-script/data_processing/tools/osm2pgsql/oedb.style oedb.style] and [https://github.com/openego/data_processing/blob/refactor/as-a-python-script/data_processing/sql_snippets/setup_openstreetmap.sql setup_openstreetmap.sql] | + | |
| + | The import is done with [https://github.com/openego/data_processing/blob/refactor/as-a-python-script/data_processing/tools/osm2pgsql/osm2oedb.txt osm2pgsql], [https://github.com/openego/data_processing/blob/refactor/as-a-python-script/data_processing/tools/osm2pgsql/oedb.style oedb.style] and [https://github.com/openego/data_processing/blob/refactor/as-a-python-script/data_processing/sql_snippets/setup_openstreetmap.sql setup_openstreetmap.sql]<br/> |
Revision as of 14:23, 10 October 2016
Definition
[[GlossaryDefinition::1. OpenStreetMap (OSM) is a collaborative project to create a free editable map of the world. The creation and growth of OSM has been motivated by restrictions on use or availability of map information across much of the world, and the advent of inexpensive portable satellite navigation devices.[5] OSM is considered a prominent example of volunteered geographic information.]]
Abbreviation
OSM
Synonyms
Superterms
Subterms
Sources
https://en.wikipedia.org/wiki/OpenStreetMap, http://www.openstreetmap.org/
OSM in oedb
OSM can be imported in PostgreSQL.
The oedb has the schema openstreetmap.
All keys and tags are stored in the tags column with format hstore.
To query hstore is different but simple:
SELECT * FROM openstreetmap.osm_deu_point WHERE tags ? 'research_institution'
SELECT tags -> 'name' AS name, tags -> 'short_name' AS abbreviation FROM openstreetmap.osm_deu_point WHERE tags @> '"amenity"=>"research_institute"'
The import is done with osm2pgsql, oedb.style and setup_openstreetmap.sql