Changes between Initial Version and Version 1 of UsersWikiNewbiePostGISFunctionMeasurement


Ignore:
Timestamp:
Apr 15, 2009, 8:07:29 AM (15 years ago)
Author:
pracine
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • UsersWikiNewbiePostGISFunctionMeasurement

    v1 v1  
     1= Newbie Question =
     2
     3
     4'''What unit of measurement do PostGIS functions use?'''
     5
     6Almost all functions used in PostGIS assume measurement is in the units of the spatial reference system except for the functions that have sphere/spheroid in their name.
     7
     8The ones with sphere/spheriod  in their name:
     9
     10 * Always return measurement in meters
     11 * Assume your geometry is in longlat (degrees) regardless of what your stated SRID is.
     12 * Those functions only work with points
     13
     14This means if you put "SRID = -1" your units are units (or rather what you think your data's coordinate system is).
     15
     16 - For example if you were using
     17
     18PostGIS to plot out the infrastructure of an Ant Farm and your measurements of the perimeters are in units of millimeters, then all your lengths, areas etc would be in millimeters.
     19
     20If you have an SRID = 4326 - then you are basically telling PostGIS that your units are degrees and all your measurements are meaningless except for the functions with the words
     21spheroid and sphere in them.
     22
     23So basically PostGIS only thinks in numbers not units and the units are more meta-data than anything else.  If your data is really in degrees and you import it stating it is a meter based one, your data is still in degrees (unless you transform from what the spatial reference system actually is to what you want it to be).