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:
sentinel-hub.comHow 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.
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
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
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.