r语言怎么以第二列绘制线图_用卫星图像绘制世界海岸线图-第二部分

r语言怎么以第二列绘制线图

Part I of this blog series is here.

本博客系列的第一部分 在这里

At the UKHO we are interested in the oceans, the seabed and the coastline — not to mention everything in and on them! In our previous blog, we (the UKHO Data Science team) outlined our quest to automate mapping of the world’s coastlines.

在UKHO,我们对海洋,海床和海岸线感兴趣-更不用说其中的一切了! 在我们以前的博客中,我们(UKHO数据科学团队)概述了我们对世界海岸线的自动化地图绘制的追求。

From that work, a satellite-derived coastline for the British Isles was created, available for free on the ADMIRALTY Marine Data Portal. Since then we have come across use cases for this data on an almost-daily basis, and the feedback we have received can be summarised into three main themes:

通过这项工作,创建了不列颠群岛的卫星海岸线,可以在ADMIRALTY海洋数据门户网站上免费获得。 从那时起,我们几乎每天都会遇到这些数据的用例,并且我们收到的反馈可以概括为三个主要主题:

  • Can I get satellite-derived coastline data for my local beach/town/country?

    我可以获取本地海滩/城镇/国家的卫星海岸线数据吗?

  • Does the data show mean sea level?

    数据显示平均海平面吗?

  • Can you capture coastline at high tide and low tide?

    您可以在涨潮和退潮时捕获海岸线吗?

The answers at the time were maybe, no and maybe, which definitely wasn’t good enough! The feedback themes helped us redefine our approach to continued research and development on this project. In this article, I will describe the progress we have made as we iterate, and hopefully show how we’ve answered (or will answer) these questions.

当时的答案可能是,也许不是,这绝对不够好! 反馈主题帮助我们重新定义了对该项目进行持续研发的方法。 在本文中,我将描述迭代过程中所取得的进展,并希望展示我们如何回答(或将回答)这些问题。

一些背景 (Some background)

Initially we created a yearly, median pixel mosaic of Sentinel-2 satellite images and used this as a base to extract one representative coastline. This worked well, and was a useful thing, however, deriving coastline in this way has some pros and cons.

最初,我们创建了Sentinel-2卫星图像的年度中值像素马赛克,并以此为基础提取了一个有代表性的海岸线。 这很好用,并且是有用的,但是,以这种方式获得海岸线有其优缺点。

Image for post
Satellite-derived Coastline for the British Isles. 不列颠群岛的卫星衍生海岸线。 UK Hydrographic Office © Crown Copyright 2020. Created using Google Earth Engine. 英国水文局©版权为Crown2020。使用Google Earth Engine创建。
  • Pro. Averaged mosaics take care of a large amount of the variation intrinsic in satellite imagery — clouds, shadows, saturated pixels and so on. This makes classification a lot easier.

    专业版 平均镶嵌图可处理卫星图像中固有的大量变化-云,阴影,饱和像素等。 这使分类容易得多。

  • Pro. You can create a mosaic as large as you want, removing the need to deal with the edges of images, and how to ‘bridge’ data over those edges.

    专业版 您可以创建所需大小的镶嵌图,从而无需处理图像边缘以及如何在这些边缘上“桥接”数据。

  • Con. The chance of assigning a vertical datum (such as mean sea level) to the data is lost in the averaging process used to create the mosaic. The median pixel is chosen in all areas, so the final image is a composite of thousands of images, all taken at different states of tide.

    骗局 。 在用于创建镶嵌的平均过程中,丢失了为数据分配垂直基准(例如平均海平面)的机会。 在所有区域都选择中值像素,因此最终图像是数千张图像的合成,所有图像都是在不同的潮汐状态下拍摄的。

  • Con. There is no way of knowing what the tidal state was when any of the images were taken, either by looking at an image or it’s metadata.

    骗局 。 通过查看图像或其元数据,无法知道拍摄任何图像时的潮汐状态。

To identify which areas of the mosaic are water and which are land (i.e. to perform image segmentation), we calculate the Normalised Difference Water Index’ (NDWI) and define a local threshold using Otsu’s Method.

为了确定马赛克的哪些区域是水而哪些区域是土地(即执行图像分割),我们计算了“ 标准化差分水指数”(NDWI),并使用Otsu方法定义了局部阈值。

Image for post
A Sentinel-2 image (left), image NDWI (middle) and the binary image after thresholding (right). UK Hydrographic Office © Crown Copyright 2019. Created using Google Earth Engine. Copernicus Sentinel data 2020.
Sentinel-2图像(左),图像NDWI(中)和阈值后的二进制图像(右)。 英国水文办公室©Crown版权所有2019。使用Google Earth Engine创建。 哥白尼前哨数据2020。

Again, this has some pros and cons.

