]> granicus.if.org Git - postgis/commitdiff
Get rid of logic that set out_srid to same as input srid and change to not try to...
authorRegina Obe <lr@pcorp.us>
Sun, 23 Apr 2017 20:34:18 +0000 (20:34 +0000)
committerRegina Obe <lr@pcorp.us>
Sun, 23 Apr 2017 20:34:18 +0000 (20:34 +0000)
Closes #3738 for PostGIS 2.3

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

NEWS
raster/loader/raster2pgsql.c

diff --git a/NEWS b/NEWS
index c9bbdd63af208e9d234105ba96a415f9bec9b372..91f086ff5cf38dd074766900d42ba64c4793ad13 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,8 @@ YYYY/MM/DD
   * Bug Fixes
 
   - #3711, Azimuth error upon adding 2.5D edges to topology
+  - #3738, raster: Using -s without -Y in raster2pgsql transforms 
+           raster data instead of setting srid
 
 PostGIS 2.3.2
 2017/01/31
index d7b2d97a87b165adc14f8ebc4507e5e34b674a6f..4db7a1ead85268e48016eb1c8cc5504c57b968cd 100644 (file)
@@ -2317,7 +2317,7 @@ main(int argc, char **argv) {
                                sscanf(optarg, "%d", &config->srid);
                                sscanf(ptr, "%d", &config->out_srid);
                        } else {
-                               config->srid = config->out_srid = atoi(optarg);
+                               config->srid = atoi(optarg);
                        }
                }
                /* band index */
@@ -2648,15 +2648,11 @@ main(int argc, char **argv) {
                }
        }
 
-       if (config->srid != config->out_srid) {
+       if (config->srid != config->out_srid && config->out_srid != SRID_UNKNOWN) {
                if (config->copy_statements) {
                        rterror(_("Invalid argument combination - cannot use -Y with -s FROM_SRID:TO_SRID"));
                        exit(1);
                }
-               if (config->out_srid == SRID_UNKNOWN) {
-                       rterror(_("Unknown target SRID is invalid when source SRID is given"));
-                       exit(1);
-               }
        }
 
        /* register GDAL drivers */