Skip to main content

Hello, I have added NDVI layer to my map using Leaflet library, with the setup from the Playground. I am now trying to have NDVI only for specific polygons on my map. My map send multiple requests and it works fine when I don’t send the geometry parameter, but when I set it I only get transparent/blank images. My payload (in browser) look like this:


service: WMS

request: GetMap

layers: NDVI

styles:

format: image/jpeg

transparent: false

version: 1.1.1

urlProcessingApi: https://services.sentinel-hub.com/ogc/wms/{myId}

maxcc: 20

time: 2023-09-14/2023-09-19

geometry: POLYGON ((42.40060512262515 19.25202190876007,42.40204307436111 19.252697825431827,42.40086260951792 19.257230758666996,42.399416707888896 19.256522655487064,42.40060512262515 19.25202190876007))

name: ndvi

preset: NDVI

width: 512

height: 512

srs: EPSG:3857

bbox:19.242553710937504,42.39912215986002,19.248046875000004,42.40317854182803

Hey,

the payload itself looks correct. The only problem is the order of the coordinates in the geometry or the bbox parameter.


If you know that the geometry is correct, then just change the order of latitude and longitude of the bbox.


bbox: c0_0, c0_1, c1_0, c1_1 
=>
bbox: c0_1, c0_0, c1_1, c1_0

If you know that the bbox is correct, change the order in the geometry.


geometry: POLYGON ((c0_0 c0_1, c_1_0 c1_1, c2_0 c2_1, c3_0 c3_1, c4_0 c4_1))
=>
geometry: POLYGON ((c0_1 c0_0, c_1_1 c1_0, c2_1 c2_0, c3_1 c3_0, c4_1 c4_0))

This forum post might help you as well: How to get sentinel hub image overlay only for the bounds of drawer polygon in React leaflet


Hope this helps.

Cheers


This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.


Reply