Hi Even,

On Mon, Feb 19, 2018 at 5:42 AM, Even Rouault <even.roua...@spatialys.com>
wrote:

> Hi Sean
>
>
>
> >
>
> > I've noticed that while GDALCreateWarpedVRT does acquire nodata values,
> and
>
> > thereby nodata-derived masks,
>
>
>
> I see provision for that in GDALAutoCreateWarpedVRT(), not in
> GDALCreateWarpedVRT()
>

Yes, sorry, I meant to write GDALAutoCreateWarpedVRT().


>
>
> > from the source dataset, it does not pick up
>
> > on a source's .msk file and does not acquire a source mask derived from
>
> > that sidecar file.
>
>
>
> I haven't tested in the warped VRT case, but I believe that should
> normally be automatically done by
>
> https://github.com/OSGeo/gdal/blob/trunk/gdal/alg/
> gdalwarpoperation.cpp#L2022
>
>
>
> Are you sure the .msk is properly recognized as a GDAL mask dataset by
> GDAL ? For example when ou do gdalinfo on the source dataset. There is a
> compulsory metadata item that must be set on the .msk. See
>
> "For an external .msk file to be recognized by GDAL," in
> https://trac.osgeo.org/gdal/wiki/rfc15_nodatabitmask
>

Yes, gdalinfo detects the mask:

gdalinfo '/vsicurl/
http://oin-hotosm.s3.amazonaws.com/5a324a622553e6000ce5aaf5/0/3fa181a1-425c-4e53-b49f-ea72884da097.tif
'
Driver: GTiff/GeoTIFF
Files: /vsicurl/
http://oin-hotosm.s3.amazonaws.com/5a324a622553e6000ce5aaf5/0/3fa181a1-425c-4e53-b49f-ea72884da097.tif
       /vsicurl/
http://oin-hotosm.s3.amazonaws.com/5a324a622553e6000ce5aaf5/0/3fa181a1-425c-4e53-b49f-ea72884da097.tif.msk
Size is 48948, 15632
...
Band 1 Block=512x512 Type=Byte, ColorInterp=Red
  Overviews: 24474x7816, 12237x3908, 6119x1954, 3060x977, 1530x489,
765x245, 383x123
  Mask Flags: PER_DATASET
  Overviews of mask band: 24474x7816, 12237x3908, 6119x1954, 3060x977,
1530x489, 765x245, 383x123
  Unit Type: metre
Band 2 Block=512x512 Type=Byte, ColorInterp=Green
  Overviews: 24474x7816, 12237x3908, 6119x1954, 3060x977, 1530x489,
765x245, 383x123
  Mask Flags: PER_DATASET
  Overviews of mask band: 24474x7816, 12237x3908, 6119x1954, 3060x977,
1530x489, 765x245, 383x123
  Unit Type: metre
Band 3 Block=512x512 Type=Byte, ColorInterp=Blue
  Overviews: 24474x7816, 12237x3908, 6119x1954, 3060x977, 1530x489,
765x245, 383x123
  Mask Flags: PER_DATASET
  Overviews of mask band: 24474x7816, 12237x3908, 6119x1954, 3060x977,
1530x489, 765x245, 383x123
  Unit Type: metre

I'm using GDAL 2.2.2.

-- 
Sean Gillies
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to