question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Nearest-neighbor image resampling for ImageryLayer

See original GitHub issue

We develop an application that uses Cesium to display climate data imagery. Many users (usually Earth scientists) would like to see the original grid cell extends in the images. Cesium seems to use (linearily) interpolated textures by default. Is there any possibility to set an ImageryLayer to a nearest-neighbor image resampling so actual grid cells would be displayed as squares? Even a global Cesium (or WebGL) setting would help.

To get an idea, here is a screenshot of the application showing monthly cloud averages in 0.5 degree grid cells. The interpolation applied makes it impossible to distinguish the original grid cells:

image

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
formancommented, Sep 28, 2017

@bagnell thanks, I hope to find some time next week for a PR.

Yeeha: image

1reaction
bagnellcommented, Sep 27, 2017

You can add Samplers to the textures here:

https://github.com/AnalyticalGraphicsInc/cesium/blob/master/Source/Scene/ImageryLayer.js#L743

Set the minification and magnification filters to NEAREST. If the textures need reprojection, you can modify the samplers here:

https://github.com/AnalyticalGraphicsInc/cesium/blob/master/Source/Scene/ImageryLayer.js#L796

Read more comments on GitHub >

github_iconTop Results From Across the Web

Solved: Resampling an imagery layer with locked rasters
Solved: I have a time-enabled MODIS NPP imagery layer for CONUS hosted ... and resampling work fine with ArcGIS Pro with Image Server...
Read more >
Resampling and Reducing Resolution | Google Earth Engine
Display the Landsat image using the default nearest neighbor resampling. // when reprojecting to Mercator for the Code Editor map.
Read more >
Imagery appearance—ArcGIS Pro | Documentation
Nearest Neighbor more closely retains the original pixel values, whereas the other resampling techniques produce a smoother image by interpolating values.
Read more >
How does Nearest Neighbor Image Resampling work in ...
Following R.K. suggestion, I have made 3 diferent rasters to test the NN resampling method in arcGIS and when passing from InRas resolution...
Read more >
RDW_ForestEcology/FIA_AboveGroundForestCarbon ...
Through application of a nearest-neighbor imputation approach, mapped estimates of forest carbon density were developed for the contiguous United States ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found