Top Banner
Bridging the Gap: Using OSM Data with GIS Tools Jochen Topf Geofabrik GmbH
36

Bridging the Gap: Using OSM Data with GIS Tools · Bridging the Gap: Using OSM Data with GIS Tools Jochen Topf Geofabrik GmbH. Geographic Information Systems. ... WMS Web Feature

May 29, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Bridging the Gap: Using OSM Data with GIS Tools · Bridging the Gap: Using OSM Data with GIS Tools Jochen Topf Geofabrik GmbH. Geographic Information Systems. ... WMS Web Feature

Bridging the Gap:Using OSM Data with GIS Tools

Jochen TopfGeofabrik GmbH

Page 2: Bridging the Gap: Using OSM Data with GIS Tools · Bridging the Gap: Using OSM Data with GIS Tools Jochen Topf Geofabrik GmbH. Geographic Information Systems. ... WMS Web Feature

Geographic Information Systems

Page 3: Bridging the Gap: Using OSM Data with GIS Tools · Bridging the Gap: Using OSM Data with GIS Tools Jochen Topf Geofabrik GmbH. Geographic Information Systems. ... WMS Web Feature

You need to know about

4 concepts

to understandeverything about GIS

Page 4: Bridging the Gap: Using OSM Data with GIS Tools · Bridging the Gap: Using OSM Data with GIS Tools Jochen Topf Geofabrik GmbH. Geographic Information Systems. ... WMS Web Feature

1. Simple Features

Point LineString Polygon

Page 5: Bridging the Gap: Using OSM Data with GIS Tools · Bridging the Gap: Using OSM Data with GIS Tools Jochen Topf Geofabrik GmbH. Geographic Information Systems. ... WMS Web Feature

1. Simple Features

Point LineString Polygon

Page 6: Bridging the Gap: Using OSM Data with GIS Tools · Bridging the Gap: Using OSM Data with GIS Tools Jochen Topf Geofabrik GmbH. Geographic Information Systems. ... WMS Web Feature

1. Simple Features

Point LineString Polygon

MultiPoint MultiLineString MultiPolygon

Page 7: Bridging the Gap: Using OSM Data with GIS Tools · Bridging the Gap: Using OSM Data with GIS Tools Jochen Topf Geofabrik GmbH. Geographic Information Systems. ... WMS Web Feature

2. Layers

Page 8: Bridging the Gap: Using OSM Data with GIS Tools · Bridging the Gap: Using OSM Data with GIS Tools Jochen Topf Geofabrik GmbH. Geographic Information Systems. ... WMS Web Feature

2. Layers

Page 9: Bridging the Gap: Using OSM Data with GIS Tools · Bridging the Gap: Using OSM Data with GIS Tools Jochen Topf Geofabrik GmbH. Geographic Information Systems. ... WMS Web Feature

2. Layers

Page 10: Bridging the Gap: Using OSM Data with GIS Tools · Bridging the Gap: Using OSM Data with GIS Tools Jochen Topf Geofabrik GmbH. Geographic Information Systems. ... WMS Web Feature

3. Attributes

Name(String)

Type(Integer)

MaxSpeed(Integer)

Oneway(Bool)

Main St 3 50 false

High St 2 80 false

Foo Ln 3 30 true

OSM Cl 4 50 false

Page 11: Bridging the Gap: Using OSM Data with GIS Tools · Bridging the Gap: Using OSM Data with GIS Tools Jochen Topf Geofabrik GmbH. Geographic Information Systems. ... WMS Web Feature

4. Spatial Reference Systems (SRS)

Geographic Reference SystemGeographic Coordinate System

Map Datum

Page 12: Bridging the Gap: Using OSM Data with GIS Tools · Bridging the Gap: Using OSM Data with GIS Tools Jochen Topf Geofabrik GmbH. Geographic Information Systems. ... WMS Web Feature

WGS 84

Page 13: Bridging the Gap: Using OSM Data with GIS Tools · Bridging the Gap: Using OSM Data with GIS Tools Jochen Topf Geofabrik GmbH. Geographic Information Systems. ... WMS Web Feature

1. Simple Features

2. Layers

3. Attributes

4. Spatial Reference System

Page 14: Bridging the Gap: Using OSM Data with GIS Tools · Bridging the Gap: Using OSM Data with GIS Tools Jochen Topf Geofabrik GmbH. Geographic Information Systems. ... WMS Web Feature

Open Geospatial Consortium (OGC)opengeospatial.org

Open Source Geospatial Foundation (OSGeo)osgeo.org

Page 15: Bridging the Gap: Using OSM Data with GIS Tools · Bridging the Gap: Using OSM Data with GIS Tools Jochen Topf Geofabrik GmbH. Geographic Information Systems. ... WMS Web Feature

Open Geospatial Consortium (OGC)opengeospatial.org

Open Source Geospatial Foundation (OSGeo)osgeo.org

Standards

Open Source Software

Page 16: Bridging the Gap: Using OSM Data with GIS Tools · Bridging the Gap: Using OSM Data with GIS Tools Jochen Topf Geofabrik GmbH. Geographic Information Systems. ... WMS Web Feature

OGC Standards

Geography Markup Language – GML

Keyhole Markup Language – KML

Web Map Service – WMS

Web Feature Service – WFS

...

Page 17: Bridging the Gap: Using OSM Data with GIS Tools · Bridging the Gap: Using OSM Data with GIS Tools Jochen Topf Geofabrik GmbH. Geographic Information Systems. ... WMS Web Feature

Open Source Software

OpenLayersQuantum GIS, gvSIG, uDig

UMN Mapserver, GeoServerMapbender, MapFish, deegree

GRASSGDAL, OGR, GEOS, GeoTools

