Skip to main content

Hey,

How can I retrieve sentinel 2 wms layer only for one country i.e. the returned layer should carry only required area of interest?

You can either use GEOMETRY parameter to clip the output to specific polygon, see:

bb60889fc69c2fe6d1b31968b4621edcba322772.pngsentinel-hub.com
d3714e73b38a87afa3c31502a6696052a7395163.png


How can I clip the image to a specific polygon?



How can I clip the image to a specific polygon? You can add a parameter GEOMETRY as in given example. Simplify geometry to avoid exceeding maximum number of characters in URL.







Alternatively you can use “Map bounds” feature in the configuration of specific WMS instance.
35


When the area of interest is too big consider India boundary,then how can we pass such long geometry in url as geometry parameter?


How do you mean too big? In number of points, resulting in GEOMETRY parameter to be too long?

If yes, then you have to first simplify the geometry.

We are working on new version of the API, which will allow POST type of requests, without the limit. In a few weeks the prototype version should be ready (also for public testing). See

360db83263e79cba7951e7ba15aa4495131aa0f1.pngMedium – 15 Jan 19
7cd96099c765759b272463386c64fb29120cf557.jpg


Becoming a Data Driver in the Cloud for Earth Observation



Sentinel Hub’s Roadmap for 2019




Reading time: 8 min read







We simplified the geometry and it did reduced the number of points.But still the number of points returned are too large to pass in wms url.

I have retrieved geometry by using query task from ArcGIS API for Javascript.



I have attached the image showing the number of rings returned and each ring consists of number of points.If I combine them and pass it as GEOMETRY parameter still the url will not be running correctly.

Is there anything if I am doing wrong please guide me.


WMS uses GET method, which is limited (depends a bit on the browser) to 1000-4000 characters. Based on number of rings in your geometry I feel it is significantly more.

In the next version of API this should be improved.

Until then I suggest you use Configuration utility and draw “Map bounds” manually.


Thank you for the help.


Reply