Ok finally getting back to this. I read through some of the docs, looked at the request builder, and tried out the example you linked above. I also setup a configuration for processing Sentinel-1 in our account (which I think you can find that – there is only one of them). When I use the “SHConfig()” function I specify the “instance_id” of the configuration.
Several problems arrise:
processing units used is way more than expected (like 3 pu per request for a small boundary – see below). I expected something like 0.01 pu.
Returned data doesn’t make sense in multiple ways. I specify I want a geotiff (.TIFF) bytestring but it’s returning a numpy array, and the size is weird (it’s a square shape when my bbox is rectangular). I don’t really understand why the “SentinelHubRequest” has a “size” input when the bbox and processing functions selected for S-1 determine the size.
I’ve already specified a configuration (the instance_ID noted above). Why can’t I just send a boundary and date range and get back all the processed imagery available for S-1 in that range using the processing setup in my configuration? It seems this requires me to specify the eval script and input_data which I shouldn’t have to since the endpoint has already got the configuration specified.
Thanks – under usage then under the OGC Requests I’m seeing 7.92 PU over the last 24 hours which was all via me calling the API. I did make 3 requests as you say…but strangely that’s just the OAuth client ID. My endpoint from the configuration utility (the other two instance IDs that show 7 and 16 requests with 2 and 8 PUs are the one I created and used with the SHconfig, along with also the oauth ID). Something appears to be happening that’s not very transparent to me.
the requests you are making with the code above are going to processAPI and are related to OAuth client ID. The second set are some WMS requests that you (or somene else knowing your instance ID) is making in parallel.
Perhaps best to delete the instance ID in the Configuration utility and run the code again
Returned in-memory data will by default be in the form of numpy arrays. But you can provide data_folder parameter and call request.get_data(save_data=True) which will also save GeoTIFF images to disk. More about this in the docs.
Bounding box and processing functions are not enough to define the size/resolution of your image. This is especially important in WGS 84 where due to the nature of the projection images never have a constant resolution. Therefore users have to provide either size or resolution parameter according to definitions in the docs.
The service and the basic SentinelHubRequest class do not assume that a user would want all images from a time range. But you can achieve that by combining these requests with a Catalog API request like it is shown in this example.
Hi Matej – can you suggest a way to specify the resolution or size? I see both of those are a tuple, but when I’ve process S-1 or S-2 imagery with SNAP it has output a set resolution (10m per pixel) without me having to specify anything in that regard. I know adding multi-looking or filtering can reduce S-1 resolution, but I’ve never had to “define” it – can you clarify for me?
Parameters resolution and size are tuples so that you can specify the values for x and y dimensions separately. The problem with resolution parameter is that it has to be specified in units of the CRS that you are working in. So you have 2 options:
Because you are working in WGS 84 you have to calculate approximately how much latitude and longitude degrees is 10 meters for your bounding box and use those values.
Convert your bounding box to a UTM CRS where units are meters and then use parameter resolution=(10, 10).
I recommend the 2nd option because working in UTM will ensure that your entire bounding box will have the same resolution.