[ gpsdrive ] Nautical maps

Hamish hamish_b at yahoo.com
Sat Mar 8 18:41:19 AKST 2008


Hi,

a more general email detailing the current state of affairs for
converting nautical chart data for use with GpsDrive

* BSB raster images: use gdalwarp + gdal_slice.sh
  http://thread.gmane.org/gmane.comp.linux.gps/3920/focus=3937

* S-57 vector data
 - download chart data, import into GRASS GIS with v.in.ogr, setup
display, and export with d.out.gpsdrive 

 - for US data, use NOAA's WMS server to download premade raster tiles
using selected layers.

    i. in GRASS: use the latest r.in.wms module from SVN to download. I
had to enhance that a bit to support NOAA's server, I hope to test and
backport these changes in time for the upcoming GRASS 6.3.0 beta
release.  http://article.gmane.org/gmane.comp.gis.grass.devel/25528/

sample r.in.wms:
# set region of interest:
g.region n=41.34027778 s=41.05 w=-71.79666667 e=-71.43722222 \
   res=0:00:01

#check that we are near 1280x1024 target columns x rows.
g.region -p

# set server name:
SERVER="http://ocs-spatial.ncd.noaa.gov/wmsconnector/com.esri.wms.Esrimap/encdirect?"

# view available layers:
r.in.wms -l mapserver="$SERVER"

# pick some layers to use
LAYERS=\
"LAND,\
2DEPTH AREA(DEPARE),\
2SEA AREA(SEAARE),\
2SEABED AREA_polygon(SBDARE),\
2SOUNDINGS,\
DEPTH AREA(DEPARE)"

# get it
r.in.wms out=block_island.wms mapserver="$SERVER" layers="$LAYERS" \
  maxcols=1500 maxrows=1500 format=png --verbose

# display it
d.mon x0
d.rast block_island.wms

# create gpsdrive tile & register in map_koord.txt
d.out.gpsdrive out=block_island.wms


    ii. gpsfetchmap.pl: r.in.wms in verbose mode will show the needed
wget URL:

http://ocs-spatial.ncd.noaa.gov/wmsconnector/com.esri.wms.Esrimap/encdirect?request=GetMap&layers=LAND,2DEPTH%20AREA(DEPARE),2SEA%20AREA(SEAARE),2SEABED%20AREA_polygon(SBDARE),2SOUNDINGS,DEPTH%20AREA(DEPARE)&styles=&srs=EPSG:4326&bbox=-71.79666700000000000000,41.05000000000000000000,-71.43666644358578052551,41.34083355598086124401&width=1296&height=1047&format=image/png&transparent=TRUE&version=1.1.1

in the above:
* lat/lon WGS84 is EPSG:4326
* layer names: get from WMS capabilities file (or 'r.in.wms -l') and
 translate to english with  http://www.s-57.com/
* bbox is bounding box
* &width= and &height= should be set to 1280 and 1024

with some small work I think this could be merged into gpsfetchmap.pl.
I think the biggest task there is for someone to go through and pick
out a nice default set of layers to include.
this will differ with map scale, which is why NOAA also has different
WMS servers for coastal, approach, general, and overview map scale
bands.

http://ocs-spatial.ncd.noaa.gov/website/encdirect/help/helpfile.htm#Webser



Q: if writing README.txt files, what is the prefered document format?
freeform ASCII prose? reStructured ASCII text markup? MediaWiki ASCII
text markup?

reStructured text and Wiki markup are human readable but can be
converted to nicely formatted HTML or (more in the case of reStructured
text) into nice LaTeX/PDF.


Hamish



      ____________________________________________________________________________________
Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  http://tools.search.yahoo.com/newsearch/category.php?category=shopping



More information about the GPSdrive mailing list