Google Maps distance to sea coast

前端 未结 4 1465
日久生厌
日久生厌 2021-02-04 00:18

Given just one point in Google Maps, is there anyway to know the distance to the nearest point in the coast (that is the minimun distance to the sea), and which point in the coa

4条回答
  •  时光取名叫无心
    2021-02-04 00:40

    There is no documented method in the Google Maps API that will return the distance to the coast.

    However, you may want to check out the following article:

    • Bill Chadwick's Google Maps API Demos (scroll to Distance Point to Polyline or Polygon)

    The author describes a "point-to-polyline distance" function that was used with the GSHHS1 dataset to find out how far a point is to the sea.


    1 GSHHS is a high-resolution shoreline data set amalgamated from two databases in the public domain. The data have undergone extensive processing and are free of internal inconsistencies such as erratic points and crossing segments. The shorelines are constructed entirely from hierarchically arranged closed polygons. The data can be used to simplify data searches and data selections, or to study the statistical characteristics of shorelines and land-masses. It comes with access software and routines to facilitate decimation based on a standard line-reduction algorithm.

提交回复
热议问题