eurodatacube / eodash

Software behind the RACE dashboard by ESA and the European Commission (https://race.esa.int), the Green Transition Information Factory - GTIF (https://gtif.esa.int), as well as the Earth Observing Dashboard by NASA, ESA, and JAXA (https://eodashboard.org)
https://race.esa.int
MIT License
89 stars 43 forks source link

Integration of Wind turbine detections #2183

Closed santilland closed 1 year ago

santilland commented 1 year ago

We received geojson with bbox detections geometry, confidence and s2 aquisition date. Approach would be to convert data to "pois" allowing for clustering ability, then load geometries to geodb so that they can be fetched once poi is selected.

sample JSON

{
"type": "FeatureCollection",
"name": "wind-turbines-austria-dhi-eox-WGS84-test",
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } },
"features": [
{ "type": "Feature", "properties": { "id": "5", "detection_time": 20230112.0, "confidence": 0.85 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 16.393509680729135, 48.714404129190974 ], [ 16.39405329486635, 48.714397552151212 ], [ 16.394043354150476, 48.714037816203039 ], [ 16.393499743886604, 48.71404439316008 ], [ 16.393509680729135, 48.714404129190974 ] ] ] } },
{ "type": "Feature", "properties": { "id": "6", "detection_time": 20230112.0, "confidence": 0.76 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 16.720413139329878, 48.668871130231537 ], [ 16.720956179171274, 48.6688630166081 ], [ 16.720943927627385, 48.668503333677663 ], [ 16.720400891647255, 48.668511447199073 ], [ 16.720413139329878, 48.668871130231537 ] ] ] } },
{ "type": "Feature", "properties": { "id": "7", "detection_time": 20230112.0, "confidence": 0.91 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 16.580609852705944, 48.667725905792146 ], [ 16.581152918482129, 48.667718451345003 ], [ 16.581144476393792, 48.667448670097805 ], [ 16.580601413514195, 48.667456124474633 ], [ 16.580609852705944, 48.667725905792146 ] ] ] } }
]}

expected table structure: aoi, aoi_id, indicator, geometry, time, input_data, eo_sensor, measurement_value

where: aoi = coordinates of center point of the detection - lat,lon string aoi_id = some unique ID of the detection (can be stringified number autoincrement) indicator = 'REP1-detections' geometry = the detection geometry time = to be parsed from the s2 aquisition date, save as ISO8601 input_data = "S2L2A" eo_sensor = "S2L2A" sub_aoi = the detection geometry as a WKT measurement_value = the confidence

Example same structure from eodash tables but not all columns need to be defined for eodash client.

