[postgis-users] find_srid and null values

Dave Blasby dblasby at refractions.net
Mon Aug 26 11:09:51 PDT 2002


> What would be the best solution ?:
>         Changing find_srid to return -1 when no projection info is
> found,
>         or changing addGeometryColumn() to automatically add an entry to
> spatial_ref_sys if called with an unknown SRID ?

I think returning -1 would be a bad idea - it'll cause a world of pain
later on.  The real problem is that you dont have an entry in the 
geometry_columns table. 

You dont have to have an entry in spatial_ref_sys - you only need
one if you are doing re-projection with transform().

If you always setup your spatial columns with addGeometryColumn(), you
shouldnt have any problems.  (Dont forget to dropGeometryColumn() if
you're going to delete a table)

dave




More information about the postgis-users mailing list