stefanbrand / masterdatacube Goto Github PK
View Code? Open in Web Editor NEWCode programmed during my master's thesis
Code programmed during my master's thesis
Grids covering the whole UTM stripe from equator to almost poles and from left projection bounds rounded to the nearest eastling of 10[m] resolution to match Sentinel-2 pixel grid. (UTM North projection definition projected Bounds: 166021.4431, 0.0000, 833978.5569, 9329005.1825)
GridDefinition(
grid=None,
shape=[8, 1],
bounds=[166020.0, -50000, 1476740, 10435760],
srs={"epsg": 32632},
is_global=False
)
Zoom0 tiles over the whole grid
Sentinel-2 Scene in UTM-32 with zoom9 tile edge fitting the 10[m] pixel grid:
Contrary to the synchronous Sentinel Hub, requesting userdata.json
doesn't work for Sentinel Hub Batch API. After removing
{
"identifier": "userdata",
"format": {
"type": "application/json"
}
}
from the requested responses
, the process doesn't return FAILED
anymore.
The API reference also states that requesting userdata
is permitted: https://docs.sentinel-hub.com/api/latest/reference/#operation/createNewBatchProcessingRequest
In order to make results comparable, the employed hardware must be made transparent.
I cancelled this request after almost 4 days:
'id': '4293b3d0-afba-4df3-b7c9-6b0ed9725ea4',
'processRequest': {'input': {'bounds': {'bbox': [16.446445736463346,
47.680841561177864,
16.49776618971013,
47.72587417451863],
'geometry': None,
'properties': {'crs': 'http://www.opengis.net/def/crs/OGC/1.3/CRS84'}},
'data': [{'location': 'AWS:eu-central-1',
'dataFilter': {'timeRange': {'from': '2017-09-01T00:00:00Z',
'to': '2018-11-30T00:00:00Z'},
'mosaickingOrder': 'mostRecent',
'maxCloudCoverage': 100.0},
'processing': None,
'tileList': None,
'id': None,
'type': 'S2L2A'}]},
'output': {'width': None,
'height': None,
'resx': None,
'resy': None,
'responses': [{'identifier': 'B02', 'format': {'type': 'image/tiff'}},
{'identifier': 'B03', 'format': {'type': 'image/tiff'}},
{'identifier': 'B04', 'format': {'type': 'image/tiff'}},
{'identifier': 'B05', 'format': {'type': 'image/tiff'}},
{'identifier': 'B06', 'format': {'type': 'image/tiff'}},
{'identifier': 'B07', 'format': {'type': 'image/tiff'}},
{'identifier': 'B08', 'format': {'type': 'image/tiff'}},
{'identifier': 'B8A', 'format': {'type': 'image/tiff'}},
{'identifier': 'B11', 'format': {'type': 'image/tiff'}},
{'identifier': 'B12', 'format': {'type': 'image/tiff'}},
{'identifier': 'NDVI', 'format': {'type': 'image/tiff'}},
{'identifier': 'GNDVI', 'format': {'type': 'image/tiff'}},
{'identifier': 'BNDVI', 'format': {'type': 'image/tiff'}},
{'identifier': 'CVI', 'format': {'type': 'image/tiff'}},
{'identifier': 'NDSI', 'format': {'type': 'image/tiff'}},
{'identifier': 'NDWI', 'format': {'type': 'image/tiff'}}]},
'dataProduct': None,
[...]
'tilingGridId': 0,
[...]
'status': 'PROCESSING',
'userAction': 'CANCEL',
[...]
'resolution': 10.0,
[...]
'created': '2020-04-24T08:33:09.632Z',
'valueEstimate': 8519.558595300987,
'tileCount': 1,
'tileWidthPx': 2004,
'tileHeightPx': 2004}
The crs
parameter doesn't seem to influence the output CRS. The result of the Batch API is always in UTM.
"processRequest": {
"input": {
"bounds": {
"bbox": [],
"geometry": {},
"properties": {
"crs": "http://www.opengis.net/def/crs/OGC/1.3/CRS84"
}
},
"data": []
},
"output": {},
"evalscript": "string"
},
Also the documentation specifically mentions UTM, but doesn't talk about other CRS.
Note that the processing results might be in different UTM zones (and thus different CRSs) if your area of interest intersects with more than one UTM zone.
The tilingGridId
parameter also doesn't affect output CRS.
Polling in an interactive Python notebook is probably not the best idea. During polling, which can take hours, the notebook is busy
and interactivity is gone. There must be better ways to do this.
I want to retrieve the total execution time of my request. Ideally the REST response schema for a Request ID
would contain two elements:
dateCreated
anddateFinished
This way execution time could be retrieved at any point in the future (as long as the request is stored server-side).
Besides, the oauth2
token expires after 1 hour and has to be refetched periodically. Also, I'm dependent on my computer not going to stand-by. The Jupyter Lab tab has to be open at all times.
In order to compare performance with existing tools, the exact definition of the tiling grids used in Sentinel Hub Batch API is relevant information. Below is a table of available tiling grids:
If I specify only one input band, the result is empty (all pixels contain value 0). If I run the same request with two input bands, output is as expected (pixels populated with real values).
According to the API docs there is a query parameter search
when GET
ting a list of all batch requests.
I don't understand how I can use this parameter.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.