[postgis-tickets] [PostGIS] #3738: raster: Using -s and -R together in raster2pgsql transforms raster data instead of setting srid
PostGIS
trac at osgeo.org
Sun Apr 23 10:12:01 PDT 2017
#3738: raster: Using -s and -R together in raster2pgsql transforms raster data
instead of setting srid
---------------------+---------------------------
Reporter: robe | Owner: robe
Type: defect | Status: new
Priority: medium | Milestone: PostGIS 2.4.0
Component: raster | Version: 2.3.x
Resolution: | Keywords:
---------------------+---------------------------
Comment (by robe):
quick scan of raster2pgsql
http://postgis.net/docs/doxygen/2.4/db/dd0/raster2pgsql_8c_source.html,
looks like we already support the -s srid_from:srid_to syntax for
transformation.
{{{
2312 if (CSEQUAL(argv[i], "-s") && i < argc - 1) {
2313 optarg = argv[++i];
2314 ptr = strchr(optarg, ':');
2315 if (ptr) {
2316 *ptr++ = '\0';
2317 sscanf(optarg, "%d", &config->srid);
2318 sscanf(ptr, "%d",
&config->out_srid);
2319 } else {
2320 config->srid = config->out_srid =
atoi(optarg);
2321 }
2322 }
}}}
Thought haven't verified it works and the documentation of it is commented
out:
{{{
/*
333 printf(_(
334 " -s [<from>:]<srid> Set the SRID field. Defaults
to %d.\n"
335 " Optionally reprojects from given SRID (cannot
be used with -Y).\n"
336 " Raster's metadata will be checked to determine
an appropriate SRID.\n"
337 " If a srid of %d is provided (either as from or
as target).\n"
338 ), SRID_UNKNOWN, SRID_UNKNOWN);
339 */
340 printf(_(
341 " -s <srid> Set the SRID field. Defaults to %d. If
SRID not\n"
342 " provided or is %d, raster's metadata will be
checked to\n"
343 " determine an appropriate SRID.\n"
344 ), SRID_UNKNOWN, SRID_UNKNOWN);
}}}
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/3738#comment:4>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-tickets
mailing list