[postgis-users] projection management

Ken Boss Ken.Boss at dnr.state.mn.us
Tue Mar 27 08:53:22 PDT 2007


I was trying to get a handle on coincident points in a table:

    select location_geom, count(*) from burn_locations group by location_geom

but was getting errors back:

    ERROR: Operation on two GEOMETRIES with different SRIDs

The geometry_columns table lists the SRID for the burn_locations table as -1.  I thought maybe PostGIS was just choking on the unspecified projection, so I specified it:

    update burn_locations set location_geom=setsrid(location_geom, 26915)

and then I was able to run my original query successfully.  However, when I looked again at the geometry_columns table, it still listed -1 as the SRID for burn_locations.  Which leaves me wondering:

1) Where does the SRID get stored when I run an update as above?  
2) Can I query the SRID for and individual feature?  How?

Thanks for any help,

--Ken Boss
  Minnesota DNR




More information about the postgis-users mailing list