GeoAPI provides a set of interfaces in programming languages (currently Java and Python) for geospatial applications. The GeoAPI interfaces closely follow OGC specifications, adaptated to match the expectations of programmers.
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?
ISO 19157 defines some properties like
DQM_Measure.valueType
of typeTypeName
(from ISO 19103) with the following documentation: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: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 tobag
,set
orsequence
.TypeName
with the type of elements in the collection.If we want to avoid
ValueStructure
in GeoAPI (see #74), where to put this information?