sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Desruisseaux (JIRA)" <j...@apache.org>
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
                 URL: https://issues.apache.org/jira/browse/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:VerticalDatum>
  <gml:datumName>Mean Sea Level</gml:datumName>
  <gml:remarks>Approximates geoid.</gml:remarks>
  <gml:anchorPoint>Averaged over a 19-year period.</gml:anchorPoint>
  <gml:validArea>
    <gml:description>World.</gml:description>
    <gml:boundingBox>
      <gml:lowerCorner>-180 -90</gml:lowerCorner>
      <gml:upperCorner>+180 +90</gml:upperCorner>
    </gml:boundingBox>
  </gml:validArea>
  <gml:scope>Hydrography.</gml:scope>
  <gml:verticalDatumType codeSpace="EPSG">geoidal</gml:verticalDatumType>
</gml:VerticalDatum>
{code}

{code:xml|title=GML 3.2.1}
<gml:VerticalDatum>
  <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>
  <gml:domainOfValidity>
    <gmd:EX_Extent>
      <gmd:description>
        <gco:CharacterString>World.</gco:CharacterString>
      </gmd:description>
      <gmd:geographicElement>
        <gmd:EX_GeographicBoundingBox>
          <gmd:westBoundLongitude><gco:Decimal>-180</gco:Decimal></gmd:westBoundLongitude>
          <gmd:eastBoundLongitude><gco:Decimal>+180</gco:Decimal></gmd:eastBoundLongitude>
          <gmd:southBoundLatitude><gco:Decimal> -90</gco:Decimal></gmd:southBoundLatitude>
          <gmd:northBoundLatitude><gco:Decimal> +90</gco:Decimal></gmd:northBoundLatitude>
        </gmd:EX_GeographicBoundingBox>
      </gmd:geographicElement>
    </gmd:EX_Extent>
  </gml:domainOfValidity>
  <gml:scope>Hydrography.</gml:scope>
  <gml:anchorDefinition>Averaged over a 19-year period.</gml:anchorDefinition>
</gml:VerticalDatum>
{code}

{{<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)|http://en.wikipedia.org/wiki/XSLT].

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
(v6.1.5#6160)

Mime
View raw message