From: Regina Obe Date: Sun, 23 Apr 2017 20:21:53 +0000 (+0000) Subject: Get rid of logic that set out_srid to same as input srid and change to not try to... X-Git-Tag: 2.4.0alpha~127 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=21b38f049809578c0fdc8dc0cc984e4538a99ba0;p=postgis Get rid of logic that set out_srid to same as input srid and change to not try to transform when out_srid is unknown. References #3738 for PostGIS 2.4 trunk git-svn-id: http://svn.osgeo.org/postgis/trunk@15361 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/raster/loader/raster2pgsql.c b/raster/loader/raster2pgsql.c index d7b2d97a8..4db7a1ead 100644 --- a/raster/loader/raster2pgsql.c +++ b/raster/loader/raster2pgsql.c @@ -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 */