[gdal-dev] AREA_OR_POINT vs GDALMD_AREA_OR_POINT
Even Rouault
even.rouault at mines-paris.org
Thu May 29 11:26:40 PDT 2014
Joaquim,
I'm confused by what you are actually trying to do.
GDALMD_AREA_OR_POINT is a #define that evaluates to "AREA_OR_POINT". The string
"GDALMD_AREA_OR_POINT" however is nowhere used in GDAL.
Regarding the MEM driver, GDALMD_AREA_OR_POINT is just a random metadata item.
Some drivers will set GDALMD_AREA_OR_POINT to the GDALMD_AOP_POINT = "Point"
value.
And the GTiff driver uses it to determine if it must apply a half-pixel shift
between the GDAL convention and the GeoTIFF convention.
Even
> Hi,
>
> I made GMT respect as far as possible the AREA_OR_POINT GeoTiff key
> for read/write, but ...
>
> The following was silently ignored (GMT uses the MEM driver)
>
> GDALSetMetadataItem(hDstDS, "AREA_OR_POINT", "Point", NULL);
>
> so digging here and there I found about GDALMD_AREA_OR_POINT, and in
> fact this one is now taken into consideration
>
> GDALSetMetadataItem(hDstDS, "GDALMD_AREA_OR_POINT", "Point", NULL);
>
>
> However, this implies that on reading I have now to test for both
>
> GDALGetMetadataItem(hDataset, "AREA_OR_POINT", NULL)
>
> ---- AND ----
>
> GDALGetMetadataItem(hDataset, "GDALMD_AREA_OR_POINT", NULL)
>
> This means that other codes that pay attention to the AREA vs POINT
> thing will have to do both tests as well and if they do only the first
> one, GeoTiffs created by GDAL will have the problem ignored, and quite
> likely an error in coordinates will follow.
>
> So the question is, why this name duplication (AREA_OR_POINT vs
> GDALMD_AREA_OR_POINT) and why GDALSetMetadataItem() ignores the
> AREA_OR_POINT key?
>
> Thanks
> Joaquim
>
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
--
Geospatial professional services
http://even.rouault.free.fr/services.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20140529/be319b2d/attachment-0001.html>
More information about the gdal-dev
mailing list