[Gdal-dev] s57 support

Frank Warmerdam warmerdam at pobox.com
Fri May 28 14:55:01 EDT 2004


Tyler Mitchell wrote:
> Does anyone know if s57 via ogr support is built into the latest ms4w. I 
> got it working last night on linux but can't seem to get it working at all 
> on a windows environment.
> 
> Error looks like the following, as opposed to the file not found error:
> 
> msDrawMap(): Image handling error. Failed to draw layer named 's57'. 
> msOGRFileOpen(): OGR error. GetLayer( 9) failed for OGR connection 
> `data/s57/US1PO02M.000, 9'. 
> msAddImageSymbol(): Unable to access file. Error opening image file 
> /ms4w/apache/htdocs/mapserver/workshop/ogr-pen-6. 
> msAddImageSymbol(): Unable to access file. Error opening image file 
> /ms4w/apache/htdocs/mapserver/workshop/mapinfo-pen-14. 
> msAddImageSymbol(): Unable to access file. Error opening image file 
> /ms4w/apache/htdocs/mapserver/workshop/default-circle


Tyler,

It is likely the problem is related to finding the S57 support .csv files.
If the S57 reader cannot find s57objectclasses.csv and s57attributes.csv then
it will just provide a generic layer for each gross geometry type instead of
splitting things down by object class and you will get this sort of issue
trying to fetch a layer by number.

You will likely need to set the GDAL_DATA environment variable to point to
the directory with the files in question.  If your MS4W is recent enough
(4.2) you can likely do this within your mapfile something like the following:

   CONFIG GDAL_DATA "C:\gdal\data"

Ideally MS4W would take care of all of this somehow.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent




More information about the Gdal-dev mailing list