-
Notifications
You must be signed in to change notification settings - Fork 40
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
Replace Integer/Double by BigInteger/BigDecimal in metadata #87
Comments
Duplicates #46. A possible compromise may be |
Well the reference is |
Indeed, I'm not aware of dataset with a feature count greater than 2⁶³. But the amount of geospatial data collected daily by remote sensors is so large (some Tb per day if I remember correctly), that the need for larger numbers may not be so unlikely. Keeping in mind that this is only metadata and may be describing data that are not actually on the machine. As another reason, the use of Another reason not mentioned is that |
I do not know, but it reads like rather using Also, the fields of |
Yes, I agree that extending On the other side, |
Thanks for the tip. .NET does not have an equivalent of |
The ISO 19115-1 standard defines each attribute as optional, mandatory or conditional. The GeoAPI interfaces in the
org.opengis.metadata
packages reflects the ISO specification by allowing values to be null. Since Java primitive types such asint
ordouble
cannot be null, GeoAPI workarounds this limitation by using their wrapper classes instead, which arejava.lang.Integer
andjava.lang.Double
respectively. But those numeric values could have been made more flexible by usingBigInteger
andBigDecimal
instead. It would avoid limitations in the magnitude of the number and in precision. It would also allows floating point values to better capture the precision intended by the data producer, which is usually in base 10 with a fixed number of fraction digits (that number can be specified toBigDecimal
)..BigInteger
andBigDecimal
are the types used by default by some tools that generate Java code from XML schemas.This proposal to replace
java.lang.Integer
andjava.lang.Double
byjava.math.BigInteger
andjava.math.BigDecimal
is for metadata only, because performance is usually not an issue in metadata (contrarily to referencing, features or coverages) and wrapper classes were already used in metadata anyway (we are not proposing to replace primitive type usages).The text was updated successfully, but these errors were encountered: