Skip to main content

Hello,


I am trying to compute the processing units that will be spent based on user request while using process and statistical APIs as per the processing units definition page (https://docs.sentinel-hub.com/api/latest/api/overview/processing-unit/). I wish to calculate the processing units that will be spent on user request. In this regard, I wish to compute the size of the requested image based on the bounding box input by the user. The request builder option on sentinel hub shows the output size of the image in width and height. I wish to compute the same using the user defined bbox in my code for a fixed resolution of the image, so that I can compute the processing units that will be spent on the basis of the size of the image. Could anybody please guide me in this regard to compute the size of the image (no. of pixels in width and height) using the bounding box and thereby in computing the processing units.


I have attached screenshots of the output that is shown on request builder. I wish to know how I can compute the same using the bounding box, so that I can estimate processing unit cost for the request. How is it calculated?


Thank you.
Screenshot 2023-12-19 163108

Hi,

You can find out more about calculating processing units in our FAQ, which has a section dedicated to this question.


Hi,

Thank you for the link. I have gone through it. I also wish to know specifically about how I can deduce the size of the image requested when the user inputs the bounding box for the required image and the resX and resY parameters (resolution of the image in x and y directions). Just by using the bounding box coordinates, how can I deduce the size of the image provided the resolution is known to me, is my specific query. Thanks


If you are using the Python package, there is actually a function to calculate the size of your image. An example of this is found here.


Reply