RECENT EVOLUTION OF
GEOSPATIAL STANDARDS ¡
and their implementation in Apache SIS
Mar%n ¡Desruisseaux ¡
September ¡2015 ¡
h7p://sis.apache.org ¡
Note: ¡those ¡slides ¡are ¡s%ll ¡incomplete. ¡ They ¡will ¡be ¡completed ¡for ¡the ¡conference. ¡ ¡
R ECENT EVOLUTION OF GEOSPATIAL STANDARDS and their implementation - - PowerPoint PPT Presentation
R ECENT EVOLUTION OF GEOSPATIAL STANDARDS and their implementation in Apache SIS Mar%n Desruisseaux September 2015 h7p://sis.apache.org Note: those slides are s%ll incomplete. They will
Mar%n ¡Desruisseaux ¡
September ¡2015 ¡
h7p://sis.apache.org ¡
Note: ¡those ¡slides ¡are ¡s%ll ¡incomplete. ¡ They ¡will ¡be ¡completed ¡for ¡the ¡conference. ¡ ¡
¡— ¡Interna%onal ¡Organiza%on ¡for ¡Standardiza%on ¡
Metadata ¡ └─ ¡Iden.fica.on ¡info ¡ └─ ¡Extent ¡ └─ ¡Geographic ¡element ¡ ├─ ¡West ¡bound ¡longitude ¡…………………………… ¡179°10ʹ″W ¡ ├─ ¡East ¡bound ¡longitude ¡…………………………… ¡65°W ¡ ├─ ¡South ¡bound ¡la%tude ¡…………………………… ¡17°37ʹ″30″₻N ¡ └─ ¡North ¡bound ¡la%tude ¡…………………………… ¡71°30ʹ″N ¡
Iden.fica.on ¡ Lineage ¡ Maintenance ¡ Content ¡informa%on ¡ Metadata ¡ Distribu%on ¡ Spa%al ¡representa%on ¡ Data ¡quality ¡ Constraints ¡
UML ¡ XSD ¡files ¡ JAXB ¡compiler ¡ Generated ¡classes ¡
Interna%onal ¡standards ¡ Provided ¡by ¡OGC ¡ Run ¡by ¡each ¡project ¡ Project-‑specific ¡
Interoperability ¡in ¡XML ¡files ¡ Not ¡in ¡Java ¡API ¡
UML ¡feature ¡ Available ¡in ¡Java ¡ Used ¡in ¡OGC’s ¡XSD ¡ Union ¡ ❌ ¡ ✅ ¡ Covariant ¡type ¡ ✅ ¡ ❌ ¡ Deriving ¡from ¡UML ¡ UML ¡feature ¡ Used ¡in ¡Java ¡ Union ¡ ❌ ¡ Covariant ¡type ¡ ❌ ¡ Deriving ¡from ¡XSD ¡
Proper.es: ¡ § CoordinateSystem § (other ¡proper%es ¡omi7ed) ¡ Type ¡of ¡inherited ¡“coordinateSystem” ¡ property ¡is ¡narrowed ¡to ¡ ¡CartesianCS ¡ ¡type. ¡ Type ¡of ¡inherited ¡“coordinateSystem” ¡ property ¡is ¡narrowed ¡to ¡ ¡VerticalCS ¡ ¡type. ¡
This ¡is ¡“type ¡covariance”. ¡
Proper.es: ¡ § CartesianCS § (other ¡proper%es ¡omi7ed) ¡
Proper.es: ¡ § VerticalCS § (other ¡proper%es ¡omi7ed) ¡
No ¡type ¡covariance ¡— ¡each ¡subclass ¡declares ¡the ¡property ¡separately. ¡
Using ¡an ¡API ¡derived ¡manually ¡from ¡UML: ¡
cs = crs.getCoordinateSystem();
Using ¡an ¡API ¡generated ¡from ¡XSD ¡with ¡JAXB: ¡
if (crs instanceof ProjectedCRS) { cs = ((ProjectedCRS) crs).getCartesianCS(); } else if (crs instanceof VerticalCRS) { cs = ((VerticalCRS) crs).getVerticalCS(); } else if (crs instanceof GeodeticCRS) { GeodeticCRS geodeticCRS = (GeodeticCRS) crs; cs = geodeticCRS.getEllipsoidalCS(); if (cs == null) { cs = geodeticCRS.getSphericalCS(); if (cs == null) { cs = geodeticCRS.getCartesianCS(); } } } else if (crs instanceof …) { … }
First ¡case ¡in ¡previous ¡slide ¡ Second ¡case ¡in ¡previous ¡slide ¡
Other ¡case ¡(not ¡shown ¡in ¡previous ¡slide) ¡
Not ¡even ¡the ¡worst ¡case! ¡ 6 ¡other ¡cases… ¡ That’s ¡all! ¡
JAXB ¡ Interoperability ¡in ¡Java ¡API ¡ Also ¡in ¡XML ¡files ¡if ¡implementors ¡wish ¡ UML ¡ GeoAPI ¡(Java) ¡ Libraries ¡
Interna%onal ¡standards ¡ Provided ¡by ¡OGC ¡ Project-‑specific ¡
h7p://www.opengeospa%al.org/ ¡ h7p://www.geoapi.org/ ¡ h7p://sis.apache.org/ ¡
Interna.onal ¡standards ¡for: ¡
Java ¡interfaces ¡for: ¡
Par.al ¡implementa.on ¡of: ¡
Metadata ¡ ├─ ¡Contact ¡ │ ├─ ¡Role ¡(author, ¡collaborator, ¡distributor, ¡sponsor, ¡…) ¡ │ └─ ¡Party ¡(individual ¡or ¡organiza%on) ¡ │ ├─ ¡Name ¡ │ └─ ¡Contact ¡info ¡(phone ¡number, ¡address, ¡email, ¡hours ¡of ¡service…) ¡ ├─ ¡Data ¡iden%fica%on ¡ │ ├─ ¡Abstract ¡ │ ├─ ¡Status ¡(under ¡development, ¡completed, ¡historical ¡archive, ¡…) ¡ │ ├─ ¡Resource ¡maintenance ¡(update ¡frequency, ¡maintenance ¡scope, ¡…) ¡ │ ├─ ¡Descrip%ve ¡keywords ¡ │ ├─ ¡Spa%al ¡representa%on ¡type ¡(grid, ¡vector, ¡triangulated ¡irregular ¡network, ¡video, ¡…) ¡ │ ├─ ¡Topic ¡category ¡(meteorology, ¡health, ¡environment, ¡transporta%on, ¡…) ¡ │ └─ ¡Extent ¡ │ ├─ ¡Geographic ¡element ¡(north ¡bound ¡la%tude, ¡west ¡bound ¡longitude, ¡…) ¡ │ ├─ ¡Ver%cal ¡element ¡ │ └─ ¡Temporal ¡element ¡ ├─ ¡Content ¡info ¡ │ ├─ ¡A7ribute ¡group ¡ │ │ ├─ ¡Content ¡type ¡(physical ¡measurement, ¡thema%c ¡classifica%on, ¡…) ¡ │ │ └─ ¡Range ¡dimension ¡ │ │ ├─ ¡Name ¡ │ │ ├─ ¡Unit ¡ │ │ ├─ ¡Scale ¡factor ¡ │ │ ├─ ¡Offset ¡ │ │ └─ ¡Nominal ¡spa%al ¡resolu%on ¡ │ └─ ¡Cloud ¡cover ¡percentage ¡ └─ ¡Distribu%on ¡info ¡ └─ ¡Distribu%on ¡format ¡
electromagne%c ¡spectrum. ¡
in ¡linear ¡units. ¡
physical ¡parameters. ¡
Responsible ¡party ¡ ├─ ¡Organisa%on ¡name ¡ ├─ ¡Individual ¡name ¡ ├─ ¡Contact ¡info ¡ │ ├─ ¡Telephone ¡ │ │ ├─ ¡Voice │ │ └─ ¡Facsimile │ ├─ ¡Address ¡ │ │ └─ ¡(usual ¡stuff…) │ └─ ¡Online ¡resource ¡ │ └─ ¡(other ¡stuff…) ¡ └─ ¡Role ¡ ¡
Responsibility ¡ ├─ ¡Party ¡(Individual ¡or ¡Organisa%on) ¡ │ ├─ ¡Name ¡ │ └─ ¡Contact ¡info ¡ │ ├─ ¡Telephone ¡ │ │ ├─ ¡Number │ │ └─ ¡Number ¡type │ ├─ ¡Address ¡ │ │ └─ ¡(usual ¡stuff…) │ └─ ¡Online ¡resource ¡ │ └─ ¡(other ¡stuff…) ¡ └─ ¡Role ¡
Responsible ¡party ¡extends ¡Responsibility ¡ ├─ ¡Individual ¡name ¡ ├─ ¡Organisa%on ¡name ¡ ├─ ¡Contact ¡info ¡ ├─ ¡Party ¡(Individual ¡or ¡Organisa%on) ¡ │ ├─ ¡Name ¡ │ └─ ¡Contact ¡info ¡ │ └─ ¡Telephone ¡ │ ├─ ¡Voice │ ├─ ¡Facsimile │ ├─ ¡Number │ └─ ¡Number ¡type └─ ¡Role ¡ ¡
– European ¡Commission ¡requirement ¡(INSPIRE) ¡for ¡the ¡next ¡5-‑10 ¡years ¡
– In ¡Apache ¡SIS, ¡deprecated ¡methods ¡delegate ¡to ¡the ¡new ¡methods: ¡
Filter ¡by ¡“Number ¡type” ¡value ¡ Filter ¡by ¡“Party” ¡type ¡
– Metadata md = (Metadata) Metadata md = (Metadata) XML.unmarshall XML.unmarshall(inputFile); );
– Other ¡methods ¡available ¡for ¡more ¡control. ¡
– XML.marshall XML.marshall(md, outputFile); );
– Other ¡methods ¡available ¡for ¡more ¡control. ¡
– Usual ¡JavaBeans ¡ge7ers ¡and ¡se7ers. ¡ – No ¡need ¡to ¡worry ¡about ¡consistency ¡between ¡old ¡and ¡new ¡proper%es. ¡
– Specifica.on: ¡OGC ¡Simple ¡Features ¡/ ¡ISO ¡19125 ¡ ❗ Prime ¡meridian ¡and ¡projec%on ¡parameters ¡units ¡unspecified. ¡
– Specifica.on: ¡OGC ¡Coordinate ¡Transforma%on ¡Services ¡ ❗ In ¡prac%ce, ¡popular ¡soowares ¡have ¡an ¡incompa%ble ¡interpreta%on. ¡
– Specifica.on: ¡OGC ¡WKT ¡representa%on ¡of ¡CRS ¡/ ¡ISO ¡19162:2015 ¡ – Fix ¡ambigui%es ¡and ¡cover ¡new ¡needs. ¡ – More ¡verbose ¡(6 ¡pages ¡for ¡WKT ¡1 ¡➟ ¡about ¡80 ¡pages ¡for ¡WKT ¡2). ¡ – Apache ¡SIS ¡is ¡among ¡the ¡first ¡implementa%ons. ¡
ENGCRS["A ¡ship-‑centred ¡CRS", ¡ ¡ ¡EDATUM["Ship ¡reference ¡point", ¡ ¡ ¡ ¡ ¡ANCHOR["Centre ¡of ¡buoyancy"]], ¡ ¡ ¡CS[Cartesian, ¡3], ¡ ¡ ¡ ¡ ¡AXIS["(x)", ¡forward], ¡ ¡ ¡ ¡ ¡AXIS["(y)", ¡starboard], ¡ ¡ ¡ ¡ ¡AXIS["(z)", ¡down], ¡ ¡ ¡ ¡ ¡LENGTHUNIT["metre", ¡1]] ¡ x ¡ z ¡ y ¡ Differences ¡with ¡WKT ¡1: ¡
GEODCRS["WGS ¡84", ¡ ¡ ¡DATUM["World ¡Geode%c ¡System ¡1984", ¡ ¡ ¡ ¡ ¡ELLIPSOID["WGS ¡84", ¡6378137, ¡298.257223563, ¡LENGTHUNIT["metre", ¡1]]], ¡ ¡ ¡CS[ellipsoidal, ¡3], ¡ ¡ ¡ ¡ ¡AXIS["La%tude ¡(P)", ¡north, ¡ANGLEUNIT["degree", ¡0.0174532925199433]], ¡ ¡ ¡ ¡ ¡AXIS["Longitude ¡(L)", ¡east, ¡ANGLEUNIT["degree", ¡0.0174532925199433]], ¡ ¡ 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¡ ¡ ¡VDATUM["North ¡American ¡Ver%cal ¡Datum ¡1988"], ¡ ¡ ¡ ¡ ¡ ¡ ¡CS[ver%cal, ¡1], ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡AXIS["gravity-‑related ¡height ¡(H)", ¡up], ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡LENGTHUNIT["metre", ¡1]]]] ¡ x ¡ y ¡ z ¡
ENGCRS["A ¡radar-‑centred ¡CRS", ¡ ¡ ¡BASEPROJCRS ¡["NTF ¡(Paris) ¡/ ¡Lambert ¡zone ¡II", ¡ ¡ ¡ ¡ ¡BASEGEODCRS["NTF ¡(Paris)"] ¡ ¡ ¡ ¡ ¡ ¡ ¡DATUM["Nouvelle ¡Triangula%on ¡Francaise", ¡ ¡ ¡ ¡ ¡ ¡ ¡... ¡Omi?ng ¡rest ¡of ¡declara@on ¡for ¡simplicity ¡…]], ¡ ¡ ¡ ¡ ¡CONVERSION["Lambert ¡zone ¡II", ¡ ¡ ¡ ¡ ¡ ¡ ¡METHOD["Lambert ¡Conic ¡Conformal ¡(1SP)”], ¡ ¡ ¡ ¡ ¡ ¡ ¡PARAMETER["La%tude ¡of ¡natural ¡origin", ¡52], ¡ ¡ ¡ ¡ ¡ ¡ ¡... ¡Omi?ng ¡rest ¡of ¡declara@on ¡for ¡simplicity ¡…]], ¡ ¡ ¡ ¡ ¡DERIVINGCONVERSION["A ¡map-‑to-‑radar ¡conversion", ¡ ¡ ¡ ¡ ¡METHOD["Cartesian ¡to ¡polar"], ¡ ¡ ¡ ¡ ¡PARAMETER[(TBD ¡– ¡not ¡yet ¡a ¡standard ¡method)]], ¡ ¡ ¡CS[polar, ¡2], ¡ ¡ ¡ ¡ ¡AXIS["distance ¡(r)", ¡awayFrom, ¡LENGTHUNIT["metre", ¡1]], ¡ ¡ ¡ ¡ ¡AXIS["bearing ¡(U)", ¡clockwise, ¡BEARING[270], ¡ ¡ ¡ ¡ ¡ ¡ ¡ANGLEUNIT["degree", ¡0.0174532925199433]] ¡ r ¡ U ¡ Link ¡between ¡ sta%on ¡and ¡Earth: ¡
COORDINATEOPERATION["Height ¡A ¡to ¡height ¡B", ¡ ¡ ¡SOURCECRS[…defini%on ¡omi7ed ¡for ¡brevity…], ¡ ¡ ¡TARGETCRS[…defini%on ¡omi7ed ¡for ¡brevity…], ¡ ¡ ¡METHOD["Ver%cal ¡Offset ¡and ¡Slope"], ¡ ¡ ¡PARAMETER[...omi7ed ¡for ¡brevity…], ¡ ¡ ¡INTERPOLATIONCRS[GEODCRS["WGS ¡84", ¡ ¡ ¡ ¡ ¡DATUM["World ¡Geode%c ¡System ¡1984", ¡ ¡ ¡ ¡ ¡ ¡ ¡ELLIPSOID["WGS ¡84", ¡6378137, ¡298.257223563, ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡LENGTHUNIT["metre", ¡1]]], ¡ ¡ ¡ ¡ ¡CS[ellipsoidal, ¡2], ¡ ¡ ¡ ¡ ¡ ¡ ¡AXIS["La%tude ¡(P)", ¡north], ¡ ¡ ¡ ¡ ¡ ¡ ¡AXIS["Longitude ¡(L)", ¡east], ¡ ¡ ¡ ¡ ¡ ¡ ¡ANGLEUNIT["degree", ¡0.0174532925199433]]], ¡ ¡ ¡OPERATIONACCURACY[0.1]] ¡
Source ¡CRS ¡ Target ¡CRS ¡ height ¡A ¡ height ¡B ¡
Interpola%on ¡CRS ¡ (new ¡in ¡WKT ¡2) ¡
PROJCRS["NTF ¡(Paris) ¡/ ¡Lambert ¡zone ¡II", ¡ ¡ ¡BASEGEODCRS["NTF ¡(Paris)", ¡ ¡ ¡ ¡ ¡DATUM["Nouvelle ¡Triangula%on ¡Francaise", ¡ ¡ ¡ ¡ ¡ ¡ ¡ELLIPSOID["Clarke ¡1880 ¡(IGN)", ¡6378249.2, ¡293.4660212936269]], ¡ ¡ ¡ ¡ ¡ ¡ ¡PRIMEM["Paris", ¡2.5969213], ¡ ¡ ¡ ¡ ¡ANGLEUNIT["grade", ¡0.015707963267948967]] ¡ ¡ ¡CONVERSION["Lambert ¡zone ¡II", ¡ ¡ ¡ ¡ ¡METHOD["Lambert ¡Conic ¡Conformal ¡(1SP)", ¡ID["EPSG", ¡9801]], ¡ ¡ ¡ ¡ ¡PARAMETER["La%tude ¡of ¡natural ¡origin", ¡52], ¡ ¡ ¡ ¡ ¡PARAMETER["Longitude ¡of ¡natural ¡origin", ¡0], ¡ ¡ ¡ ¡ ¡PARAMETER["Scale ¡factor ¡at ¡natural ¡origin", ¡0.99987742], ¡ ¡ ¡ ¡ ¡PARAMETER["False ¡eas%ng", ¡600000], ¡ ¡ ¡ ¡ ¡PARAMETER["False ¡northing", ¡2200000]], ¡ ¡ ¡CS[Cartesian, ¡2], ¡ ¡ ¡ ¡ ¡AXIS["Eas%ng ¡(E)", ¡east], ¡ ¡ ¡ ¡ ¡AXIS["Northing ¡(N)", ¡north], ¡ ¡ ¡ ¡ ¡LENGTHUNIT["metre", ¡1]] ¡
Value ¡in ¡ grades! ¡
Because ¡
– CoordinateReferenceSystem CoordinateReferenceSystem myCRS = = CRS.fromWKT CRS.fromWKT(wkt); );
– Other ¡methods ¡available ¡for ¡more ¡control ¡
– String String wkt = = myCRS.toWKT .toWKT(); ();
– Other ¡methods ¡available ¡for ¡more ¡control. ¡
– Usual ¡JavaBeans ¡ge7ers. ¡
– MathTransform MathTransform ¡for ¡performing ¡coordinate ¡transforma%ons. ¡