[postgis-devel] [PostGIS] #1505: Deal with database dumps containing geometries with SRID > MAX_SRID
PostGIS
trac at osgeo.org
Wed Feb 8 15:55:20 PST 2012
#1505: Deal with database dumps containing geometries with SRID > MAX_SRID
---------------------+------------------------------------------------------
Reporter: strk | Owner: pramsey
Type: defect | Status: new
Priority: high | Milestone: PostGIS 2.0.0
Component: postgis | Version: trunk
Keywords: |
---------------------+------------------------------------------------------
Comment(by pramsey):
OK, here's the plan...
If the SRID is > MAX_SRID we will take its 16-bit CRC. We'll then add that
to the lower bound of a reserved space we can create to store out of range
SRIDs. The advantage of the CRC is that it's deterministic, so we can
apply the same trick if people insert a spatial_ref_sys record that is out
of range: re-write the srid value and then insert it. That way a dump that
includes geometries and spatial_ref_sys entries that are out of range will
get re-written to use alternate SRIDs that are in range but still link up
the geometry to the spatial_ref_sys srid value.
This is the best I can do. We can add in notices to try and get people to
see the problem and be aware for the future. We might alternative re-write
the auth_srid and auth_name when translating an out of bounds
spatial_ref_sys entry, but that would be a nicety.
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/1505#comment:1>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-devel
mailing list