[postgis-devel] SRID=-1 special treatment
Markus Schaber
schabi at logix-tt.com
Wed Nov 16 06:06:31 PST 2005
Hello,
I attached a first shot at the SRID=-1 special treatment. It currently
only suppresses the error messages in GIS functions about different
SRIDs if at least one of the SRIDs == -1, but does not change the result
SRID treatment and it is not really havily tested.
Some thoughts:
- By assigning the SRIDs to temporary variables, I try to avoid double
evaluation of the SRID getting methods, and with the && shortcutting,
there should be no speed decrease for equal SRIDs.
- Should I refactor the SRID comparison or even the whole SRID handling
block including the error messages into an own function or preprocessor
macro? (How to avoid double evaluation with a macro? Can we use inline
functions?)
- On geometry operations where only one of the source SRIDs is -1, and
the other one is "valid", should the resulting geometry have -1 or the
valid SRID? I'd vote for the second option, as it allows for error
checking when unioning several geometries with different SRIDs.
- For the geometry_columns special handling: I think we should omit the
check altogether for columns that have SRID=-1, but not allow insertion
of SRID=-1 geometries into "well-defined" columns. Or does it make sense
to restrict a column to SRID=-1?
Markus
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: srid_1.diff
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20051116/c74251a5/attachment.ksh>
More information about the postgis-devel
mailing list