Dealing with IGN SRIDs from Michel Philippenko
authorRegina Obe <lr@pcorp.us>
Fri, 19 Jul 2019 05:47:19 +0000 (05:47 +0000)
committerRegina Obe <lr@pcorp.us>
Fri, 19 Jul 2019 05:47:19 +0000 (05:47 +0000)
closes https://github.com/postgis/postgis/pull/448
for PostGIS 23.0

git-svn-id: http://svn.osgeo.org/postgis/trunk@17615 b70326c6-7e19-0410-871a-916f4a2858ee

doc/installation.xml

index f272ec88d046b21c502de550247b7107fef0df41..74bda7c4c6f3429ebb8ae890fe7db772c13f9714 100644 (file)
@@ -2483,6 +2483,34 @@ ALTER EXTENSION postgis_topology UPDATE TO "&last_release_version;next";</progra
                <programlisting>ALTER TABLE spatial_ref_sys ADD CONSTRAINT spatial_ref_sys_srid_check check (srid &gt; 0 AND srid &lt; 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>