再次,这有一些优点和缺点。

  • Pro. Unsupervised classification is quick, easy to understand and simple to implement.

    专业版 无监督分类是快速,易于理解和易于实现的。

  • Pro. Works very well most of the time.

    专业版 大多数时候效果很好。

  • Con. Built-up areas and (exposed) intertidal zones have NDWI values that are very close to water, resulting in misclassifications.

    骗局 。 建成区和(裸露的)潮间带的NDWI值非常接近水,导致分类错误。

  • Con. Even with Otsu’s method, it’s hard to pick a threshold in an automated way, particularly if there is an imbalanced ratio of land and water pixels.

    骗局 。 即使使用Otsu的方法,也很难以自动化方式选择阈值,尤其是在陆地和水像素比例不平衡的情况下。

  • Con. The classification method is not robust enough to deploy anywhere in the world without significant manual intervention.

    骗子 分类方法不够强大,无法在没有大量人工干预的情况下部署到世界任何地方。

任务 (The task)

Assigning tidal information to satellite images has been successfully demonstrated by Robbi Bishop-Taylor, Stephen Sagar and colleagues at Geoscience Australia in their work modelling the intertidal zones of Australia. Satellite images can be attributed with a predicted tide height using the time, date and location of the images to query a global, gridded tidal model. Then, by deriving coastline over a long time-series of imagery the generated coastline vectors can be labelled with a predicted tidal height, resulting in a picture of the intertidal zone emerging and an estimate of the coastline’s position relative to mean sea level.

在澳大利亚的潮间带建模中Robbi Bishop-Taylor ,Stephen Sagar及其同事已经成功地证明了将潮汐信息分配给卫星图像的方法。 卫星图像可以使用图像的时间,日期和位置来归因于预测的潮汐高度,以查询全局网格化的潮汐模型。 然后,通过得出长时间图像序列的海岸线,可以用预测的潮汐高度标记生成的海岸线矢量,从而生成潮间带的图片以及海岸线相对于平均海平面的位置的估计值。

To choose a tidal model (there are a number of options out there, including TPXO9-atlas, FES2014 and DTU10) we teamed up with Chris Jones and Colin Shepherd from the UKHO Tides Team to assess various models against our own ADMIRALTY TotalTide software. ADMIRALTY TotalTide can be used to predict tidal heights and tidal streams at the locations of over 7,000 tidal stations, distributed globally (7,433 at the time of writing). All of these tidal stations will have been visited in order to measure in situ observations of sea level, which are then subsequently analysed to derive the necessary underlying data (i.e. the harmonic constituents and/or time and height differences from a reference port) in order to compute a predicted tidal curve.

为了选择一种潮汐模型(那里有很多选择,包括TPXO9-atlasFES2014DTU10 ),我们与UKHO潮汐团队的Chris Jones和Colin Shepherd合作,根据我们自己的ADMIRALTY TotalTide软件评估了各种潮汐模型。 ADMIRALTY TotalTide可用于预测全球分布的7,000多个站的潮汐高度和潮汐流(撰写本文时为7,433)。 所有这些潮汐站都将被访问以测量海平面的原位观测值,然后对其进行分析以按顺序导出必要的基础数据(即谐波分量和/或来自参考端口的时间和高度差)。计算预测的潮汐曲线。

We could use ADMIRALTY TotalTide to provide the satellite image tide predictions, however using a gridded, global model is preferential for our purposes to obtaining estimates using in situ stations because:

我们可以使用ADMIRALTY TotalTide来提供卫星图像潮汐预测,但是出于我们的目的,使用网格全局模型对于使用原位站获得估算值是优先考虑的,因为:

  • In-situ observed data may not be available at the specific location of the satellite images, thus the ‘next best thing’ is a tidal prediction.

    在卫星图像的特定位置可能无法获得现场观测到的数据,因此“下一件好事”是潮汐预测。

  • There may also be a lack of ‘traditional’ tidal prediction stations available in the region, thus relying on tidal stations potentially quite distant from the required area (and therefore potentially unsuitable).

    该地区还可能缺少“传统”潮汐预报站,因此依赖于可能与所需区域相距甚远(因此可能不合适)的潮汐站。

  • A tidal model (once validated and assured that the predictions are suitable) offers ‘seamless’ tidal predictions over the required region on a regularly gridded scale.

    潮汐模型(一旦验证并确保预测是合适的),将以规则的网格规模在所需区域上提供“无缝”的潮汐预测。

Assessing the tidal models against a number of metrics (these included root mean square error comparison with ADMIRALTY TotalTide, number of harmonics, ease of automation, resolution and others) concluded that FES2014 performed best in our tests. FES is available after registration on the CNES data centre website, and comes with a handy Python package.

根据许多指标(包括与ADMIRALTY TotalTide的均方根误差比较,谐波次数,自动化程度,分辨率等)评估潮汐模型,得出的结论是FES2014在我们的测试中表现最佳。 在CNE S数据中心网站上注册后即可使用FES,并附带了一个方便的Python软件包

