earthdaily/qgis-plugin

Issue on the SOIL map

Closed this issue · 6 comments

Describe the bug
When the user choose to create a SOIL map, they are redirect to the coverage panel, but for this kind of map, we do not need to get coverage.

To Reproduce

  1. Go to Geosys coverage panel parameters
  2. Click on the field that you want to get SOIL map (field need to be located in the US area)
  3. Click on the map type SOIL
  4. Clicl on the Search button

Expected behavior
We don't need to access directly to the coverage parameters but to the last parameters of the Geosys plug-in. The user will have the possibility to choose directly the output format.

Screenshots
Coverage_panel

Hi @Samweli and @vermeulendivan may find here a workflow example that can be implemented in your side to test the feature on the production US (only on the US prod) :

Call the catalog imagery APi to get (POST method) to get the season field id :
{{url_GeosysAPI}}/field-level-maps/v4/catalog-imagery?$count=false&Image.Date=%24gte%3A2021-01-01&CoverageType=CLEAR&$limit=20
Call the soil map API to get the SOIL map :

curl --location --request POST 'https://api.geosys-na.net/field-level-maps/v4/maps/sample/soilmap'
--header 'Accept: application/json'
--header 'Content-Type: application/json'
--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IjJDQzMxQzZDOUI5RUM5NUZDQkQ1M0Y3RjVDQjhDQzI1QzA4Mjk5RjlSUzI1NiIsInR5cCI6IkpXVCIsIng1dCI6IkxNTWNiSnVleVZfTDFUOV9YTGpNSmNDQ21mayJ9.eyJuYmYiOjE2NDU3Nzk4ODMsImV4cCI6MTY0NTc4MzQ4MywiaXNzIjoiaHR0cHM6Ly9pZGVudGl0eS5nZW9zeXMtbmEuY29tL3YyLjEiLCJhdWQiOiJodHRwczovL2lkZW50aXR5Lmdlb3N5cy1uYS5jb20vdjIuMS9yZXNvdXJjZXMiLCJjbGllbnRfaWQiOiJtYXBwcm9kdWN0X2FwaSIsInN1YiI6IjEwMDEwODkyMiIsImF1dGhfdGltZSI6MTY0NTc3OTg4MywiaWRwIjoibG9jYWwiLCJnZW82X3N1YiI6IjF0bUl4T3RENUQ1MWFvRXpLT2JyMlkiLCJpYXQiOjE2NDU3Nzk4ODMsInNjb3BlIjpbImdlbzY6YnJpZGdlIiwib3BlbmlkIiwib2ZmbGluZV9hY2Nlc3MiXSwiYW1yIjpbInBhc3N3b3JkIl19.GK8LSMj_vIV2zSq2yTBMD8GcU3msvyBMfizDMwqmeIsoNsJyB6m4lf_yOcdzVjqqzKNEv1EWj5uzxS9J8xEGsWdID7Olya0NYp41NIKezewO4nwrnyyjiWwjrQlF2xQYQDPNhkL6oK1yXwL0HcYw3ZH1yVrhorVSkgsfSsPEHv3lOYTuE5k83VT5woqoSQ26yQIqAIAJPWyP_rACqgGJD8LHPaYc9odMa6ydpw0Y7WFqx11DhBm0CSvoLsy2xxg53jsvg9gFSnslD7Cuz2RPXS1R98q8S6tRuPnZnSwAieJgOCXNlCvs680PeOaV62JyJsQAZ12i4X5PhQDGWF7E7w'
--data-raw '{
"provider": "Shared",
"asset": "USA",
"seasonField": {
"id": "7e9rdbm"
}
}'

Hi @Samweli @LNArtus . Made updates so that the plugin will skip the coverage page and go directly to the map creation section. But still got 'no coverage', so after some investigation, a 'coverage US area' post showed there to be no SOILMAP cases:
{
"coverageType": "CLEAR",
"image": {
"id": "IKc73hpUQ6t2wnh88Qfv5qX9QTLKbpUAQ3I7TUSYRYC",
"availableBands": [
"Nir",
"Red",
"Blue",
"Green"
],
"sensor": "SENTINEL_2",
"soilMaterial": "BARE",
"spatialResolution": 10.0,
"weather": "COLD",
"zenithAngleInDegree": 2.576166,
"date": "2021-11-30"
},
"maps": [
{
"type": "INSEASON_NDVI"
},
{
"type": "INSEASONFIELD_AVERAGE_REVERSE_NDVI"
},
{
"type": "INSEASONFIELD_AVERAGE_NDVI"
},
{
"type": "INSEASON_CVI"
},
{
"type": "INSEASON_CVIN"
},
{
"type": "INSEASON_EVI"
},
{
"type": "INSEASON_GNDVI"
},
{
"type": "COLORCOMPOSITION"
},
{
"type": "OM"
},
{
"type": "YGM"
},
{
"type": "YPM"
},
{
"type": "SAMZ"
}
],
"seasonField": {
"id": "x3yrreq",
"customerExternalId": "VBdolY4zptSNVmZJ/j/PV1nl4taynOE+SU+RI2rRCMQ="
}
}

Hi @vermeulendivan Skip the coverage part is great because for this kind of map you don't need to call coverage API. You just need to have a season field. But I suppose that you create the season field in same time by calling the Coverage API. So a workaround will be on your side, call the coverage api with the map type inseason_NDVI and get the seasonfields ids and after you will be the possibility to create the SOIL map. That make sence ?

Hey @LNArtus . Thanks for the response! I've noticed the same problem with S2REP and reflectance. If you look at the list above, you will note that there are not a maps.type associated with S2REP or reflectance (also using the approach in the postman collection you provided). Should reflectance and S2REP also then be accessed in the manner you explained above? This also seems to be more related to the "New way" and not the "Old way" the plugin has originally been set up to work with, as the plugin needs to acquire the seasonfields id. Is this correct?

Otherwise, you will at the latest receive a response to your email from earlier today tomorrow morning.

Hi @vermeulendivan S2Rep is a new indexe and it's available with the catalog imagery API or Coverage API (Coverage API, old way or new way whenever) and the map type is : "maps": [
{
"type": "INSEASON_S2REP"
}

But this feature is just available in our europe production platform, so if you call the API on our testing platform maybe you will not see the map type S2rep, that does not mean is not a option, just it's mean that you cannot create the S2rep index map with your field test.

@vermeulendivan just to be clear about what is the new way :

The new way is about the use of our new domain in the url => http://api-pp.geosys-na.net/ for the testing platform
http://api.geosys-eu.net => for the Europe platform (production platform)
https://api.geosys-na.net => for the US platform (production platform)

Secondly, is consist to use the catalog imagery and this one can be used with the POST method like your old way.

For the reflectance map, it's same as for the soil map, you cannot create those kind of maps with just the BRM map API.

So like for the soil map, my suggestion for a workarround is : call the catalog imagery API by use the map type information INSEASON_NDVI (POST catalog imagery API, field creation in the same time), get the information you need to create the map (image id or image date and the season field id)
skip the coverage panel part for the user, go directly to the geosys plug-in panel (last window for the user) and create the map at this moment (when the user will click on map format type they want).

but my question is what does it mean to you in the old way?