Ticket #2231 (closed defect: fixed)

Opened 3 months ago

Last modified 3 months ago

GDALReprojectImage() - error with dst srs

Reported by: warmerdam Assigned to: warmerdam
Priority: normal Milestone: 1.5.1
Component: GDAL_Raster Version: unspecified
Severity: normal Keywords: warp
Cc:

Description

The code for GDALReprojectImage() looks as follows, and if no src or dst wkt values are passed in the dst_wkt will be set to the same as the source regardless of whether the destination dataset has a valid and differening srs set on it.

GDALReprojectImage( GDALDatasetH hSrcDS, const char *pszSrcWKT, 
                    GDALDatasetH hDstDS, const char *pszDstWKT,
                    GDALResampleAlg eResampleAlg, 
                    double dfWarpMemoryLimit, 
                    double dfMaxError,
                    GDALProgressFunc pfnProgress, void *pProgressArg, 
                    GDALWarpOptions *psOptions )

{
    GDALWarpOptions *psWOptions;

/* -------------------------------------------------------------------- */
/*      Default a few parameters.                                       */
/* -------------------------------------------------------------------- */
    if( pszSrcWKT == NULL )
        pszSrcWKT = GDALGetProjectionRef( hSrcDS );

    if( pszDstWKT == NULL )
        pszDstWKT = pszSrcWKT;

Change History

02/17/08 00:33:29 changed by warmerdam

  • status changed from new to closed.
  • resolution set to fixed.

Corrected in trunk (r13803) and 1.5 branch (r13804).