[
    {
        "id": 25,
        "created_at": "2023-02-22T16:12:51.808006+00:00",
        "modified_at": null,
        "geometry": "0101000020E6100000CDCCCCCCCC9458C00000000000404340",
        "aoi": "38.5,-98.325",
        "aoi_id": "US10",
        "city": "Kansas",
        "color_code": "/",
        "country": "US",
        "data_provider": "JAXA・MAFF-Japan",
        "description": "Vegetation Index Time Series",
        "eo_sensor": "Terra・Aqua/MODIS",
        "indicator_code": "VITS",
        "indicator_name": "Normalized Difference Vegetation Index",
        "indicator_value": "/",
        "input_data": "JASMAI product",
        "measurement_value": "0.2934552",
        "method": "Half Monthly and Area Average of NDVI",
        "reference_description": "Normalized Difference Vegetation Index [climatic value]",
        "reference_time": "2020-01-09T00:00:00",
        "reference_value": "[0.3333409]",
        "region": "/",
        "rule": "/",
        "site_name": "/",
        "sub_aoi": "MULTIPOLYGON (((-102.039569 36.999809, -102.039935 37.093559, -102.040326 37.187309, -102.040643 37.281083, -102.04101 37.374858, -102.0414 37.468608, -102.041742 37.562358, -102.042084 37.656108, -102.042474 37.749833, -102.042865 37.843632, -102.043207 37.937358, -102.043573 38.031108, -102.043964 38.124858, -102.044354 38.218656, -102.044672 38.312382, -102.045038 38.406156, -102.045429 38.499931, -102.045819 38.593705, -102.046161 38.687455, -102.046527 38.781205, -102.046918 38.875004, -102.047284 38.96873, -102.04765 39.062504, -102.047992 39.156254, -102.048383 39.250004, -102.048773 39.343803, -102.049091 39.437553, -102.049457 39.531327, -102.049847 39.625077, -102.050189 39.718852, -102.050555 39.812602, -102.050922 39.906327, -102.051263 40.000102, -101.814838 40.000102, -101.605219 40.000102, -101.395624 40.000102, -101.186005 40.000102, -100.97641 40.000102, -100.766815 40.000102, -100.557221 40.000102, -100.347626 40.000102, -100.138007 40.000102, -99.928412 40.000102, -99.718817 40.000102, -99.509222 40.000102, -99.299628 40.000102, -99.090057 40.000102, -98.880438 40.000102, -98.670844 40.000102, -98.461249 40.000102, -98.251654 40.000102, -98.042059 40.000102, -97.83244 40.000102, -97.622846 40.000102, -97.413251 40.000102, -97.203656 40.000102, -96.994061 40.000102, -96.784442 40.000102, -96.574847 40.000102, -96.365253 40.000102, -96.155658 40.000102, -95.946063 40.000102, -95.736444 40.000102, -95.526849 40.000102, -95.317255 40.000102, -95.260468 39.959696, -95.247406 39.944242, -95.236176 39.941654, -95.223554 39.940092, -95.214716 39.936967, -95.208051 39.928446, -95.204218 39.920097, -95.199677 39.912602, -95.190839 39.906547, -95.182123 39.904496, -95.161298 39.90269, -95.149872 39.899125, -95.13891 39.892778, -95.112299 39.868681, -95.09118 39.860722, -95.067816 39.865556, -95.046845 39.876152, -95.016815 39.896488, -95.001874 39.902885, -94.984613 39.905839, -94.961176 39.906547, -94.948187 39.901396, -94.941376 39.889408, -94.941864 39.875712, -94.950604 39.86558, -94.935834 39.851664, -94.891644 39.831181, -94.882343 39.820903, -94.883368 39.810649, -94.888129 39.79102, -94.889179 39.779643, -94.885443 39.767436, -94.878021 39.760307, -94.872626 39.753398, -94.874896 39.74207, -94.890839 39.729594, -94.912909 39.730986, -94.961176 39.74207, -94.969354 39.738725, -94.974725 39.730546, -94.977655 39.72039, -94.980634 39.695976, -94.986469 39.689628, -94.99516 39.686405, -95.005853 39.680619, -95.037738 39.655863, -95.053656 39.638847, -95.060468 39.621659, -95.059393 39.600102, -95.060223 39.588945, -95.063886 39.580693, -95.07514 39.574931, -95.101679 39.57371, -95.108905 39.570756, -95.110541 39.550346, -95.098822 39.530229, -95.080829 39.514823, -95.063886 39.508695, -95.057733 39.501127, -95.035468 39.465507, -95.025726 39.454081, -95.017767 39.450102, -94.999335 39.443583, -94.95744 39.41995, -94.95368 39.413993, -94.94848 39.398149, -94.943793 39.392631, -94.899701 39.385185, -94.908588 39.367021, -94.900995 39.327153, -94.879022 39.28726, -94.844769 39.26912, -94.835053 39.259477, -94.833856 39.238383, -94.829584 39.217289, -94.810638 39.20767, -94.790448 39.202787, -94.746234 39.179887, -94.724066 39.172904, -94.693158 39.173783, -94.678217 39.172514, -94.668109 39.173271, -94.663226 39.172904, -94.658148 39.169853, -94.655951 39.161064, -94.652704 39.159257, -94.6289 39.157719, -94.612543 39.152812, -94.610468 39.14434, -94.624628 39.132499, -94.623285 39.130888, -94.623285 39.128007, -94.62226 39.124491, -94.617743 39.123149, -94.617743 39.116191, -94.617743 39.042997, -94.617743 38.915336, -94.617767 38.787602, -94.617816 38.659916, -94.617816 38.532182, -94.617816 38.404472, -94.617865 38.276786, -94.617889 38.149101, -94.617889 38.021366, -94.617889 37.893656, -94.617914 37.765971, -94.617963 37.638285, -94.617963 37.510575, -94.617963 37.382914, -94.617963 37.25518, -94.617963 37.127494, -94.618036 36.999809, -94.849091 36.999809, -95.080145 36.999809, -95.311224 36.999809, -95.542328 36.999809, -95.773407 36.999809, -96.004511 36.999809, -96.23559 36.999809, -96.466693 36.999809, -96.697772 36.999809, -96.928851 36.999809, -97.159955 36.999809, -97.391058 36.999809, -97.622137 36.999809, -97.853217 36.999809, -98.084271 36.999809, -98.31535 36.999809, -98.546454 36.999809, -98.777509 36.999809, -99.008612 36.999809, -99.239691 36.999809, -99.470795 36.999809, -99.701874 36.999809, -99.932977 36.999809, -100.164056 36.999809, -100.395136 36.999809, -100.626239 36.999809, -100.857318 36.999809, -101.088422 36.999809, -101.319525 36.999809, -101.550604 36.999809, -101.781659 36.999809, -102.039569 36.999809)))",
        "time": "2020-01-09T00:00:00",
        "update_frequency": "Half Monthly",
        "y_axis": "Normalized Difference Vegetation Index [Dimensionless]"
    }
]
lubojr commented 1 year ago

@patrick-griffiths @kegro Wind turbine POIs are Integrated in https://gtif-testing.eox.at/gtif_windmill/

Patrick1G commented 1 year ago

