New task was created
Consider change geometry fields to geography fields
Created on Thursday 23 September 2021, 21:06Back to task list
ProjectMetabolism of Cities Data Hub
TagsGeneral data hub improvements
Assigned toNo one yet
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).  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:
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.