tmap icon indicating copy to clipboard operation
tmap copied to clipboard

Add stretch parameter(s) in tm_raster() and tm_rgb().

Open aterhorst opened this issue 2 years ago • 3 comments

I am working with Landsat 8 surface reflectance imagery. Surface reflectance is expressed as 16-bit integer values. I prefer not to rescale Landsat data to 8-bit.

When I use tm_rgb(), I set the max.value parameter to the highest 16-bit value in my raster stack. However, the result is a dark image. It would be nice if tm_raster() and tm_rgb() allowed users to stretch the data like plotRGB() allows.

Thanks for considering this feature request.

aterhorst avatar May 09 '22 08:05 aterhorst

Perhaps adding a min.value= option would help?

aterhorst avatar May 09 '22 09:05 aterhorst

Great idea. I don't have time to implement this feature in v3, but it will be included in v4.

mtennekes avatar May 10 '22 08:05 mtennekes

Thank you. I think passing the raster::stretch parameters through would be nice, especially if we are working with 16-bit image data.

From: mtennekes @.> Date: Tuesday, 10 May 2022 at 6:04 pm To: r-tmap/tmap @.> Cc: Terhorst, Andrew (Data61, Sandy Bay) @.>, Author @.> Subject: Re: [r-tmap/tmap] Add stretch parameter(s) in tm_raster() and tm_rgb(). (Issue #655)

Great idea. I don't have time to implement this feature in v3, but it will be included in v4.

— Reply to this email directly, view it on GitHubhttps://github.com/r-tmap/tmap/issues/655#issuecomment-1122062493, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABYGZCYH26RNA2WDVE4O243VJIKA3ANCNFSM5VNQCCHQ. You are receiving this because you authored the thread.Message ID: @.***>

aterhorst avatar May 10 '22 08:05 aterhorst

Related: https://github.com/r-tmap/tmap/issues/345

Nowosad avatar Feb 18 '23 19:02 Nowosad