Thank you in advance for your help.
To use the SH Python API, I setup a “Python scripts template” with instance as ID. I’m using WCS requests.
- Are my custom params (9 out of your 11) correctly defined below?
my_l8tcp = ‘return [B04,B03,B02,B08];’
l8tc_request = WcsRequest(data_source=DataSource.LANDSAT8,
layer=‘L8bands’,
bbox=taber,
time=(‘2017-04-01’, ‘2017-10-01’),
resx=‘15m’, resy=‘15m’,
maxcc=0.1,
instance_id=‘my-instance-id’,
image_format=MimeType.TIFF,
data_folder = ‘C:/POC/Ubuntu/MiddleLayer/test’,
custom_url_params={CustomUrlParam.EVALSCRIPT: my_l8tcp,
CustomUrlParam.ATMFILTER: ‘ATMCOR’,
CustomUrlParam.TRANSPARENT: True,
CustomUrlParam.SHOWLOGO: False,
CustomUrlParam.QUALITY: ‘100’,
CustomUrlParam.PREVIEW: ‘0’,
CustomUrlParam.UPSAMPLING: ‘NEAREST’,
CustomUrlParam.DOWNSAMPLING: ‘NEAREST’,
CustomUrlParam.BGCOLOR: False})
-
Do I need to define the custom parameters for all/every layer in my above instance and also exactly define custom params (as above) in my Python script? Or will it be enough that I define just in the Python script and it will supersede any custom params defined for a layer/instance? E.g. S2 “NDVI” defined as cloud cover 50%, but in python code I define maxcc as 0.1 (i.e. 10%), or show logo in the instance but show no logo in my python call?
-
How to correctly define these evalscripts in my Python code?
my_s2tc (S2 true color)
let gain = 2.5;
return [B04, B03, B02].map(a => gain * a);
my_s2fc (S2 false color)
let gain = 2.5;
return [B08, B04, B03].map(a => gain * a);
my_l8tcp (L8 true color pan)
return [B04,B03,B02,B08]
my_l8fcp (L8 false color pan)
return [B05,B04,B03,B08]
-
Configuration utility gives warning that Sentinel products have different end point than Landsat/MODIS/DEM products and so different instances have to be created. Will it be enough if I create just one “Python scripts template” instance to use with Python API? Or do I need to create one “Python scripts template” for S2 and another “Python scripts template” for Landsat/MODIS/DEM?
-
My Python code gives error for crs=EPSG:4326. But when I choose crs=CRS.WGS84, image data is returned as 'wcs_TRUE-COLOR-S2-L1C_EPSG4326_.
-
How to use NICENAME to format downloaded image filenames? This goes into custom params? NICENAME=image-2018-04-11-MODIS.jpg