[postgis-tickets] r17615 - Dealing with IGN SRIDs from Michel Philippenko
Regina Obe
lr at pcorp.us
Thu Jul 18 10:47:19 PDT 2019
Author: robe
Date: 2019-07-18 22:47:19 -0700 (Thu, 18 Jul 2019)
New Revision: 17615
Modified:
trunk/doc/installation.xml
Log:
Dealing with IGN SRIDs from Michel Philippenko
closes https://github.com/postgis/postgis/pull/448
for PostGIS 23.0
Modified: trunk/doc/installation.xml
===================================================================
--- trunk/doc/installation.xml 2019-07-19 05:43:48 UTC (rev 17614)
+++ trunk/doc/installation.xml 2019-07-19 05:47:19 UTC (rev 17615)
@@ -2483,7 +2483,35 @@
<programlisting>ALTER TABLE spatial_ref_sys ADD CONSTRAINT spatial_ref_sys_srid_check check (srid > 0 AND srid < 999000 );</programlisting>
<programlisting>ALTER TABLE spatial_ref_sys ADD PRIMARY KEY(srid));</programlisting>
+
+ If you are upgrading an old database containing french <ulink url="https://en.wikipedia.org/wiki/Institut_g%C3%A9ographique_national">
+ IGN
+ </ulink> cartography, you will have probably SRIDs out
+ of range and you will see, when importing your database, issues like this :
+
+ <programlisting> WARNING: SRID 310642222 converted to 999175 (in reserved zone)</programlisting>
+
+ In this case, you can try following steps : first throw
+ out completely the IGN from the sql which is resulting
+ from postgis_restore.pl. So, after having run :
+
+ <programlisting>perl utils/postgis_restore.pl "/somepath/olddb.backup" > oldbb.sql</programlisting>
+ run this command :
+
+ <programlisting>grep -v IGNF olddb.sql > olddb-without-IGN.sql</programlisting>
+
+ Create then your newdb, activate the required Postgis extensions,
+ and insert properly the french system IGN with :
+
+ <ulink url="https://raw.githubusercontent.com/Remi-C/IGN_spatial_ref_for_PostGIS/master/Put_IGN_SRS_into_Postgis.sql">
+ this script
+ </ulink>
+
+ After these operations, import your data :
+
+ <programlisting>psql -h localhost -p 5432 -U postgres -d newdb -f olddb-without-IGN.sql 2> errors.txt</programlisting>
+
</para>
</listitem>
</orderedlist>
More information about the postgis-tickets
mailing list