Consider change geometry fields to geography fields

Created on Thursday 23 September 2021, 21:06

Back to task list
  • ID
    1004606
  • Project
    Metabolism of Cities Data Hub
  • Status
    Open
  • Priority
    Medium
  • Type
    Programming work
  • Tags
    General data hub improvements
  • Assigned to
    No one yet
  • Subscribers
    Paul Hoekman

You are not logged in

Log In Register

Please join us and let's build things, together!

Description

I just found out about the geography type field. From the Django manual:

The geography type provides native support for spatial features represented with geographic coordinates (e.g., WGS84 longitude/latitude). [6] Unlike the plane used by a geometry type, the geography type uses a spherical representation of its data. Distance and measurement operations performed on a geography column automatically employ great circle arc calculations and return linear units. In other words, when ST_Distance is called on two geographies, a value in meters is returned (as opposed to degrees if called on a geometry column in WGS84).

Because geography calculations involve more mathematics, only a subset of the PostGIS spatial lookups are available for the geography type. Practically, this means that in addition to the distance lookups only the following additional spatial lookups are available for geography columns:

  • bboverlaps
  • coveredby
  • covers
  • intersects

Not having to deal with all these projection issues and working with meters etc instead of degrees seems like such a relief. However I am not sure what the true impact of this would be. Needs further investigation. This ticket is about really checking what the impact would be, so that we can make a decision based on that.

Go to action page

Discussion and updates


New task was created