0

For web-mapping with OpenLayers 3x and JavaScript (front-end), is it possible to exactly clip ("made to look") images/rasters (Landsat-8 @ 15 & 30 m, Sentinel-2 @ 10 m) to the edges of irregular polys? Clipped perfectly by CSS or alpha masking or other approaches? I guess I can resample to 5 m or something, however I have other functions where I allow the user to click to query pixel values and I don't want to mislead the user to what they click to against what they see..

PolyGeo
  • 65,136
  • 29
  • 109
  • 338
Arun Govind
  • 375
  • 2
  • 9
  • You could clip the rasters individually with GDALWarp -cutline http://www.gdal.org/gdalwarp.html, if your output format is GeoTIFF and compression isn't JPEG the values should be the same as the original. – Michael Stimson Apr 10 '18 at 23:01
  • Thanks, this is the issue (https://goo.gl/E1T54z). Image is a 32 bit greyscale NDVI GeoTIFF image colored with a template .vrt file displayed in EPSG:3857. I'm not a GDAL or webmap expert... – Arun Govind Apr 11 '18 at 16:26
  • Try this then https://gis.stackexchange.com/questions/10117/clipping-raster-with-vector-boundaries-using-qgis, if you don't have QGIS already it's free to install and use, being open source. – Michael Stimson Apr 11 '18 at 21:48
  • I tried with the Clipper tool in QGIS but it creates clip images with jagged edges. My question isn't about image clipping, but rather how I can show the edges of a clip (coarse) image as smooth edges... I tried resampling the original image from 10 m to 1 m and 0.01 m, but then it dramatically increases the image size and isn't efficient for storage at the cost of fancy display... I'm trying to see if I'm missing any ideas. – Arun Govind Apr 11 '18 at 22:06

0 Answers0