0

On any other database system with a an SRID of 4326, ST_Area returns a value in meters. However, DB2 returns decimal degrees by default. I get that I can specify meters as an argument but why return decimal degrees by default, this is different behavior from all other providers?

5
  • 3
    Your initial assertion is incorrect. Most implementations will return Cartesian degrees. OGC specification covers the rest.
    – Vince
    Commented Sep 15, 2023 at 2:33
  • No. PostGis, Oracle Spatial, MySql, Sql Server, all return meters. Commented Sep 15, 2023 at 15:23
  • 2
    PostGIS and SQL Server only return meters with geography type. geometry returns Cartesian degrees. I suspect it's the same for MySQL.
    – Vince
    Commented Sep 15, 2023 at 15:43
  • MySql returns meters, like Oracle as they assume with 4326 you're using geography (at least conceptually). Commented Sep 15, 2023 at 15:51
  • For Oracle this is documented docs.oracle.com/cd/A91202_01/901_doc/appdev.901/a88805/… "...For geodetic data, the default unit of measurement is square meters." The MySQL documentation is in dev.mysql.com/doc/refman/8.0/en/…. The change from square degrees happened in MySQL version 8.0.13. I suppose that many databases originally did not have algorithms for computing ellipsoidal areas, and when they were added, some decided to change their default, some decided to require an special argument.
    – user30184
    Commented Sep 17, 2023 at 8:54

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.