[postgis-users] Units for distance function

Mark Cave-Ayland mark.cave-ayland at ilande.co.uk
Thu Jul 26 22:26:36 PDT 2007


On Fri, 2007-07-27 at 01:49 +0100, Dave Potts wrote:
> What units does the distance function use?  am I correct in thinking its 
> derrived from the srid type of the geometry column?
> 
> So in the case of the British national grid srid 2770  the correct unit 
> to use is the meter
> 
> Dave.

Nearly... OS data plays nicely with SRID 27700, and the grid is
specified in metres.

One word of warning: PROJ.4 versions before 4.5.0 had a bug in the
PROJ.4 parameters (a missing OSGB datum) which gave a drift of
approximately ~80m compared to other datasets - this one had me
scratching my head for a couple of days.

So in short: make sure that you get PROJ.4 >= 4.5.0 and make sure that
you add the parameter "+datum=OSGB36" to your spatial_ref_sys proj4text
field for SRID 27700 if it isn't there already - see
http://lists.maptools.org/pipermail/proj/2006-May/002265.html for the
gory details (the +datum=airy was replaced by +datum=OSGB36 in the final
commit).


HTH,

Mark.

-- 
ILande - Open Source Consultancy
http://www.ilande.co.uk





More information about the postgis-users mailing list