...

Page 18: Bridging the Gap: Using OSM Data with GIS Tools · Bridging the Gap: Using OSM Data with GIS Tools Jochen Topf Geofabrik GmbH. Geographic Information Systems. ... WMS Web Feature

Spatial Database

Page 19: Bridging the Gap: Using OSM Data with GIS Tools · Bridging the Gap: Using OSM Data with GIS Tools Jochen Topf Geofabrik GmbH. Geographic Information Systems. ... WMS Web Feature

Spatial Database

Page 20: Bridging the Gap: Using OSM Data with GIS Tools · Bridging the Gap: Using OSM Data with GIS Tools Jochen Topf Geofabrik GmbH. Geographic Information Systems. ... WMS Web Feature

Spatial Database

Geometric Types:

PointLineStringPolygon

...

Geometric Functions:

Centroid()ConvexHull()

Buffer()Contains()

Page 21: Bridging the Gap: Using OSM Data with GIS Tools · Bridging the Gap: Using OSM Data with GIS Tools Jochen Topf Geofabrik GmbH. Geographic Information Systems. ... WMS Web Feature

Filling the database:

osm2pgsql

Page 22: Bridging the Gap: Using OSM Data with GIS Tools · Bridging the Gap: Using OSM Data with GIS Tools Jochen Topf Geofabrik GmbH. Geographic Information Systems. ... WMS Web Feature

Tables:

planet_osm_pointplanet_osm_lineplanet_osm_polygonplanet_osm_roads

Page 23: Bridging the Gap: Using OSM Data with GIS Tools · Bridging the Gap: Using OSM Data with GIS Tools Jochen Topf Geofabrik GmbH. Geographic Information Systems. ... WMS Web Feature
Page 24: Bridging the Gap: Using OSM Data with GIS Tools · Bridging the Gap: Using OSM Data with GIS Tools Jochen Topf Geofabrik GmbH. Geographic Information Systems. ... WMS Web Feature
Page 25: Bridging the Gap: Using OSM Data with GIS Tools · Bridging the Gap: Using OSM Data with GIS Tools Jochen Topf Geofabrik GmbH. Geographic Information Systems. ... WMS Web Feature

UMN Mapserver

Web Map Service (WMS)

Web Feature Service (WFS)

Page 26: Bridging the Gap: Using OSM Data with GIS Tools · Bridging the Gap: Using OSM Data with GIS Tools Jochen Topf Geofabrik GmbH. Geographic Information Systems. ... WMS Web Feature

Filling the database:

Osmosis

Page 27: Bridging the Gap: Using OSM Data with GIS Tools · Bridging the Gap: Using OSM Data with GIS Tools Jochen Topf Geofabrik GmbH. Geographic Information Systems. ... WMS Web Feature

Tables:

nodes node_tagsways way_tags way_nodesrelations relation_tags relation_membersusers

Page 28: Bridging the Gap: Using OSM Data with GIS Tools · Bridging the Gap: Using OSM Data with GIS Tools Jochen Topf Geofabrik GmbH. Geographic Information Systems. ... WMS Web Feature
Page 29: Bridging the Gap: Using OSM Data with GIS Tools · Bridging the Gap: Using OSM Data with GIS Tools Jochen Topf Geofabrik GmbH. Geographic Information Systems. ... WMS Web Feature
Page 30: Bridging the Gap: Using OSM Data with GIS Tools · Bridging the Gap: Using OSM Data with GIS Tools Jochen Topf Geofabrik GmbH. Geographic Information Systems. ... WMS Web Feature
Page 31: Bridging the Gap: Using OSM Data with GIS Tools · Bridging the Gap: Using OSM Data with GIS Tools Jochen Topf Geofabrik GmbH. Geographic Information Systems. ... WMS Web Feature

PostGIS ExampleCREATE TABLE near_tram ( id SERIAL PRIMARY KEY);

SELECT AddGeometryColumn('near_tram', 'geom',4326, 'POLYGON', 2);

INSERT INTO near_tram (geom) SELECT ST_Buffer(geom, 0.002) FROM ways w, way_tags t WHERE w.id=t.way_id AND t.k='railway' AND t.v='tram';

Page 32: Bridging the Gap: Using OSM Data with GIS Tools · Bridging the Gap: Using OSM Data with GIS Tools Jochen Topf Geofabrik GmbH. Geographic Information Systems. ... WMS Web Feature
Page 33: Bridging the Gap: Using OSM Data with GIS Tools · Bridging the Gap: Using OSM Data with GIS Tools Jochen Topf Geofabrik GmbH. Geographic Information Systems. ... WMS Web Feature
Page 34: Bridging the Gap: Using OSM Data with GIS Tools · Bridging the Gap: Using OSM Data with GIS Tools Jochen Topf Geofabrik GmbH. Geographic Information Systems. ... WMS Web Feature

Shapefiles

near_tram.shp

near_tram.shx

near_tram.dbf

near_tram.prj

...

pgsql2shp shp2pgsql

Page 35: Bridging the Gap: Using OSM Data with GIS Tools · Bridging the Gap: Using OSM Data with GIS Tools Jochen Topf Geofabrik GmbH. Geographic Information Systems. ... WMS Web Feature
Page 36: Bridging the Gap: Using OSM Data with GIS Tools · Bridging the Gap: Using OSM Data with GIS Tools Jochen Topf Geofabrik GmbH. Geographic Information Systems. ... WMS Web Feature

Jochen [email protected]

www.geofabrik.detools.geofabrik.de

postgis.orgopengeospatial.orgosgeo.org

Alle Karten in diesem Vortrag sind Copyright 2009 OpenStreetMap Contributors. Lizenz: CC-BY-SA