[postgis-users] How inaccurate is Geometry

Chen, Li [Contractor] Li.Chen at andrew.com
Wed Apr 28 16:34:39 PDT 2010


Hi Everyone,

I just want to ask a question regarding Geometry data type.

According to the manual, geometry use a planar coordinate system for measurement and the geography data type use a geodetic coordinate system.

In my application, I need to deal with data from all over the world and I can not use geography because I do need ST_Covers/ST_Intersects. For geography type, ST_Covers only supports polygon covers point and ST_Intersects is really slow (~5 sec for one query). Therefore, I have to use geometry type.

However, I also notice in the manual says that geometry will auto cast to geography if I use SRID=4326. I did specify SRID to be 4326 when I create all the geometry objects.

So here is my question, what sort of inaccuracy/accuracy(in terms of meters) can I expect if I specify a circle ('POLYGONG(x x, xx,xx)') around 1000km radius( I use polygon to approximate circle)? What if I use ST_buffer to create this circle, does it make any difference in terms of accuracy?

I tried to create two geometry points and compare the distance between  them with two geography points have the same locations using ST_Distance(geog, geog) and ST_Distance_Sphere(geom, geom), ST_Distance_Spheroid(geom, geom). Although ST_Distance returns some difference from ST_Distance_Sphere, the results for ST_Distance and ST_Distance_Spheroid is exactly the same. So I guess this could not  tell the difference between geom and geog, rather it is a matter of functions used.

Thanks for any suggestions,

Li

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20100429/664dfed8/attachment.html>


More information about the postgis-users mailing list