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-148) No policy for units not defined in "gmxUom.xml" file
Date Sun, 01 Dec 2013 17:49:35 GMT
Martin Desruisseaux created SIS-148:
---------------------------------------

             Summary: No policy for units not defined in "gmxUom.xml" file
                 Key: SIS-148
                 URL: https://issues.apache.org/jira/browse/SIS-148
             Project: Spatial Information Systems
          Issue Type: Sub-task
          Components: Metadata
            Reporter: Martin Desruisseaux
            Priority: Minor


Unit of measurements in ISO 19115 (metadata) are represented as URL to external definition
file like below:

{noformat}
http://schemas.opengis.net/iso/19139/20070417/resources/uom/gmxUom.xml#xpointer(//*[@gml:id='m'])
{noformat}

However SIS does not really handle those unit definitions as URLs to external resources. Instead,
SIS just parses and formats the unit symbol directly. This is based on the assumption that
the {{gml:id}} matches the unit symbol. However this is purely a convention found in existing
file, and we have no guaranteed that this will always be true.

h3. Marshalling
The above {{gmxUom.xml}} file currently defines only the "m", "deg" and "rad" units. However
SIS ignores that fact and unconditionally formats the unit symbol in place of {{'m'}}. We
need to define a policy about what to do if the unit is not one of the above: do we format
it anyway? Do we point to an other file, and if so which file?

h3. Unmarshalling
Unconditional formatting of unit symbol as described below works for SIS because we ignore
the {{gmxUom.xml}} file on XML unmarshalling, and just parse the unit symbol directly. Strictly
speaking this is incorrect, since they user could very well define units differently or provide
units unknown to SIS. To reduce the risk of wrong interpretations, SIS currently accepts only
references to the {{gmxUom.xml}} file. Users do not have the ability to specify its own custom
file for unit definitions.

We need to implement a real parsing of unit definition files. Whether we should keep the current
heuristic behaviour in the particular case of {{gmxUom.xml}} file is an open question. We
may have performance advantages to keep the current behaviour, since it avoid connecting to
a distant server and parsing XML file for this common case.




--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message