[FEATURE]: Enable no resampling by raster tiler
See original GitHub issueThank you for helping us improve solaris
!
Summary of the bug
I ran the rio tiler tutorial example on a Landsat Analysis Ready Data Scene to tile it into 512x512 chips. But new negative values are added that weren’t there before in the original dataset (which only had -9999).
Steps to reproduce the bug
Please either paste sample code used to generate the buggy behavior below, or provide step-by-step instructions to reproduce the problem.
import solaris as sol
import os
raster_tiler = sol.tile.raster_tile.RasterTiler(dest_dir='test_solaris', # the directory to save images to
src_tile_size=(512, 512), # the size of the output chips
verbose=True,
nodata=-9999)
raster_tiler.tile('/mnt/cropmaskperm/test-landsat/scene/LT05_L1TP_029031_20050316_20160912_01_T1_sr.tif')
bigarr = skio.imread('/mnt/cropmaskperm/test-landsat/scene/LT05_L1TP_029031_20050316_20160912_01_T1_sr.tif')
arr = skio.imread("test_solaris/LT05_L1TP_029031_20050316_20160912_01_T1_sr_696765_4625505.tif")
np.unique(arr[...,2])
np.unique(bigarr)
8578 in np.unique(bigarr)
array([-9999, -9998, -9997, ..., 8467, 8578, 19423], dtype=int16) #chip arr
array([-9999, -898, -897, ..., 8923, 8960, 20000], dtype=int16) # src arr
False # negative and positive values are changed, the src arr value should be in the chip arr
Steps to reproduce the behavior: Run the rio tiler on a Landsat scene and check if the chip array values are in the source scene. If not it means values have been mutated in the tiling step.
Expected behavior
The tiling step shouldn’t mutate the values
Environment information
- OS: ubuntu 16
solaris
version: 0.1.3- python version: 3.6
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
Introduction to tiler
The tiler package provides a map tile-generator function for creating map tile sets for use with packages such as leaflet . In addition...
Read more >RasterTiler
The RasterTiler accepts raster features, and divides them into smaller tiles according ... Supports number of horizontal/vertical tiles attribute, No, Yes ...
Read more >Manage hosted tile layers—ArcGIS Online Help | Documentation
Because tiles are created automatically when they are needed, no resampling occurs when users pan or zoom around the tile layer; tiles are...
Read more >MapTiler, GDAL2Tiles, and Raster Resampling
So I've been using MapTiler to create some quick raster tilesets from a ... Crucially, I could see no way to specify the...
Read more >Release Notes - rio-tiler
add asset_as_band option in MultiBaseReader tile, part, preview, feature and point ... update rio-tiler.reader.read/part to avoid using WarpedVRT when no ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @rbavery,
Great point on the EPSG code issue. Let me chat with the team here regarding defaulting to re-project or leaving it alone. This topic came up a lot as we were writing the initial implementation and we eventually settled on the solution that’s implemented, but given this context might be willing to switch.
Resolved with #294!