[Gdal-dev] s-57 to vrml elevation map?

Frank Warmerdam warmerdam at pobox.com
Mon Sep 22 01:44:52 EDT 2003


Thorsten Röllich wrote:
> Hello,
> 
> I'm building a 3D model of a coastal area in Germany and try to use S-57 datasets as a source.
> First I used the program SeeMyDEnc from sevencs to open my datasets and it looked fine. By picking a position on the map, the program shows the primitive DEPARE (Depth Area Group) and the corresponding depth (DRVAL1 and DRVAL2).
> This seems to be enough information for modeling a (rough) topography.
> So I looked for a converter, that fits my needs... (Something, that converts S-57 to VRML elevation map would be ideal)
> What I found was the ogr library and the tools ogrinfo and ogr2ogr.
> So I will have to write the converter myself..
> The plan was to translate S-57 to GML (which is more human readable) using ogr2ogr and parse all Polygons that describe an Area and the corresponding depth. 
> The  translation to GML worked fine, but I could not find any depth information in the file. I tried it with many ogr2ogr options, but the 3rd dimension seems always to be lost.
> 
> Does anybody have an idea how to translate the topographic information from S-57 files to an elevation map, or how to extract the polygons and the depth of DEPARE fields?
> Very thankful for any hints on this. Kindest regards / Thorsten

Thorsten,

Based on your email I did a test conversion of some features types from
S-57 to GML and discovered some serious holes in my support for 3D GML and
GML "geometry collection" types of geometries.  I have committed patches
for that back to GDAL/OGR.  I think it may have been responsible for some
of your problems.

Now, for instance, the SOUNDG feature class comes through in GML as a
MultiPoint collection of 3D points.

However, for features classes like DEPARE, the elevation is only found in
the attributes.  In the case of DEPARE there are DRVAL1 and DRVAL2 attributes
which appear to be the minimum and maximum depth values in the area.

I don't know what language you were looking to implement the VRML writing
in, but if you want to do it in C, C++ or Python why not just use the
OGR API to read the objects and then concentrate on writing the VRML?

As far as I know (and I am unfortunately no expert) the S-57 data will just
have the depth areas with depth ranges over the whole polygon, and the sounding
point values.  I don't know the best way of turning this into some sort of
mesh or whatever you need in VRML.  Perhaps you would be best off just applying
a point interpolator to the soundings and ignoring the DEPAREs?

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