Upload
raj-singh
View
586
Download
2
Embed Size (px)
DESCRIPTION
An overview of new open geodata formats from OGC, including GeoPackage, OWS Context and Points of Interest (POI).
Citation preview
®®
copyright © 2014 Open Geospatial Consortium
GeoPackage, Context and POI, oh my!(and a sprinkle of GeoJSON)
new universal geodata formats
Raj Singh, PhDOpen Geospatial Consortium
OGC®
copyright © 2014 Open Geospatial Consortium
Why this presentation?
• Good time to survey the field of generic formats
• Great new options for sharing geodata– GeoPackage: great balance of simplicity and performance– POI: strong focus on hyperlinks/web connectedness– GeoJSON: only JSON game in town
• So let’s get started…
OGC®
copyright © 2014 Open Geospatial Consortium
GEOPACKAGE
OGC®
copyright © 2014 Open Geospatial Consortium
Why GeoPackage?
Shapefiles, as a format, are dinosaursweb services don’t work without internet access
internet sucks power from a mobile device
OGC®
copyright © 2014 Open Geospatial Consortium
Overview• A GeoPackage is a platform-independent SQLite
database file• A GeoPackage may contain
– Data in any geographic or projected CRS using any Datum– Vector Feature User Data Tables
• GP BLOB Geometry Binary Format containing WKB Geometries
• Linear 2D Geometries with optional elevation and measure values
– Tile Matrix Pyramid User Data Tables• PNG and JPEG Tiles• Zoom times two (adjacent zoom level pixel sizes)
• First open source implementation– https://bitbucket.org/luciad/libgpkg– A SQLite 3 extension that provides a minimal implementation– distributed under the Apache Software License version 2.0
OGC®
copyright © 2014 Open Geospatial Consortium
GeoPackage Tables for Features
• defines spatial reference systems
gpkg_spatial_ref_sys
• identifies user data tables
gpkg_contents
• ids feature geometries
gpkg_geometry_columns
• contain feature data
user_data_feature_tables
OGC®
copyright © 2014 Open Geospatial Consortium
GeoPackage Tables for Tiles
• defines spatial reference systems
gpkg_spatial_ref_sys
• identifies user data tables
gpkg_contents
• tile pyramid envelope
gpkg_tile_matrix_set
• describes tile zoom levels
gpkg_tile_matrix
• contain tile pyramids
user_data_tiles_tables
OGC®
copyright © 2014 Open Geospatial Consortium
SQLite command line example
• rajsingh$ gpkg World.gpkg SQLite version 3.8.1 2013-10-17 12:57:35libgpkg version 0.9.7Enter ".help" for instructionsEnter SQL statements terminated with a ";"
• GeoPackage> .tablesgpkg_contents gpkg_tile_matrix_metadatagpkg_data_columns rtree_world_shape gpkg_extensions rtree_world_shape_node gpkg_geometry_columns rtree_world_shape_parent gpkg_metadata rtree_world_shape_rowid gpkg_metadata_reference world gpkg_spatial_ref_sys
• GeoPackage> .schema worldCREATE TABLE "world" ( "COUNTRY" TEXT, "CAPITAL" TEXT, "POP_1994" INT, "POP_GRW_RT" DOUBLE, "POP_MALE" INT, "POP_FEM" INT, "POP_0_14" INT, "POP_15_64" INT, "POP_65PLUS" INT, "MALE_0_14" INT, "MALE_15_64" INT, "65PLUS" INT, "FEM_0_14" INT, "FEM_15_64" INT, "FEM_65PLUS" INT, "POP_URBAN" INT, "POP_RURAL" INT, "URB_MALE" INT, "URB_FEM" INT, "RUR_MALE" INT, "RUR_FEM" INT, "ARABLE_PCT" DOUBLE, "LITERACY" DOUBLE, "RATE" DOUBLE, "RATE0" DOUBLE, "GROWTH" DOUBLE, "CONTINENT" TEXT, "_id" INTEGER PRIMARY KEY AUTOINCREMENT , "shape" GeometryCollection);
• GeoPackage> select country,capital from world limit 3;Afghanistan|KabulAlbania|TiraneAlgeria|Algiers
OGC®
copyright © 2014 Open Geospatial Consortium
Luciad GeoPackage use casesOGC OWS-9 Aviation
Spot reporting with location and camera picture info
Access elevation data to enable
visibility calculations
Create and edit annotations in the field
OGC®
copyright © 2014 Open Geospatial Consortium
OGC WEB CONTEXT
OGC®
copyright © 2014 Open Geospatial Consortium
Sharing a map
Multipleoverlaid
maps
BordersElevation Cloud Cover
Cities
OGC®
copyright © 2014 Open Geospatial Consortium
Sharing a map
BordersElevation Cloud Cover
Cities
OGC®
copyright © 2014 Open Geospatial Consortium
Anatomy of a Context document
• A context document extends the Atom XML format (or in the future JSON).
• It contains Atom <entries> which have OGC <offering>s.
• Offerings are data sources. They may be either services (and particularly OGC services like WMS, WFS, WMTS and WCS) or file-based data sets, like GML, KML and PDF.
• File-based data sets may be specified by reference with a URL, or included inline.
• OGC service offerings contain a GetCapabilites request and a request to get data, such as GetMap, GetTiles, GetFeature, etc.
• Offerings do not have to be spatial, so clients implementing Context should handle non-spatial offerings in a way other than mapping them.
OGC®
copyright © 2014 Open Geospatial Consortium
Use Cases to date…
• Common Operating Picture• Describing contents of a GeoPackage• Describing a GeoPackaging WPS request• Imagery annotation
OGC®
copyright © 2014 Open Geospatial Consortium
POINTS OF INTEREST IN OGC
OGC®
copyright © 2014 Open Geospatial Consortium
POI work advances on 2 fronts
• Points of Interest Standards Working Group– just chartered– seeks to ratify POI data encoding standards for XML and
JSON– picks up dormant W3C work– all work is public at https://github.com/opengeospatial/poi
• OpenPOIs registry– an implementation of the POI draft standard– living laboratory to experiment with
• linked geodata• persistent services• distributed geosynchronization
OGC®
copyright © 2014 Open Geospatial Consortium
What is OpenPOIs?
A registry of all the places in the world, and links to all of their web resources
OGC®
copyright © 2014 Open Geospatial Consortium
What is OpenPOIs?
APIs to get the information as
maps, XML, JSON, or RDF
http://openpois.net
OGC®
copyright © 2014 Open Geospatial Consortium
the Open-ness in OpenPOIs
• open data: only POI repositories with compatible open data policies have been indexed by OpenPOIs
• open API: anyone is free to use the read API, and a write API is being built for any authenticated user to freely add information
• open code: built on PostGIS, Mapserver and custom PHP.
OGC®
copyright © 2014 Open Geospatial Consortium
the OpenPOIs database
• reference implementation of the POI format• free and open, always• provides a Rosetta Stone for all POIs, any time,
anywhere• includes
– OpenStreetMap– NGA, USGS, GeoNames– dbPedia– China Historical GIS– Futouring
• future work– freebase, governments, historians– self-service synchronization
OGC®
copyright © 2014 Open Geospatial Consortium
Descriptive Properties
• location: geography specifier• label: name• description: narrative text• category: tags, keywords, etc.• link: related items• time: when the POI exists in the world
OGC®
copyright © 2014 Open Geospatial Consortium
Location Properties
• point, line, or polygon
• GML 3.3 “compact encoding” -- simple!• coordinate reference system (with lat/lon
default)
• and/or address• and/or spatial relationship to another POI
<Point> <posList>42.358 -71.06</posList></Point>
<LineString> <posList>42.358 -71.06 42.375 -71.093...</posList></LineString>
<SimplePolygon> <posList>42.358 -71.06 42.375 -71.093...</posList></SimplePolygon>
OGC®
copyright © 2014 Open Geospatial Consortium
Descriptive Property: category
<category term="722110" scheme="http://www.census.gov/naics/2007/" type="text/html" href="http://www.census.gov/econ/industry/def/d722110.htm">Full-service restaurants</category>
<category term="rating:food" scheme="http://www.example.com/category/ratings" href="http://www.example.com/ratings/food#extraordinary_to_perfection">27</category>
<category term="cuisine" scheme="http://www.example.com/category/cuisines" href="http://www.example.com/ratings/cuisines">Deli</category>
• category• term: the unique identifier – aka tag (mandatory)• scheme: URI identifier for the term’s definition. may be
resolvable (optional)• value: human-readable description (optional)• href: URL to full definition. always resolvable (optional)• type: MIME type of the href (optional)
• XML examples:
OGC®
copyright © 2014 Open Geospatial Consortium
Descriptive Property: link
• link• term: relationship of link to the POI (mandatory)• href: URL for linked content (mandatory)• type: MIME type of href (mandatory)• value: human-readable description (optional)• author: basic attribution (optional)
• XML examples: <link term="related" href="http://en.wikipedia.org/wiki/Faneuil_Hall" type="text/html"/><link term="related" href="http://www.cityofboston.gov/freedomtrail/faneuilhall.asp" type="text/html"/><link term="related" href="http://www.thefreedomtrail.org/visitor/faneuil-hall.html" type="text/html"/><link term="related" href="http://www.faneuilhallmarketplace.com/" type="text/html"/><link term="image” href="http://www.cityofboston.gov/Images_Documents/Bright_Fan_Hall_tcm3-2661.gif" type="image/gif"/><link term="related" href="http://hdl.loc.gov/loc.award/mhsalad.130006"> <value>Faneuil Hall, exterior: perspective view, Boston, MA</value> <author term="LOC" href="http://www.loc.gov" type="text/plain"> <value>Library of Congress</value> </author></link>
OGC®
copyright © 2014 Open Geospatial Consortium
Data Management Properties (metadata)
• id: unique identifier for the POI in the publisher’s system
• created/updated/deleted: applies to the POI record (not the actual place in the world—time property covers that)
• license: use restrictions, e.g. copyright
OGC®
copyright © 2014 Open Geospatial Consortium
Basic Example: City of Boston, MA USA<poi id="http://www.rajsingh.org/pois/45343489" created="2004-01-22T09:38:21-05:00”> <author href="http://www.rajsingh.org/me.rdf" type="application/rdf+xml"/> <license href="http://creativecommons.org/licenses/by/3.0/" type="text/html" term="CC BY 3.0"/> <label term=”primary”>Boston</label> <description updated="2011-10-21T22:10:00+12:00"> <value>Boston is the capital of and largest city in Massachusetts, and is one of the oldest cities in the United States. Boston is regarded as the unofficial "Capital of New England" for its economic and cultural impact on the entire New England region.</value> <author id="http://en.wikipedia.org" href="http://en.wikipedia.org/wiki/Boston" type="text/plain"> <value>Wikipedia</value> </author> </description> <category term="city" scheme="http://www.usgs.gov/placetypes"type="text/html”> <value>seat of a first-order administrative division</value> </category> <time term="start" type="text/datetime”>16300917</time> <link term="canonical" href="http://www.rajsingh.org/pois/45343489.xml" scheme="http://www.iana.org/assignments/link-relations/link-relations.xml" type="text/xml"/> <link term="related" href="http://en.wikipedia.org/wiki/Boston" type="text/html" scheme="http://www.iana.org/assignments/link-relations/link-relations.xml"/> <link term=”map" href="http://www.geonames.org/maps/google_42.358_-71.06.html" type="text/html" scheme="http://www.iana.org/assignments/link-relations/link-relations.xml"/> <location> <point term="centroid"> <Point srsName="http://www.opengis.net/def/crs/EPSG/0/4326"> <posList>42.358 -71.06</posList> </Point> </point> </location></poi>
OGC®
copyright © 2014 Open Geospatial Consortium
OpenPOIs API
query by… example…
ID http://openpois.net/poiquery.php?id=f0aa9f2f-c091-4dc2-9282-3a5dbbec8314
RESTful ID http://openpois.net/pois/f0aa9f2f-c091-4dc2-9282-3a5dbbec8314
radius/point http://openpois.net/poiquery.php?lat=42.349433712876&lon=-71.040894451933&maxfeatures=9&format=application/xml
bounding box http://openpois.net/poiquery.php?bbox=-71.10,42.35,-71.00,42.45&maxfeatures=20&format=application/json
Time and area
http://openpois.net/poiquery.php?lat=25.959&lon=119.519&maxfeatures=1&format=xml&radius=1000&start=944
WFS http://openpois.net/openpoiwfs?request=GetCapabilities&service=WFS&version=1.1.0
http://openpois.net/api.php
OGC®
copyright © 2014 Open Geospatial Consortium
impacts
• more geospatial open data• domains that benefit from an open POI db
– disaster management– public health– resource management– climate science
• Better geospatial standards in– "RESTful" APIs– RDF, linked data and the Semantic Web
OGC®
copyright © 2014 Open Geospatial Consortium
What should you do with the POI format?
1. have unique IDs for all your POIs2. provide a public URL:
• to get at every POI in W3C POI format• at least an ID and name please
3. adopt the link part of the data model• to maintain references to related POIs• add links to that public POI URL
4. be part of OpenPOI DB• work with me to link and sync to your POIs!
OGC®
copyright © 2014 Open Geospatial Consortium
GEOJSON
OGC®
copyright © 2014 Open Geospatial Consortium
Why GeoJSON?
• only well-defined generic JSON model for geodata• a lot like GML Simple Features• Not and OGC standard, but strong OGC member
interest• lots of uptake
OGC®
copyright © 2014 Open Geospatial Consortium
GeoJSON example
{ "type":"Feature", "properties": {
"id":"aabbaa", "name":"Ark"
}, "geometry": { "type":"Polygon", "coordinates":[ [ [76.078122854233,30.96094250679],[41.624997854233,34.47656750679],[52.874997854233,33.07031750679],
[63.421872854233,40.10156750679],[76.078122854233,30.96094250679] ]
] }, "crs": { "type":"name", "properties": { "name":"urn:ogc:def:crs:OGC:1.3:CRS84" } }}
OGC®
copyright © 2014 Open Geospatial Consortium
Where is GeoJSON in OGC?
• being “murmered about”• tried out as a lightweight exchange format in
Testbed 10 geosynchronization experiment
OGC®
copyright © 2014 Open Geospatial Consortium
References & Contacts
• GeoPackage– http://geopackage.org
• OWS Context– https://github.com/opengeospatial/owc-swg (private for
now)– http://owscontext.org (coming soon)
• POIs– OpenPOIs Repository http://openpois.net – OGC POI Standards Working Group:
http://www.opengeospatial.org/projects/groups/poiswg • GeoJSON
– http://www.geojson.org/geojson-spec.html