Quantcast

[gdal-dev] CreateCopy() from gtiff file does not initialize AREA_OR_POINT metadata

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[gdal-dev] CreateCopy() from gtiff file does not initialize AREA_OR_POINT metadata

Etienne Tourigny-3
When using a driver's CreateCopy function to copy a source dataset in
GTiff format, It seems that  the  AREA_OR_POINT metadata is not
initialized.

This is seemingly  for performance reasons as shown in the code below.
 However, it has the unwanted side-effect that the AREA_OR_POINT
metadata item is not copied over in most (all?) drivers.

This may be worth fixing and certainly worth being documented somewhere.
Are there other drivers which have the same behaviour?

char **GTiffDataset::GetMetadata( const char * pszDomain )
{
[...]
    /* FIXME ? Should we call LookForProjection() to load
GDALMD_AREA_OR_POINT ? */
    /* This can impact performances */

    return oGTiffMDMD.GetMetadata( pszDomain );
}

regards,
Etienne
_______________________________________________
gdal-dev mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: CreateCopy() from gtiff file does not initialize AREA_OR_POINT metadata

Even Rouault
Le jeudi 31 mai 2012 19:47:38, Etienne Tourigny a écrit :

> When using a driver's CreateCopy function to copy a source dataset in
> GTiff format, It seems that  the  AREA_OR_POINT metadata is not
> initialized.
>
> This is seemingly  for performance reasons as shown in the code below.
>  However, it has the unwanted side-effect that the AREA_OR_POINT
> metadata item is not copied over in most (all?) drivers.
>
> This may be worth fixing and certainly worth being documented somewhere.
> Are there other drivers which have the same behaviour?
>
> char **GTiffDataset::GetMetadata( const char * pszDomain )
> {
> [...]
>     /* FIXME ? Should we call LookForProjection() to load
> GDALMD_AREA_OR_POINT ? */
>     /* This can impact performances */
>
>     return oGTiffMDMD.GetMetadata( pszDomain );
> }

See http://trac.osgeo.org/gdal/ticket/4691 for analysis and fix. I didn't feel
that to be critical enough to backport in 1.9 branch (the GTiff driver becoming
so complex that mastering all code path combinations is really challenging)

>
> regards,
> Etienne
> _______________________________________________
> gdal-dev mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
_______________________________________________
gdal-dev mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/gdal-dev
Loading...