[postgis-users] Data storage w.r.t. projections

Markus Schaber schabi at logix-tt.com
Wed Oct 11 02:36:38 PDT 2006


Hi, Mark,

Mark Fredrickson wrote:

> I wonder if anyone has thoughts on which projection I should use to
> store my data? All the Minnesota data will be in UTM zone 15, so this
> seems like a natural choice. I am wondering, however, if it is more
> flexible to store in a projectionless (lat, long) format.

If you decide for a lat/long format, I'd advise you to use SRID 4326,
which is the WGS84 coordinate system. Currently, this seems to be the
most used format for global data, even GPS uses it.

> As I understand it, one of the big advantages of UTM is that is allows
> for Euclidean geometry, as compared to spatial geometry that would be
> required for a lat,long format. Does PostGIS use this feature of UTM
> when computing Distance(), etc?

For distance, there's distance_sphere() which approximates the distance
on a sphere, and distance_spheroid() which can use the exact reference
elipsoid your geometry has.

Geometrical processing (like intersection etc.) will work regardless of
the coordinate system, but it may make sense to add additional vertices
to long straight line segments before reprojecting them to WGS84.

For things like area computation, you should use a projection that
preserves the area.

> Of course, I could have two geometry columns, one for lat,long, one
> for UTM, but this strikes me as unnecessary.

You could "virtually" add this column via a view, and you can use
functional indices that index the projected column, this can give you
most benefits such a column without actually having it. :-)

And you can have triggers automatically update such a column, so it's no
additional maintainance for your software.


HTH,
Markus



-- 
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf.     | Software Development GIS

Fight against software patents in Europe! www.ffii.org
www.nosoftwarepatents.org



More information about the postgis-users mailing list