Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Landmass avoidance using island #1

Open
eragonngo opened this issue Jun 21, 2019 · 5 comments
Open

Landmass avoidance using island #1

eragonngo opened this issue Jun 21, 2019 · 5 comments

Comments

@eragonngo
Copy link

Hi Chad,

I am writing a navigating code for a vessel in seaway, and one of the requirements is to check if the next coordinate is land or sea. If I know a set of coordinates of subsea constructions, oil rigs, etc. How can I add these polygon area into the island function.

Thank you for your time and concern reading my question,

Sicnerely,

@eragonngo

This comment has been minimized.

@eragonngo
Copy link
Author

eragonngo commented Jun 21, 2019

Would you recommend me with this procedure:

  • Download the DEM from http://srtm.csi.cgiar.org/srtmdata/
  • Read each GeoTIFF image using geoimread
  • Run loop if it is grey scale (A value = -32768) then landmask matrix value = 0
  • Merge landmask matrix

@chadagreene
Copy link
Owner

The mask isn't a very high resolution grid, so I'm not sure how valuable it will be for ship navigation. However, to customize the mask from another GeoTIFF I'd use interp2, or from a polygon use inpolygon.

@eragonngo
Copy link
Author

Thank you for your details reply, I will use your suggestion then

@eragonngo
Copy link
Author

eragonngo commented Jul 3, 2019

Hi Chad, thank you so much for your recommendation.

I used georead to convert the geotiff and save the coordinate as well as the is_land matrix to -v7.3 MAT-file. The uncompressed file is 10GB per file and the whole world contains 48 file of this. I am using interp2 to read 3 lon and lat from same matrix but this process took 189 seconds to run.

Using a SSD, loading the mat file took only 35 seconds but interpolation took the 159 seconds rest for 3 coordinate. Would you recommend any other faster method beside interp2?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants