[postgis-users] Mixing SRID's

Markus Schaber schabi at logix-tt.com
Fri Nov 25 02:41:36 PST 2005


Hi, Johan,

Johan Wehtje wrote:
> Is it possible to store geometry with differing SRID's in one table?
> 
> I want to keep track of a heterogenous collection of Geometry, sometimes
> loaded from Shapefiles, or from GPS surveys - and would like to know if
> I have to create a seperate Table for each SRID, or whther I have to
> somehow convert all the geometry to a single standard.

It is possible, but not OpenGIS standards compliant.

You can simply drop the SRID constraint that was created by
addGeometryColumn().

Alternatively, you can use a "before insert" and "before update" trigger
to transparently transform() all input geometries to a common SRID. This
has the advantage that map display or index searches work better.

If you need both the original data for exact reproduciton and the
unified ones for efficient processing, you can use two geometry columns
- the first one contains the original geometries with mixed SRIDs, and
the second one is automatically populated by transform()ing the first
one via triggers.

Markus




More information about the postgis-users mailing list