Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standard TypeName and mapping to programming language #76

Closed
desruisseaux opened this issue Nov 10, 2022 · 0 comments
Closed

Standard TypeName and mapping to programming language #76

desruisseaux opened this issue Nov 10, 2022 · 0 comments
Assignees
Milestone

Comments

@desruisseaux
Copy link
Contributor

desruisseaux commented Nov 10, 2022

ISO 19157 defines some properties like DQM_Measure.valueType of type TypeName (from ISO 19103) with the following documentation:

Shall be one of the data types defined by ISO/TS 19103:2005.

It would be convenient to have a consolidated list of main types, together with proposed mapping to Java or Python classes. A proposal is shown in the table below. This proposal uses an "OGC" namespace by consistency with data type URN standard value 1.1 in OGC schemas, which defines standard types like below:

  • urn:ogc:def:dataType:OGC:1.1:boolean
  • urn:ogc:def:dataType:OGC:1.1:nonNegativeInteger
  • urn:ogc:def:dataType:OGC:1.1:string
  • urn:ogc:def:dataType:OGC:1.1:anyURI

By extension, proposal of standard TypeName values in GeoAPI:

Scoped type name Java class Python class
OGC:Boolean java.lang.Boolean int
OGC:Integer java.lang.Integer int
OGC:Real java.lang.Double float
OGC:Decimal java.math.BigDecimal float
OGC:CharacterString java.lang.String str
OGC:FreeText org.opengis.util.InternationalString str
OGC:PT_Locale java.util.Locale
OGC:DateTime java.time.ZonedDateTime
OGC:URI java.net.URI str
OGC:Matrix org.opengis.referencing.operation.Matrix np.ndarray
OGC:Coverage org.opengis.coverage.Coverage Coverage
OGC:MD_Metadata org.opengis.metadata.Metadata Metadata

An open question is how to manage collections. ISO 19157 has the following policy:

  • ValueStructure set to bag, set or sequence.
  • TypeName with the type of elements in the collection.

If we want to avoid ValueStructure in GeoAPI (see #74), where to put this information?

asfgit pushed a commit to apache/sis that referenced this issue Nov 10, 2022
- New method: `ParameterDescriptor.getValueType()`.

opengeospatial/geoapi#76
@desruisseaux desruisseaux self-assigned this Dec 1, 2022
@desruisseaux desruisseaux added this to the 3.1 milestone Dec 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant