Timeline for Geoserver stretch WMS color ramp to current view extent?
Current License: CC BY-SA 4.0
21 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Aug 30, 2022 at 13:52 | vote | accept | staf | ||
Aug 25, 2022 at 4:02 | answer | added | staf | timeline score: 0 | |
Aug 25, 2022 at 4:01 | comment | added | staf | The Cesium requirement really complicates it now that I think about it! | |
Aug 25, 2022 at 4:00 | comment | added | staf | @BarryCarter thanks, creative solution! But needs to work in Cesium too, 3D mode, where the viewport may include looking into the distance (our application has 2D leaflet and 3D Cesium modes so needs to do a rough job of perfroming well in both)! Might be a bit stuck here. | |
Aug 24, 2022 at 12:40 | comment | added | Barry Carter | You could create large (2048x2048) overlapping tiles with color ramps specific to the tile and then choose which tile to show based on the user's viewport. Since the tiles overlap, you can ensure the viewer is always viewing no more than one tile, avoiding discontinuity at the edges. I'm not entirely happy with this solution, however. | |
Aug 24, 2022 at 2:00 | comment | added | staf | @BarryCarter doesnt need to be accurate, its more to provide a good relative visualisation experience for local areas. But yes fine to include pixels off the edge of the map. Limited viewport size we cant really assume unfortunately, as the application is used on a variety of size monitors... On my laptop its 1290x915. What were you thinking Barry? | |
Aug 23, 2022 at 11:26 | comment | added | Barry Carter | How accurate do you need this to be? For example, can the color ramp include pixels that are just off the edge of the map and thus invisible? Can we assume your users have a limited viewport size (eg, 1024x1024)? | |
Aug 23, 2022 at 6:16 | comment | added | staf |
@user30184 have tested and normalize doesnt work with a user defined color ramp
|
|
Aug 23, 2022 at 1:00 | comment | added | staf | @user30184 Ill try normalize and report, but I think this will require a min and max value. I wonder what the most efficient way to calculate the mon and max of pixels in the current bounding box would be, maybe WPS... | |
Aug 23, 2022 at 0:58 | comment | added | staf | @IanTurton I need to define a color ramp though, and apply that to the current map extent. | |
Aug 23, 2022 at 0:57 | comment | added | staf | @BarryCarter yes it would be great to do client side with COGs but this is to work into an existing system and would require a big refactor. | |
Aug 23, 2022 at 0:55 | comment | added | staf | @BarryCarter thats correct | |
Aug 22, 2022 at 23:48 | comment | added | Barry Carter | @user30184 As the OP notes above, wouldn't "normalize" require providing a min and max value? I think the OP wants a solution that "automatically" uses the max and min value in a given view (which can change with every zoom and pan). An obvious solution is to compute the min/max each time, but that sounds slow | |
Aug 22, 2022 at 22:41 | comment | added | user30184 | Try "normalize" and report your experience. Why would you need a function that works only with zooming but not with panning if that is what you meant? | |
Aug 22, 2022 at 12:51 | comment | added | Barry Carter | COGs actually look pretty cool: is there a reason you want to avoid using them? Another option (which I haven't implemented yet) is to pre-color large overlapping tiles using a color key specific to that tile (easy, but nontrivial, details on request) | |
Aug 22, 2022 at 12:17 | comment | added | Barry Carter | @IanTurton I think this differs from that question because it applies to panning too (I'm assuming), not just zooming. I actually meant to ask a similar question but never got around to it. | |
Aug 22, 2022 at 11:51 | comment | added | Ian Turton | see gis.stackexchange.com/questions/422532/… | |
Aug 22, 2022 at 6:55 | comment | added | Ian Turton | If you use a simple raster style it will do this by default | |
Aug 22, 2022 at 6:16 | comment | added | staf | I think for the normalize function we would need to specify the min and max of the raster data we want shown in the current bounding box, or it will just use the min and max of the entire band... Am I wrong? | |
Aug 22, 2022 at 5:26 | comment | added | user30184 | I would try the normalize function docs.geoserver.org/latest/en/user/styling/sld/reference/…. | |
Aug 22, 2022 at 4:58 | history | asked | staf | CC BY-SA 4.0 |