[Gdal-dev] S57 Driver: holes in areas

Frank Warmerdam warmerdam at pobox.com
Wed Jul 28 11:09:20 EDT 2004


Tore Halset wrote:
> Hello.
> 
> I am using ogr2ogr to store S57 data into a Postgis database and have a 
> question. How are an area like DEPARE with holes stored? It looks like 
> FSPT-ORNT and FSPT-USAG are not stored. Should I traverse the polygons 
> and see if the direction is counter-clockwise?

Tore,

I am not convinced that holes are actually a particular order.  My technique
for assembling rings ignores USAG and ORNT.  It just stitches segments together
into rings till there are no attachable segments left without regard to what
the orientation "should be".  So you will likely need a more sophisticated
technique to establish which rings are holes.

Hmm, according to the Simple Features data model, I it should be that only
the first ring of a Polygon is exterior.  The rest are holes.  A multi-island
area should be a multipolygon with each island a sub-polygon.  If this isn't
true in OGR's S-57 driver return results let me know and I will try and correct
it.

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