Image for post
Tidal predictions at Station 2940 (Eastern edge of Nova Scotia, outside Bay of Fundy) for March 2011 at 15-minute intervals. 2011年3月在2940站(新斯科舍省的东部边缘,芬迪湾外)的潮汐预报,间隔为15分钟。

In order to maximise the chance of getting a satellite image where the tide is at all the different stages in its range, we grab all the imagery for an area from Landsat 7, Landsat 8 and Sentinel-2 satellites (available in Earth Engine), which returns a 20 year time series. Coastline is detected on each of these images using our original classifier and, following the methodology of Bishop-Taylor et. al., we derive 10 coastline contours, covering the intertidal range visible on the satellite image series, and attributed with their height relative to mean sea level.

为了最大程度地获得潮汐处于其范围内不同阶段的卫星图像的机会,我们从Landsat 7,Landsat 8和Sentinel-2卫星(在Earth Engine中提供 )中获取了某个区域的所有图像,返回20年时间序列。 使用我们的原始分类器,并按照Bishop-Taylor等人的方法,在这些图像中的每一个上都检测到海岸线 ,我们得出了10个海岸线等值线,覆盖了卫星图像序列上可见的潮间带范围,并归因于它们相对于平均海平面的高度。

结果 (Results)

Here are some of the results, overlaid on ADMIRALTY charts.

这是一些结果,覆盖在ADMIRALTY图表上。

Image for post
St. Michael’s Mount, Cornwall, UK. UK Hydrographic Office © Crown Copyright 2020. Created using Google Earth Engine. Background © Crown Copyright and/or database rights. UK Hydrographic Office ( www.GOV.uk/UKHO) .
英国康沃尔郡圣迈克尔山。 英国水文局©版权为Crown2020。使用Google Earth Engine创建。 背景©Crown版权和/或数据库权利。 英国水文局( www.GOV.uk/UKHO)
Image for post
Portsmouth Harbour, UK. UK Hydrographic Office © Crown Copyright 2020. Created using Google Earth Engine. Background © Crown Copyright and/or database rights. UK Hydrographic Office ( www.GOV.uk/UKHO).
英国朴次茅斯海港。 英国水文局©版权为Crown2020。使用Google Earth Engine创建。 背景©Crown版权和/或数据库权利。 英国水文局( www.GOV.uk/UKHO)。

These data samples are available for free on the ADMIRALTY Marine Data Portal.

这些数据样本可在ADMIRALTY海洋数据门户网站上免费获得。

To conclude, out of the two tasks identified, we have now integrated tidal information into the coastline-derivation process and can answer two of the three questions:

总而言之,在确定的两个任务中,我们现在已将潮汐信息整合到海岸线推导过程中,可以回答三个问题中的两个:

  • Does the data show mean sea level? YES — coastlines are attributed with estimated height relative to mean sea level.

    数据显示平均海平面吗? 是的-海岸线归因于相对于平均海平面的估计高度。

  • Can you classify coastline at high tide and low tide? YES — if it has been captured on satellite imagery in the past 20 years, we can classify it.

    您可以在涨潮和退潮时对海岸线进行分类吗? 是的-如果过去20年来已在卫星图像上捕获了它,则可以对其进行分类。

  • Will this work for my local beach/town/country? We are working on it now 😊

    这对我当地的海滩/城镇/国家有用吗? 我们现在正在努力😊

下一个是什么? (So, what’s next?)

Up next is the creation of a geo-generalised and temporally-generalised model that performs well on coastlines all around the globe. We have been working for a few months on gathering training data and developing a deep neural network to classify images that will plug into the pipeline, replacing the original classifier.

接下来是创建地理通用时间通用的模型,该模型在全球海岸线上均能良好运行。 我们已经花了几个月的时间来收集训练数据并开发一个深度神经网络,以对将插入管道中的图像进行分类,以取代原始分类器。

Image for post
Lyttelton Harbour, near Christchurch, New Zealand. UK Hydrographic Office © Crown Copyright 2019. Created using Google Earth Engine. Copernicus Sentinel data 2020.
新西兰基督城附近的利特尔顿海港。 英国水文办公室©Crown版权所有2019。使用Google Earth Engine创建。 哥白尼前哨数据2020。

This work is part of a wider venture into detection of marine and coastal features visible on satellite imagery, such as mangrove forests, kelp and seagrass. We’ve found there are commonalities in these image segmentation tasks, such as the difficulty in creating training data for remote sensing data.

这项工作是对探测卫星图像上可见的海洋和沿海特征(例如红树林 ,海带和海草)的更广泛尝试的一部分。 我们发现这些图像分割任务存在一些共性,例如难以为遥感数据创建训练数据。

Part III (the classifier strikes back) coming soon!

第三部分(分类器反击)即将推出!

翻译自: https://medium.com/uk-hydrographic-office/mapping-the-worlds-coastlines-with-satellite-imagery-part-ii-5ee01d3034b7

r语言怎么以第二列绘制线图

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值