]> granicus.if.org Git - postgis/commitdiff
Refine user feedback about SRID conversion and reserved zones
authorSandro Santilli <strk@keybit.net>
Mon, 13 Feb 2012 14:17:24 +0000 (14:17 +0000)
committerSandro Santilli <strk@keybit.net>
Mon, 13 Feb 2012 14:17:24 +0000 (14:17 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@9166 b70326c6-7e19-0410-871a-916f4a2858ee

utils/postgis_restore.pl

index 3c09da6adfb55fb563aee19106406cd5562c8a68..d61f35e3405cd9391f45833e6bb33e21473673bf 100755 (executable)
@@ -370,15 +370,15 @@ clamp_srid
 
   if ( $oldsrid < 0 ) {
     $newsrid = 0;
+    printf STDERR "  WARNING: SRID $oldsrid converted to $newsrid (official UNKNOWN)\n";
   } elsif ( $oldsrid > $SRID_MAXIMUM ) {
     $newsrid = $SRID_USER_MAXIMUM + 1 +
       # -1 is to reduce likelyhood of clashes 
       # NOTE: must match core implementation (lwutil.c)
       ( $oldsrid % ( $SRID_MAXIMUM - $SRID_USER_MAXIMUM - 1 ) );
-  }
-
-  if ( $oldsrid != $newsrid ) {
-    printf STDERR "  WARNING: SRID value $oldsrid converted to $newsrid\n";
+    printf STDERR "  WARNING: SRID $oldsrid converted to $newsrid (in reserved zone)\n";
+  } elsif ( $oldsrid > $SRID_USER_MAXIMUM ) {
+    printf STDERR "  WARNING: SRID $newsrid is in reserved zone\n";
   }
 
   return $newsrid;