TransDEM Forum

TransDEM News, Support, Hints and Resources
It is currently 28 Mar 2024 21:25

All times are UTC + 1 hour




Post new topic Reply to topic  [ 10 posts ] 
Author Message
PostPosted: 03 Mar 2019 19:07 
Offline

Joined: 20 Nov 2012 01:41
Posts: 65
Good Afternoon,

Has any work been done with Nautical Charts and TransDEM? Living in the US (New Jersey), I noticed today that the NOAA has a tile service at:

https://tileservice.charts.noaa.gov/

I wonder how big of a step is it to get the above as a tile service in TransDEM? I looked around the site, but didn't see anything obvious.

With the usual DEMs, most (if not all from what I've seen) elevations are 0 for water or some other predetermined constant elevation for big lakes inland. Is there any good sources of DEM for water depths? They may be referred to as bathymetric or hydrographic data I guess instead of DEM. I downloaded such a dataset for the Mariana Trench (Challenger Deep) many years ago and put in into TransDEM and made a Trainz route (not to put track or trains on it - just wanted to see it in 3D), but had lost it and the data over the years.

Thanks for any help provided.

Andrew


Top
 Profile  
 
PostPosted: 04 Mar 2019 07:16 
Offline

Joined: 05 Jan 2011 16:45
Posts: 1463
I'm sure there are specs somewhere on their site, but during my (superficial) investigation I did'n find them either. However, we can always try logging http and see if that gives any clues.


Top
 Profile  
 
PostPosted: 04 Mar 2019 15:08 
Offline

Joined: 20 Nov 2012 01:41
Posts: 65
Thanks for checking it out, geophil!

I searched around on their site some more yesterday. I found some APIs for ArcGIS and Google Maps. I really thought I had a fish on the line when I found their PDFs! Alas, they are not geoPDFs. I waded in and did some manual georeferencing with points, which is quite easy with lat and long grids all over the charts, but time consuming.

I'll do some more looking when I get home from work today.

Andrew


Top
 Profile  
 
PostPosted: 05 Mar 2019 01:38 
Offline

Joined: 20 Nov 2012 01:41
Posts: 65
Well, I gave myself a headache today figuring this out, but it works! :geek:

After ripping apart their examples and URLs, I set up my tile service like this:

Image

Here's it in action:

Image
(I think North is rarely up in nautical charts. That's why the printing is almost upside down.)

And overlaying my DEM:

Image

On The Nose!

Those last 2 sets of numbers in the URL must be a standard somewhere, because I see no rhyme or reason to them:

https://tileservice.charts.noaa.gov/tiles/50000_1/14/4797/6245.png

The "14" I figured out was the zoom level.

Here's my exported XML entry:

Code:
  <Provider name="NOAA Charts" guid="9eb65d46-2fed-4a24-bed7-3da687243893" >
    <URL guid="23104165-4df3-4edb-86ab-4159ef83f760" type="1" addr="https://tileservice.charts.noaa.gov/" prefix="tiles/50000_1" standalone="1" postfix=".png" >
      <Matrix prefixClm="/" prefixRow="/" prefixZoom="/" minZoom="3" maxZoom="16" order="2" />
      <Mercator origLat="90" origLon="-180" signLat="-1" signLon="1" projection="4" />
    </URL>
  </Provider>


If anyone has any suggestions for improvement on the above, please feel free to say so!

Andrew


Top
 Profile  
 
PostPosted: 05 Mar 2019 12:10 
Offline

Joined: 05 Jan 2011 16:45
Posts: 1463
It's perfect, well done! 8-)

What confused me at first was the upside down printing. But once I detected the compass rose it became clear that the original sheet wasn't north-up, as you said.

Image

The tile identification is very much standardized. And it's rather straightforward. Tiles are simply ordered by number, starting with 0 at each zoom level, then increasing in easting and northing direction. Origin and axis orientation may vary, but that's minor detail. In our case here, the only slightly unusual thing is the reverse order of column and row.

In your example, the tile is the 4798th in the easting direction and the 6246th in the northing direction, at zoom level 14. Northing is actually a southing here, as the axis is inverted. (It's plus 1 for both axes, as the numbering starts with 0.)

The fundamental idea lies in features of the Mercator projection. If you restrict the latitudes to about 85 degrees north and south, you can map Planet Earth to an exact square. They made it a unit square, with a projection coordinate range from 0 to 1.

For zoom level 1 you will only have two tiles in each direction, for zoom level 2 there will be 4, then 8, then 16 and so on. With the inverted northing or y axis we look at the north-west corner of each tile. For tile [0,0] at each zoom level, the Mercator projection coordinates will also be [0,0]. The north-west corner coordinates for tile [1,1] at zoom level 1 will [0.5,0.5] and [0.25,0.25] at zoom level 2.

Once you have the projection coordinates you apply the (reverse) Mercator projection and get latitude and longitude.

So, the entire geo-referencing thing is rather implicit for map tiles, as it completely relies on the tile numbering scheme. Nonetheless it's well defined and precise.


Top
 Profile  
 
PostPosted: 05 Mar 2019 13:03 
Offline

Joined: 20 Nov 2012 01:41
Posts: 65
Thanks, geophil. And thanks for the explanation of map tiles. The reverse order of column and row had me puzzled for a bit too.

I had found a recent "DEM" of the ocean in that area, but TransDEM didn't know what to do with it. I'm at work now, but I think the file had an .nc or .mc extension. Looking at the file in binary, it seems to have some GDAL information in the header, so maybe it's not too alien. When I get home today, I'll post some of the header and the file link.

Andrew


Top
 Profile  
 
PostPosted: 06 Mar 2019 00:11 
Offline

Joined: 20 Nov 2012 01:41
Posts: 65
Hello again. That "DEM" file is at https://www.ngdc.noaa.gov/thredds/fileServer/regional/atlantic_city_13_mhw_2007.nc

According to the web page (https://www.ncei.noaa.gov/metadata/geoportal/rest/metadata/item/gov.noaa.ngdc.mgg.dem:595/html), the file is in format netCDF (Version: 4 Classic) and the start of the file in binary is:

Image

Not sure if that means anything to you, but it is in the area I'm interested in and not too detailed (1/3 arc sec I think).

I did find some 1/9 arc sec DEM of the ocean, but it does not have the complete area I'm interested in (Atlantic City/Ocean City, New Jersey). That format was IMG and once I got the right projection, it imported into TransDEM perfectly. The areas not covered are at the edges and I may be able to use the "Fill DEM" tool to populate them if the .nc file is not usable.

Cheers and thanks!

Andrew


Top
 Profile  
 
PostPosted: 07 Mar 2019 09:05 
Offline

Joined: 05 Jan 2011 16:45
Posts: 1463
SharkNose wrote:
Not sure if that means anything to you
No, I'm afraid I've never seen this format before or even heard its name. But as GDAL is mentioned, it might be possible to use GDAL to convert it into something TransDEM is able to digest.


Top
 Profile  
 
PostPosted: 07 Mar 2019 13:04 
Offline

Joined: 20 Nov 2012 01:41
Posts: 65
As it turns out, the 1/9 arc sec data just covers what I need. I redid my selection area and captured more area this time. Thanks for checking it out. When I get something to look at, I'll post a screen shot or two. It is neat seeing the terrain slope down into the bay or ocean and not just end in a flat plain. :)

Regards,

Andrew


Top
 Profile  
 
PostPosted: 30 Mar 2019 13:02 
Offline

Joined: 20 Nov 2012 01:41
Posts: 65
Here's 2 samples of the DEM on the Delaware River (1/9 arc sec) where a channel was dug near the U.S. Steel plant in Fairless Hills, PA. The raster map is the NOAA nautical chart for that area. I don't think I've ever seen a raster map match up with a DEM so nicely!

Image

Image

Having a DEM that shows contours below sea level gives that 3rd dimension a boost!

Andrew


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: Ahrefs [Bot], SemrushBot [Bot], Yandex [Bot] and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

Imprint & Privacy

Powered by phpBB® Forum Software © phpBB Group