[postgis-devel] Valid SRIDs
Obe, Regina
robe.dnd at cityofboston.gov
Thu Jun 26 04:17:50 PDT 2008
Kevin,
I personally like the idea, but I would throw out the geometry_columns
to spatial_ref_sys constraint check and just do the check in the
addgeometry call.
Eventually geometry_columns should be a view anyway not a table so
putting in a constraint check just to throw it out later seems silly. I
think Paul also wanted to make 0 the standard rather than -1. God
forbid we have both those entries in spatial_ref_sys.
Regina
-----Original Message-----
From: postgis-devel-bounces at postgis.refractions.net
[mailto:postgis-devel-bounces at postgis.refractions.net] On Behalf Of
Kevin Neufeld
Sent: Thursday, June 26, 2008 1:19 AM
To: PostGIS Development Discussion
Subject: [postgis-devel] Valid SRIDs
Not to long ago in the bug tracker, a user suggested that
ST_AddGeometryColumns() should error out if the supplied SRID is not in
spatial_ref_sys.
What does the team here think? Should PostGIS be responsible for
ensuring correct parameters? (We currently raise exceptions for all
other invalid parameters). If so, the solutions I see are:
1. Modify the plpgsql function to error if the SRID does not exist
2. Put a foreign key constrain on geometry_columns referencing
spatial_ref_sys.
Essentially, if we do this, loading spatial_ref_sys into PostGIS will no
longer be an optional part of the install process. This also means that
we'll have to add a dummy record for an SRID of -1 and perhaps 0.
Personally, I'm undecided. I like enforcing data integrity - it has
saved me many times in the past ... not to mention it's good practice.
But putting the onus on the user also has it's pros.
Thoughts?
-- Kevin
_______________________________________________
postgis-devel mailing list
postgis-devel at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-devel
-----------------------------------------
The substance of this message, including any attachments, may be
confidential, legally privileged and/or exempt from disclosure
pursuant to Massachusetts law. It is intended
solely for the addressee. If you received this in error, please
contact the sender and delete the material from any computer.
More information about the postgis-devel
mailing list