implementing ogc web services with fme server
DESCRIPTION
See more FME World Tour 2014 presentations at www.safe.com/recap2014TRANSCRIPT
CONNECT. TRANSFORM. AUTOMATE.
FME Server and OGC Web Services
FME – The Tool for OGC Services
FME 2014!The most powerful tool for creating, transforming, distributing and using complex XML / GML over OGC services
No coding! No XSLT!
What is a web service?
What is a Web Service?
HTML Request sent to web server via HTTP GET, POST, PUT or DELETE
URL may have parameters (GET)
Body of request can be anything but is commonly XML or JSON (POST)
Server takes request, grinds it, and sends back response (often XML or JSON)
ftp://
http://
https://
FME Approach to Web Services
Remove the mystery – no coding required Web service - just another format Consume web services with Inspector
or workspace Do value added transformations /
processing Workspaces which accept / generate
XML* become web services once published to FME Server**
XML and JSON Transformers
XMLFlattener XMLValidator XMLFormatter XMLUpdater XMLTemplater JSONFlattener JSONTemplaterJust type ‘XML’ or ‘JSON’
Web Transformers
HTTPFetcher / HTTPUploader / HTTP* ImageFetcher Twitter GeoRSSFeatureExtractor WebCharter ArcGISOnline (FMEStore) HTMLtoXHTMLconverter …
Web Formats
Using Web Services
ftp, http, ...
ODATA
OGC (WFS, WCS, WMS, ...)
SOS
ArcGIS Online
any service...
Your Data to/from Complex GML
FME can read or write over 325 formats FME has supported xsd based GML reading for some time New in FME 2014: GML writer application schema mode Complete support for complex schemas – xsd’s
If you can read it – you can write it!
Consuming Complex GML data
FME takes the pain out of reading and leveraging complex GML and web services
Benefit from the diverse array of freely available published data sources
New Data Inspector makes it easy to visualize all types of data: 2D or 3D, vector or raster, non-spatial or complex geometries
See web services webinar, August 2013
FME 2014 GML Developments
Improvements to GML Reader to capture full schema model
New GML writer – write anything that GML reader can read New generic web services
published workspace handles
message brokering and data publish virtually any web service and data stream (xml, json, …)see OGC Web Services lizard talk
Key points on the FME GML Writer
GML writing in schema mode uses destination model captured from the application schema (xsd)
map directly to destination feature type fields, like other formats
multiple, complex geometry support
geometry names and traits
voidable attributes in output GML / FME null support
XMLTemplater no longer needed for GML writing, but still useful for other XML generation like metadata
Web Service Request Response
Web Serverurl request via get, post, put, delete
Response JSON, XML
All web services follow the same pattern
Build any web service!
Any service is now a workspace away.
FME Data Streaming service delivers response.
Power of FME is Transformation
CodeNo Code!!
FME Workspace as Web Service Broker for WFS
FME WFS Workspace
GetCapabilities Request
Response XMLFME Server
FME Workspace as Web Service Broker for WFS
FME WFS Workspace
describeFeatureType Request
Response XMLFME Server
FME Workspace as Web Service Broker for WFS
FME WFS Workspace
getFeature Request
Response XMLFME Server
FME Workspace as Web Service Broker for WFS
FME WFS Workspace
GetCapabilities Request
Response XML
GetFeature Request
Response GMLFME Server
WFS Workspace Workflow
1. Extract parameters from request (GET / POST)2. Determine request type3. For GetCapabilities, DescribeFeatureType:
return appropriate response xml4. For GetFeature:
i. Determine request feature typeii. Parse bbox and filter xml to geometry and fieldsiii. Apply bbox and where filter to FeatureReaderiv. Apply schema transformation and output GML
Workspace Parameters
http://inspire-safe-software.fmecloud.com:80/fmedatastreaming/INSPIRE/INSPIRE_WFS.fmw?SERVICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&TYPENAME=NamedPlace&MAXFEATURES=1111
WFS Service Broker Workspace
Cadastral Parcels Extraction and Transformation
Geographical NamesExtraction and Transformation
XML Filter Processor
GetBBox
Inspector: WFS Reader - settings
INSPIRE WFS: Geographic Names
INSPIRE WFS:Cadastral Parcels
Parcels with XML Filter Query
Troubleshooting
Copy http re quest from inspector log to browser to test server responses
Download GML with browser to test if problem is with WFS client / server or GML reading
Try removing all constraints except for max features
Try specifying local schema file (.xsd)
Summary
FME makes it easy to use, leverage and produce web services
New GML writer, validation and web service support make publishing complex GML to services a breeze (INSPIRE etc)
FME Server workspace service broker approach provides a completely new way to build web services – no code!
Can be used to build all types of web services from WFS, WMS, WMTS, Odata, Junaio AR, SOS, etc.
FME, a “No-code” approach to web services
Thank You
More info: [email protected]
Safe’s Demo WFS Server:http://inspire-safe-software.fmecloud.com:80/fmedatastreaming/INSPIRE/INSPIRE_WFS.fmw
FMEpedia:http://fmepedia.safe.com/articles/How_To/GML-Writing