[gdal-dev] Censor area in tiles of aerial image

thomas bonfort thomas.bonfort at gmail.com
Tue Mar 19 00:26:11 PDT 2024


I have a side-question concerning the update-in-place behavior of the gtiff
driver in this case: given that a compressed strile will nearly always be
smaller after this update (due to better compression ratios on the uniform
area), will libtiff overwrite the previous strile in place also, or will it
be appended to the existing file (resulting in a larger final file size)?
regards,
TB

Le mar. 19 mars 2024, 00:15, Frank Warmerdam via gdal-dev <
gdal-dev at lists.osgeo.org> a écrit :

> Carsten,
>
> The gdal_rasterize command allows you to "burn in" polygons from an OGR
> supported datasource into an existing raster.  If your raster is a 3 band
> RGB file, you could use --burn 100 150 200 to burn in the RGB value
> (100,150,200).   This will only work if the raster format you are using
> supports update-in-place.
>
> You would have to regenerate pyramids after this process -- they are not
> automatically updated by GDAL when the "base layer" is updated.
>
> Best regards,
> Frank
>
>
> On Mon, Mar 18, 2024 at 5:34 PM Carsten Lockenkötter via gdal-dev <
> gdal-dev at lists.osgeo.org> wrote:
>
>> Hi,
>>
>>
>>
>> is it possible to censor specific areas of an aerial image using GDAL?
>>
>>
>>
>> I have several smaller tiles that I've already transformed into my
>> desired coordinate system and generated internal pyramids.
>>
>> Subsequently, I would like to censor certain areas based on polygons
>> (e.g., from a shapefile or an Oracle DB) (coloring them grayish).
>>
>> Set the color must be done after transforming coordinatesystem and
>> generating pyramids.
>>
>>
>>
>> I usually use the compiled Windows binaries from gisinternals.com.
>>
>> Presumably, my plan doesn't work with that, right? At least I haven't
>> found anything in that direction.
>>
>> I suppose this could be done with a Python, but I've never worked with
>> Python before.
>>
>> Do I need to adjust the internal pyramids as well? Or do I have to
>> recreate them?
>>
>>
>>
>> Could you please show me a brief example of how it could work, so I have
>> an approach?
>>
>> I just need an idea of how to implement this and possibly some tips on
>> what else I need to consider.
>>
>>
>>
>> Regards,
>>
>> Carsten
>> _______________________________________________
>> gdal-dev mailing list
>> gdal-dev at lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/gdal-dev
>>
>
>
> --
>
> ---------------------------------------+--------------------------------------
> I set the clouds in motion - turn up   | Frank Warmerdam,
> warmerdam at pobox.com
> light and sound - activate the windows | USA: +1 650-701-7823
> <http://voice.google.com/calls?a=nc,%2B16507017823>
> and watch the world go round - Rush    | CAN: +1 343-550-9984
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20240319/84b70fd7/attachment.htm>


More information about the gdal-dev mailing list