@lubojr nice to see this!

    • A key feature will be to enable overlay of Sentinel-2 imagery (similar what you did for hydroreservoir), the image dates are in the detection geoJson.... @kegro can you confirm: we only need to consider S2 here (not S1), right?
    • Not sure if the selection feature will add anything (right panel), except at higher admin unit level
  1. I would suggest to deactivate the "power open infrastructure map" base layer by default (but keep it optional but deactivated)

image

lubojr commented 1 year ago

@patrick-griffiths Thanks for a review! please tag @lubojr - me. Who you tagged is an another person not connected to this project.

1) As a common user looking at the GTIF platform I would say that showing a single S2 scene for a single detection geojson does not bring any value. I would say that rather showing all of them on the map at the same time brings more overview to where many are against where little are. If we really want to show s2 image together with a detection (for a single wind turbine), we will need to use the same approach and UI as with the reservoirs. Please give me a second confirmation if this is expected and I shall redo the approach. 2) selection was just a workaround for now to enable the hover over interaction, we shall move that functionality to another config to still enable hover, but disable the "selection" - thanks for noticing it though 3) will leave hidden by default, not a problem to change

Patrick1G commented 1 year ago

@lubojr

  1. as this turbine detection will be of great interest to various stakeholders, it would be good to expose the source imagery along with the detection. Also in e.g. S2cloudless the basemap blurrs out and does not allow comprehending why a detection worked or why not. So yes lets go with the reservoir approach
  2. ok
  3. thanks
lubojr commented 1 year ago

Okay, thanks for confirmation! Will do.

santilland commented 1 year ago

Hello @patrick-griffiths we just checked back with our team for the s2-cloudless and there should not be much difference between the s2-cloudless mosaic and the individual s2 scenes. Here is an example taking an s2 scene from the eo-browser: image compared to the s2-cloudless mosaic image compared to the austrian orthofoto image here with the detections image

If the purpose it to show what can be done with s2 imagery, i would understand going the route of showing individual scenes. If the purpose is to allow the user to identify if the detections are correct i would go with leaving it as is, but switching the orthofoto layer as default

kegro commented 1 year ago

One thing to keep in mind is that unless the orthophoto is up-to-date, it might not show the true situation. We have seen some places where wind parks have been redesigned and small turbines replaced with larger ones. For example below the detections look wrong in the high res imagery from Bing, Google, ESRI, be they look obviously correct in Sentinel-2: Bing image ESRI image Google image Sentinel-2 image

kegro commented 1 year ago

The Sentinel-2 image is from January 2023. If possible I would by default show the specific S2 image for each detection and have the option to view the ortho or something else high-res for further validation.

kegro commented 1 year ago

Also if you use the s2 cloudless mosaic, you miss out on one of the most striking features of turbines in S2 imagery - the winter time shadow.

lubojr commented 1 year ago

@kegro Thank you for a response. Completely understand. I did not think of this aspect. We will redo the concept into "reservoir-like" approach and match it against S2 scenes from SH.

Patrick1G commented 1 year ago

@lubojr @santilland I fully agree with @kegro here... We need the original S2 images, as indicated in the detections geoJson.. S2cloudless should be added as an optional baselayer, but indeed detections were done with late season (long shadow) imagery which is not used for s2cloudless (besides the not so pretty blurry appearance at pixel level)

kegro commented 1 year ago
  • @kegro can you confirm: we only need to consider S2 here

and yes sorry for the late reply, we only consider S2 in the model so far.

lubojr commented 1 year ago

@patrick-griffiths @kegro New version of REP6 indicator - wind turbines is integrated on the https://gtif.esa.int with a new functionality that 'singleclick' on a detection geometry configures the main map time equal to the detection_time from provided data. See PR https://github.com/eurodatacube/eodash/pull/2229 for more info.

https://github.com/eurodatacube/eodash/assets/19269667/6b95d127-8464-480b-8af8-4df9737c41d7

Can we close the issue?

Patrick1G commented 1 year ago

this is great @lubojr - nicely solved with providing the corresponding imagery automatically! This is good to go for the demo branch! @kegro feel free to take a look above.

@lubojr could you make sure to integrate the data descriptors provided by DHI last Friday? I just forwarded the email with this content again...

lubojr commented 1 year ago

@patrick-griffiths

Thank you for a review and resend. I just added the markdown to the staging branch.

Patrick1G commented 1 year ago

@lubojr one more small thing: please deactivate the S2-mosaic base layer

currently Sentinel-a L2A is displayed by default and only on click the corresponding S2 imagery is shown. I woud prefer to have a neutral base layer like "geoland Gelaende"

lubojr commented 1 year ago

@patrick-griffiths Current default baselayer is Terrain light

I should remove the eox cloudless layer from the list of available baselayers for the indicator REP6 and use geoland Gelaende as a default baselayer?

kegro commented 1 year ago

Yes this is fantastic! Nicely done ;)

lubojr commented 1 year ago

https://github.com/eurodatacube/eodash/issues/2183#issuecomment-1568319313 changed like this in gtif_staging

Patrick1G commented 1 year ago

ld remove the eox cloudless layer from the list of available baselayers for the indicator REP6 and use geoland Gelaende as a default

Yes please!