0

I have latitude, longitude and geohash data for some places in a city near some sea(ex. Miami). I want to know which of these places are near the coast line(lets say within 100 m of the coastline). How can I approach this problem?

Data I have : Name of the place, latitude of the place, longitude of the place, geohash of the place, global coastline data(shape file, but this is not accurate)

Approach Tried : I downloaded the coastline data from here but this data is not very accurate. When I plot the shape file along with the lat, long of my original places data, I found that many places are lying outside the shorelines which is because the shorelines have been approximated by line segments as we zoom into the map(check the image attached).

Approach I am thinking of trying : I am thinking of finding all geohashes(level 6) that cut the shoreline and then if the place is present inside these geohashes, I will classify them as near-coast places. Do you think this approach is good and will give desired results? Also I am really sure how I am going to find the geohashes that cut the polygon.

enter image description here

swapnil agashe
  • 69
  • 1
  • 12
  • Please include what you have tried so far in your question. SO is not a "code-factory" to write your code. See [How do I ask a good question](https://stackoverflow.com/help/how-to-ask). Please include a [Minimal, Reproducible Example](https://stackoverflow.com/help/minimal-reproducible-example). – LeoE Sep 10 '20 at 14:26
  • I am not asking for code, I just want to know how you would approach the problem. – swapnil agashe Sep 10 '20 at 14:27
  • What is your approach? What research about this have you done? What is your idea? In which format do you have the data? Do you already have the coastline? Too many open questions, so your question is to vague, please see [How do I ask a good question](https://stackoverflow.com/help/how-to-ask) – LeoE Sep 10 '20 at 14:29
  • Do you already have the coastline as a collection of points with latitude and longitude? – le_lemon Sep 10 '20 at 14:31
  • @le_lemon No I don't have any data regarding the coast line, Is there a source where I can get lat, long of all coast lines across the world? – swapnil agashe Sep 10 '20 at 14:33
  • 2
    Here is one for europe that took only one google search to find so it shouldn't take you long to find one for your place. https://www.eea.europa.eu/data-and-maps/data/eea-coastline-for-analysis-1/gis-data/europe-coastline-shapefile – le_lemon Sep 10 '20 at 14:40
  • @le_lemon I have updated the question, please check once. – swapnil agashe Sep 11 '20 at 04:14

2 Answers2

0

How big of a city is it? If you want a rought aproximation, you could first turn your wgs84 coordinates into an X,Y plane in UTM and then simply try to get an inequality by approximating the coastline to a straight line and figuring which side of the equation you want to keep. You could do this with more lines to make a better representation of the coastline and then offset them by 100 meters to get a polygon

BrunoSE
  • 94
  • 4
  • I don't want to approximate the shore line as a straight line as it involves manually choosing the points for the straight line(Since I have to carry out this process for a lot of cities) and will not provide results with sufficient accuracy. – swapnil agashe Sep 10 '20 at 14:39
0

One way to approach this is if you already got the coastline as a collection of points as can be found on the internet as shp files for example. Iterate over these points and calculate the distance to the place and take the minimum. If it is less than 100m you got a match.

le_lemon
  • 107
  • 1
  • 11