leaflet-geotiff-2 icon indicating copy to clipboard operation
leaflet-geotiff-2 copied to clipboard

`clip` option has no effect

Open LelandB opened this issue 3 years ago • 2 comments

Hello, I'm trying out clipping on the demo and I can't seem to make it happen. I've added the following clip array that should bisect the tif.

const windSpeedUrl = "http://127.0.0.1:5500/demo/wind_speed.tif";
  // const windSpeedUrl =
  //   "https://danwild.github.io/leaflet-geotiff-2/wind_speed.tif";

  const plottyRenderer = L.LeafletGeotiff.plotty({
    displayMin: 0,
    displayMax: 10,
    clampLow: false,
    clampHigh: false,
  });

  const clipArray = [[-33, 147], [-27, 147], [-27, 159], [-33, 159]]

  const windSpeedLayer = L.leafletGeotiff(windSpeedUrl, {
    renderer: plottyRenderer,
    clip: clipArray,
  }).addTo(map);

What am I doing wrong?

LelandB avatar Apr 14 '21 19:04 LelandB