Upload
others
View
3
Download
0
Embed Size (px)
Citation preview
AN OGC API TO GEOSPATIAL DATAAN OGC API TO GEOSPATIAL DATApygeoapi.io
TABLE OF CONTENTSTABLE OF CONTENTSGeospatial API evolutionREST/JSON/OpenAPI/SwaggerOGC activitySay hello to pygeoapiHistoryFeaturesInstallationDeployingProduction instancesCommunitySupport
GEOSPATIAL APIGEOSPATIAL APIEVOLUTIONEVOLUTION
1990S1990SSpirit of XML-RPC/CORBASOAP/WSDL/UDDIService Oriented Architecture (SOA)Strong concept of RDBMS as the backendOGC WMS (1999)
2000S2000SWeb 2.0JavaScript/AJAX/Google MapsSlippy maps, tilesOGC WFS (2002), WCS (2003), WPS (2005), CSW(2007)
REALITIES OF OGC WEBREALITIES OF OGC WEBSERVICESSERVICES
Key Value Parameters (KVP) or XML encodingsRequests using HTTP GET, HTTP POST and SOAPResponses as XML (GML)Error handling as custom ExceptionReport within anHTTP 200 responseExhaustive specifications/requirements
<wfs:FeatureCollection
xmlns:ms="http://mapserver.gis.umn.edu/mapserver"
xmlns:gml="http://www.opengis.net/gml" [..]>
<gml:boundedBy>
<gml:Envelope srsName="EPSG:32661">[..]
</gml:Envelope>
</gml:boundedBy>
<gml:featureMember>
<ms:north_poles_wfs gml:id="north_poles_wfs.0">
<gml:boundedBy>[..]</gml:boundedBy>
<ms:msGeometry>[..]</ms:msGeometry>
<ms:Id>0</ms:Id>[..]
</gml:featureMember>[..]
</wfs:FeatureCollection>
MORE REALITIESMORE REALITIES
Complex machinery/architectures (e.g. ldproxy) forservices to be crawlableChallenging for web developers to implementChallenging for mainstream web integration (searchindexing)
showed OGC world can easily bed l bl d � d
Geonovum testbedLDP
REST/JSON/OPENAPI/REST/JSON/OPENAPI/SWAGGERSWAGGER
RESTRESTREpresentational State Transfer (REST)HTTP verbs (GET/PUT/POST/DELETE)HTTP codes (200, 201, 404, etc.)Uses URI to identify resourcesContent negotiation (media types)Stateless
JSONJSONJavaScript Object NotationEasy to write and understandVery popular among web developersJSON is first class in RESTful web servicesNo rigid standards (for better or worse)
OPENAPIOPENAPISpecification on how to describe a REST APIDefines endpoints, request parameters, responseProgramming language agnosticFormerly Swagger
"info": {
"contact": {
"email": "[email protected]",
"name": "pygeoapi Development Team",
"url": "https://pygeoapi.io"
},
"description": "pygeoapi provides an API to geospatial data",
"license": {
"name": "CC-BY 4.0 license",
"url": "https://creativecommons.org/licenses/by/4.0/"
},
"termsOfService": "None",
"title": "pygeoapi Demo instance - running latest GitHub version",
"version": "3.0.2",
"x-keywords": [
"geospatial",
"data",
"api"
]
},
"openapi": "3.0.2",
SWAGGERSWAGGEROpenAPI client toolingRobust, web developer focusedAutomated documentation, testing, codegeneration
OGC ACTIVITYOGC ACTIVITY
W3C SPATIAL DATA ONW3C SPATIAL DATA ONTHE WEB BESTTHE WEB BEST
PRACTICES (2017)PRACTICES (2017)Recommendations on formats, identifiers, access,licensing, provenanceBeing webbyhttps://www.w3.org/TR/sdw-bp/
DESIGN PATTERNSDESIGN PATTERNSBeing webby (humans, search engines)Developer friendlyLightweight specification developmentRemoving HTTP use as a tunnel
/ows?request=GetFeature&typename=roads&featureid=5/api/collections/roads/items/5
Modular specification developmentCore and extensions
TIMELINETIMELINE2017: W3C Spatial Data on the Web Best Practices2017: OGC API Whitepaper2018: WFS3 Hackathon, Weather on the Web APIHackathon2019: OGC API Hackathon
FUTURE OGCFUTURE OGCSTANDARDSSTANDARDS
OGC API - Common (OWS Common)OGC API - Features (WFS)OGC API - Coverages (WCS)OGC API - Maps (WMS)OGC API - Tiles (WMTS)OGC API - Processing (WPS)OGC API - Records (CSW)
OGC ACTIVITY ONOGC ACTIVITY ONGITHUBGITHUB
SAY HELLO TO PYGEOAPISAY HELLO TO PYGEOAPI
A projectCreated by in 2018 on Valentine's Daywith ❤
GeopythonTom Kralidis
PROJECT OVERVIEWPROJECT OVERVIEWGeospatial data API frameworkOGC Compliant (already!)OSGeo Community ProjectInternational team (Canada, Netherlands, Greece,New Zealand)
13 core 21000 upstream contributors (dependencies)
contributors
TECHNICAL OVERVIEWTECHNICAL OVERVIEWPublishing (leaves data pristine/alone)
Fits to the data (not the inverse)Leverages powerful ecosystem of Python packages
TECHNICAL OVERVIEWTECHNICAL OVERVIEWCore abstract API; web framework agnostic (defaultFlask)YAML configuration (metadata, dataset connectionsAutomated OpenAPI document generation (databinding)Robust plugin framework (data connections,formats, processing)Easy deployment (pip install, Docker)Minimal dependencies
DATA PROVIDERSDATA PROVIDERS
Elasticsearch CSV Spatialite* GeoJSON*
* also via GDAL-OGR Provider
DATA PROVIDERS - GDAL/OGRDATA PROVIDERS - GDAL/OGR
Via OGR-Python bindingsUnleashes (WFS 1/2,GeoPackage, Shapefile, GeoJSON, PostGIS, ...)Paging, reprojection, spatial/attribute queryUnlock existing WFS 1/2s!
~100 Vector Formats!
SCHEMA.ORGSCHEMA.ORG
Lower the barrier to data searchHTML encoding is annotated as schema.org/Datasetto facilitate search engines
locates pygeoapi datasetsGoogle dataset search
LINKED DATA - JSON-LDLINKED DATA - JSON-LDJSON-LD provided as additional representationDefault out of the box functionality for mostpygeoapi resources / endpointsAdditional configuration
DEPLOYINGDEPLOYING
PACKAGINGPACKAGINGNumerous deployment options
Coming to OSGeoLiveDocker
UbuntuGIS
OVERVIEWOVERVIEW
pygeoapi on DockerHubImages create Linux containers running contentUse Docker Images to test locally or deploy in server
Docker Images
# Painless deployment
# pull from DockerHub
docker pull geopython/pygeoapi:latest
# run (default config)
docker run -p 5000:80 -it geopython/pygeoapi:latest
# test
curl http://localhost:5000
curl http://localhost:5000/collections
curl http://localhost:5000/collections/lakes/items?limit=2
curl http://localhost:5000/collections/lakes/items?f=html
DOCKERDOCKERCustom config via Docker Volume MappingRun with Docker ComposeSubpath running via Flask SCRIPT_NAME environmentvariableExamples
SCALING PYGEOAPISCALING PYGEOAPI
Cloud clustering with high availability
PRODUCTIONPRODUCTIONINSTANCESINSTANCES
CANADACANADAMETEOROLOGICAL SERVICE OFMETEOROLOGICAL SERVICE OF
CANADA CANADA PLATFORM PLATFORMOGC web services platform of Canadian weather,climate and water dataRealtime weatherNumerical weather predictionHydrometric and Climate archives
GEOMETGEOMET
MSC PYGEOAPIMSC PYGEOAPIIMPLEMENTATIONIMPLEMENTATION
Climate services data portalclimatedata.cahttps://geo.weather.gc.ca/geomet/features
GLOSIS - GLOBAL SOILGLOSIS - GLOBAL SOILINFORMATIONINFORMATION
under developmentby FAO and ISRICUsing pygeoapi as an external API providing OGC API- FeaturesTestbed for JSON-LD for soil data distribution
Global soil information system
https://glosis.isric.org/ogc
ROADMAPROADMAPMore data providersContent negotiation (e.g. Response as GeoPackage,GML,...)Advanced filters (CQL)TransactionsMore OGC APIs: Maps, Tiles, Coverages, Processes
SUPPORTSUPPORT
LINKSLINKSHome: Docs: Demo: GitHub: Docker:
Chat: Mail:
https://pygeoapi.iohttps://docs.pygeoapi.io
https://demo.pygeoapi.iohttps://github.com/geopython/pygeoapi
https://hub.docker.com/r/geopython/pygeoapihttps://gitter.im/geopython/pygeoapi
https://lists.osgeo.org/mailman/listinfo/pygeoapi
THANK YOU!THANK YOU!
@tomkralidis @JMendesDeJesus @normanbarker
@perrygeo @justb4 @pvgenuchten @tzotsos @alpha-beta-soup