S-57 data: Difference between revisions

From GRASS-Wiki
Jump to navigation Jump to search
(→‎OpenEV S52 plugin: plugin building and testing)
Line 66: Line 66:


* Copy <tt>libS52.so</tt> to GDAL's lib directory
* Copy <tt>libS52.so</tt> to GDAL's lib directory
: putting the lib in /usr/local/lib seems to work.
: ''run ldconfig'' ?
: ''run ldconfig'' ?
* Configure OpenEV with render plugin support:
CPPFLAGS='-I/usr/include/gdal' ./configure \
    --with-double-geocoord --with-render-plugin
make
===== Test S52 plugin with OpenEV =====
* Set environment variables
* Set environment variables
  export S57_CSV=/usr/share/gdal
  export S57_CSV=/usr/share/gdal
Line 73: Line 83:
  RETURN_LINKAGES:ON"
  RETURN_LINKAGES:ON"


* test:
* Using gvtest:
  openev/openev/gvtest -ogr=/path/to/ENC_ROOT/US3NY01M/US3NY01M.000  
  ./openev/gvtest -ogr=/path/to/ENC_ROOT/US3NY01M/US3NY01M.000  
  -OR-
 
  openev/contrib/S52/s52testdyn (s52test.conf will need ENC path ajusted)
* Using s52test:
: ("make s52test" won't compile: problem finding S57_ogr*()?)
: (s52test.conf will need ENC path adjusted)
./openev/contrib/S52/s52testdyn
 


* [??] Using pymod/openev.py:
: (Open .000 file, load all layers)
export PYTHONPATH="/usr/lib/python2.4/site-packages/gtk-1.2"
./openev/pymod/openev.py


=== GRASS S-52 interface for rendering S-57 data ===
=== GRASS S-52 interface for rendering S-57 data ===

Revision as of 11:43, 22 April 2008

More to come

Basics

(see the mailing list posts linked at the end of that page):
http://thread.gmane.org/gmane.comp.linux.gps/3920/focus=3937
http://thread.gmane.org/gmane.comp.linux.gps/3920/focus=3934

Obtaining data

Worldwide

  • ...

Cananda

  • ...

USA

  • Free ENC vector data for the USA from NOAA
http://nauticalcharts.noaa.gov/mcd/enc/download.htm
  • Nice previews / chart picker:
http://www.oceangrafix.com/o.g/search-nautical-charts.html

Accessing S-52 symbology

S-57 is the data format. The S-52 standard contains the standardized coloring and symbology for electronic navigation charts. We want to view the S-57 data through the lens of the S-52 rules. Some ideas for that:

  • GRASS interface: (wishlist prototype) display imported S-57 data (v.in.ogr or v.external) using S-52's coloring and layer-order info. Some environment will be information like lighting level and hull depth (start at 0) will be needed
  • View with the OpenEV plugin (functional)
  • Create the dataviewer as a QGIS plugin (wishlist user app)


libS52


How to build

  • Install build dependencies
Install OpenGL and X11 -dev packages (X11/Xlib.h and GL/gl.h)
PROJ.4 for proj_api.h?
  • Build it:
make          # for s52glx simple test program
make default  # for libS52

Run simple s52glx test program

  • Get ENC data
  • Edit s52test.conf with the full path to your ENC chart datafile (*.000 file)
  • Run it with ./s52glx and you should see a new window with all layers rendered
  • Screenshots

OpenEV S52 plugin

  • Copy libS52.so to GDAL's lib directory
putting the lib in /usr/local/lib seems to work.
run ldconfig ?
  • Configure OpenEV with render plugin support:
CPPFLAGS='-I/usr/include/gdal' ./configure \
   --with-double-geocoord --with-render-plugin

make
Test S52 plugin with OpenEV
  • Set environment variables
export S57_CSV=/usr/share/gdal
export OGR_S57_OPTIONS="LNAM_REFS:ON,UPDATES:ON,\
SPLIT_MULTIPOINT:ON,PRESERVE_EMPTY_NUMBERS:ON,\
RETURN_LINKAGES:ON"
  • Using gvtest:
./openev/gvtest -ogr=/path/to/ENC_ROOT/US3NY01M/US3NY01M.000 
  • Using s52test:
("make s52test" won't compile: problem finding S57_ogr*()?)
(s52test.conf will need ENC path adjusted)
./openev/contrib/S52/s52testdyn


  • [??] Using pymod/openev.py:
(Open .000 file, load all layers)
export PYTHONPATH="/usr/lib/python2.4/site-packages/gtk-1.2"
./openev/pymod/openev.py

GRASS S-52 interface for rendering S-57 data

  • TODO
  • build little command line app to output coloring and layer order info which can be fed to d.vect et al?

QGIS S-52 plugin for viewing S-57 data

  • TODO
  • anyone have ideas?