sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Desruisseaux (JIRA)" <>
Subject [jira] [Created] (SIS-160) Need XSLT between GML 3.1 and 3.2
Date Sun, 05 Jan 2014 20:44:50 GMT
Martin Desruisseaux created SIS-160:

             Summary: Need XSLT between GML 3.1 and 3.2
                 Key: SIS-160
             Project: Spatial Information Systems
          Issue Type: Improvement
          Components: Referencing
    Affects Versions: 0.4
            Reporter: Martin Desruisseaux
            Priority: Minor

Apache SIS supports natively only one GML version, typically the latest one (GML 3.2.1 as
of Apache SIS 0.4). Reading a document from an older schema requires transforming the XML
document before unmarshalling by SIS. Conversely, writing a document to an older schema requires
transforming the XML document after marshalling by SIS.

Transformations between GML 3.2 and 3.2.1 is easy: only the name space URL changed. Such URL
substitutions are done with our package-privated {{org.apache.sis.xml.FilteredStreamReader}}
and {{FilteredStreamWriter}} classes. This is a lighter approach than using XSLT.

However transformations between GML 3.1.1 and GML 3.2.1 is more complex. Example:

{code:xml|title=GML 3.1.1}
  <gml:datumName>Mean Sea Level</gml:datumName>
  <gml:remarks>Approximates geoid.</gml:remarks>
  <gml:anchorPoint>Averaged over a 19-year period.</gml:anchorPoint>
      <gml:lowerCorner>-180 -90</gml:lowerCorner>
      <gml:upperCorner>+180 +90</gml:upperCorner>
  <gml:verticalDatumType codeSpace="EPSG">geoidal</gml:verticalDatumType>

{code:xml|title=GML 3.2.1}
  <gml:identifier codeSpace="OGP">urn:ogc:def:datum:EPSG::5100</gml:identifier>
  <gml:name>Mean Sea Level</gml:name>
  <gml:remarks>Approximates geoid.</gml:remarks>
          <gmd:southBoundLatitude><gco:Decimal> -90</gco:Decimal></gmd:southBoundLatitude>
          <gmd:northBoundLatitude><gco:Decimal> +90</gco:Decimal></gmd:northBoundLatitude>
  <gml:anchorDefinition>Averaged over a 19-year period.</gml:anchorDefinition>

{{<gml:datumName>>}} has been renamed as {{<gml:name>}}, {{<gml:anchorPoint>}}
as {{<gml:anchorDefinition>}}, {{<gml:validArea>}} as {{<gml:domainOfValidity>}}
with a very different content. {{<gml:identifier>}} does not exist in GML 3.1.1 but
is mandatory in GML 3.2.1. Conversely, {{<gml:verticalDatumType>}} defined in GML 3.1.1
has been removed in GML 3.2.1. Those changes are too complex for our above-cited {{org.apache.sis.xml}}
classes - we will need real [XSLT (Extensible Stylesheet Language Transformations)|].

XSLT 1.0 is supported in JDK6. So the work needed for this task is to write the XSLT document,
or to find existing XSLT that we can distribute under Apache 2 license. This work well as
long as the Apache SIS native GML version contains all the information to write in the target
GML versions. An exception to this condition is the above-cited {{<gml:verticalDatumType>}},
which have been removed from GML 3.2.1 and is uneasy to infer from other property values.
This special case needs support straight in the {{org.apache.sis.referencing.datum.DefaultVerticalDatum}}
class (already implemented in SIS 0.4).

h3. Metadata
Transformations from ISO 19139:2003 to ISO 19115-3:2013 will be a similar challenge. But in
this case, XSLT are made by ESRI. We need to check if the license is compatible, and to verify
if we need to write ourselves the XSLT for the reverse transformation (newer to older).

This message was sent by Atlassian JIRA

View raw message