opengeospatial / geoapi

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.
http://www.geoapi.org
Apache License 2.0
118 stars 37 forks source link

Add MD_ReferenceSystemTypeCode or document its equivalence #50

Open desruisseaux opened 4 years ago

desruisseaux commented 4 years ago

The MD_ReferenceSystemTypeCode code list defined by ISO 19115-1 is currently not transposed in GeoAPI. That code list has been excluded in current draft because the same functionality can be achieved in the Java language with instanceof statements. For example:

Equivalence for MD_ReferenceSystemTypeCode.projected:

crs instanceof ProjectedCRS

Equivalence for MD_ReferenceSystemTypeCode.geodeticGeographic2D:

crs instanceof GeographicCRS &&
crs.getCoordinateSystem().getDimension() == 2

Equivalence for MD_ReferenceSystemTypeCode.compoundProjectedTemporal:

crs instanceof CompoundCRS &&
crs.getComponents().size() == 2 &&
crs.getComponents().get(0) instanceof ProjectedCRS &&
crs.getComponents().get(1) instanceof TemporalCRS

etc. Admittedly those equivalences can become complicated. Despite that equivalences exist, we should probably not rely on them and introduce the missing MD_ReferenceSystemTypeCode. Descriptions of that code list can be seen there: