concept transformation in category postgis

appears as: trsformations, transformation, trsformation, trsformations, trsformation
PostGIS in Action, Third Edition

This is an excerpt from Manning's book PostGIS in Action, Third Edition.

  • Most commercial mapping toolkit APIs accept data to be mapped only in WGS 84 lon/lat (although they use some variant of Mercator for display). ST_Transform also introduces some rounding errors as you retransform data, so it’s best to transform only once from the source format. ST_Transform is a fairly cheap process, so it’s okay to run it for each geometry if you keep -functional indexes on the transformations of the form CREATE INDEX idx _geomt ON sometable USING gist(ST_Transform(geom,some_srid) and then use ST_DWithin(a.geom, ST_Transform(sometable.geom,some_srid), some _distance) for distance checking. Now when ST_DWithin is used with the transformed geometry, the function spatial index will kick in to help.
  • A number of geography functions, such as ST_Buffer, piggyback on geometry via a transformation under the hood. These functions are denoted with a (T) in the PostGIS manual. You should be cautious when using these functions, especially for large areas where the curvature of the earth becomes a concern and in regions of longitude and latitude singularities, such as the poles.