Search code examples
postgissrid

Manage multiple SRID on a single PostGIS table


I'm developing a web-GIS based on PostGIS. When I create a GIS-enalbled table on PostGIS I've to specify the SRID of the data, for example an UTM Zone (eg. UTM 33N SRID 32633). Is there a way to keep the project scalable and put in the same table data of different SRID (eg. 32633 and 32632 to cover all Italy) without use a global geographic SRID (like WGS84 and similars)?

Thank you


Solution

  • I think you'd end up in a world of pain if you try to combine different SRIDs in one column (how do you know how to display the layer properly?).

    However, you could create a table with two geometry columns. To make things more maintainable you could e.g. have triggers that update the "other" column's geometry when one column changes...

    create table table_with_2_geoms (
    geom_32633 geometry(geometry,32633),
    geom_32632 geometry(geometry,32632)
    );