-
Notifications
You must be signed in to change notification settings - Fork 41
Description
Interfaces in org.opengis.metadata
packages use very specific types for numerical values, for example java.lang.Integer
(fixed to 32 bits) or java.lang.Double
(fixed to 64 bits). Those types are not always appropriate; an implementation may need to use a Long
or even a BigInteger
instead than 32 bits integers, or a BigDecimal
instead than IEEE 754 floating point. We should leave that flexibility by using the more general Number
type instead than a specific subtypes. In particular for the following properties:
MD_FeatureTypeInfo.featureInstanceCount
: 32-bits integer type is insufficient.
For floating point values, many of them are actually measurements. For those ones, we should consider javax.measurement.Quantity
.
Historical note: the decision to use specific subtypes was done in the GeoAPI 2 days for compatibility with technologies like JAXB or Hibernate. But even with this goal in mind, abstract types could have been used with the help of adapters.