-
I am working on a project for the Port of Houston, simulating the dredging activities of the Project 11 channel widening program. The Houston Plots have instituted a '5-mile rule' whereby dredges cannot be within 5 miles of each other in the main channel. I am using Mesa and Mesa-geo to track contractor schedules and see where they might overlap 5-mile zones. In the screenshot below, one dredge is in the main channel, and the oval bubble indicates the 5-mile zone. The smaller green bubble is a dredge in the Bayport Ship Channel where the 5-mile rule does not apply. Mesa and Mesa-geo have been invaluable to me, thanks! I would like to display a navigation chart rather than the open street map view, and until some time last summer, the URL from this SO answer worked. NOAA has evidently updated the services, and based on the information on the NOAA website I tried the following but get a blank background, so obviously I am doing something wrong. Any ideas would be appreciated.
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
This is an interesting problem to solve! First of all, the service url "http://www.ngs.noaa.gov/storm_archive/tilesx/tileserver.php?/wmts?/wmts/?/EC1702a-OB-N/{z}/{x}/{y}.png" doesn't seem to work. When it is used, there are lots of 404 errors in the console. From here it mentioned that there are new services from NOAA as listed in: https://nauticalcharts.noaa.gov/data/gis-data-and-services.html#enc-display-services Using the "OGC Web Map Service (WMS)" under NOAA Chart Display Service from the webpage as an example - import mesa_geo as mg
# use `WMSWebTile` instead of `RasterWebTile`
map_tile = mg.WMSWebTile(
url="https://gis.charttools.noaa.gov/arcgis/rest/services/MCS/NOAAChartDisplay/MapServer/exts/MaritimeChartService/WMSServer/",
options={
"layers": "0,1,2,3,4,5,6,7,8,9,10,11,12",
"attribution": '© <a href="https://www.nauticalcharts.noaa.gov/">NOAAA</a>',
},
) it seemed to be working (I randomly chose a place to view the map) But to make it work for you, firstly there's a bug in Mesa-Geo that needs to be fixed: #140. There appears to be some CI issues that I need to fix in order to merge it. If you happen to have a development environment, you may try to fix it at your local environment. It's a simple fix, simple change mesa-geo/mesa_geo/tile_layers.py Line 57 in bea0f32 to kind: str = "wms_web_tile" But of course you could also wait for the PR : ) In addition you'll need to use
For instance, in the example if you click the "OGC Web Map Service (WMS)" link under NOAA Chart Display Service, there'll be a page full of XML. I found the service url and layer names inside it. In general I found WMS services slightly more difficult to use. For more information you could refer to these links: Perhaps it would be good to specify WMS service version number (which can also be found from the XML page) too, in case things went wrong, such as map_tile = mg.WMSWebTile(
url="https://gis.charttools.noaa.gov/arcgis/rest/services/MCS/NOAAChartDisplay/MapServer/exts/MaritimeChartService/WMSServer/",
options={
"layers": "0,1,2,3,4,5,6,7,8,9,10,11,12",
"version": "1.3.0",
"attribution": '© <a href="https://www.nauticalcharts.noaa.gov/">NOAAA</a>',
},
) but it worked for me without it. Hope this helps! I sincerely wish they could provide the previous raster tile services. |
Beta Was this translation helpful? Give feedback.
-
I created a small layer browser to help me figure out what the layers look like and try combinations: https://github.com/rcriii42/mesa-geo-navex |
Beta Was this translation helpful? Give feedback.
This is an interesting problem to solve!
First of all, the service url "http://www.ngs.noaa.gov/storm_archive/tilesx/tileserver.php?/wmts?/wmts/?/EC1702a-OB-N/{z}/{x}/{y}.png" doesn't seem to work. When it is used, there are lots of 404 errors in the console.
From here it mentioned that there are new services from NOAA as listed in: https://nauticalcharts.noaa.gov/data/gis-data-and-services.html#enc-display-services
Using the "OGC Web Map Service (WMS)" under NOAA Chart Display Service from the webpage as an example -