+ AreaType area = get_area_type(dbf, i);
+ FG_LOG( FG_GENERAL, FG_DEBUG, "area type = " << (int)area );
+
+ FG_LOG( FG_GENERAL, FG_INFO, " record = " << i
+ << " ring = " << 0 );
+
+ if ( area == MarshArea ) {
+ // interior of polygon is marsh, holes are water
+
+ // do main outline first
+ init_shape(&gpc_shape);
+ n_vertices = shape.getRing(0, coords);
+ add_to_shape(n_vertices, coords, &gpc_shape);
+ process_shape(path, area, &gpc_shape);
+ free_shape(&gpc_shape);
+
+ // do lakes (individually) next
+ for ( j = 1; j < shape.numRings(); j++ ) {
+ FG_LOG( FG_GENERAL, FG_INFO, " record = " << i
+ << " ring = " << j );
+ init_shape(&gpc_shape);
+ n_vertices = shape.getRing(j, coords);
+ add_to_shape(n_vertices, coords, &gpc_shape);
+ process_shape(path, LakeArea, &gpc_shape);
+ free_shape(&gpc_shape);
+ }
+ } else if ( area == OceanArea ) {
+ // interior of polygon is ocean, holes are islands
+
+ init_shape(&gpc_shape);
+ for ( j = 0; j < shape.numRings(); j++ ) {
+ n_vertices = shape.getRing(j, coords);
+ add_to_shape(n_vertices, coords, &gpc_shape);
+ }
+ process_shape(path, area, &gpc_shape);
+ free_shape(&gpc_shape);
+ } else if ( area == LakeArea ) {
+ // interior of polygon is lake, holes are islands
+
+ init_shape(&gpc_shape);
+ for ( j = 0; j < shape.numRings(); j++ ) {
+ n_vertices = shape.getRing(j, coords);
+ add_to_shape(n_vertices, coords, &gpc_shape);
+ }
+ process_shape(path, area, &gpc_shape);
+ free_shape(&gpc_shape);
+ } else if ( area == DryLakeArea ) {
+ // interior of polygon is dry lake, holes are islands
+
+ init_shape(&gpc_shape);
+ for ( j = 0; j < shape.numRings(); j++ ) {
+ n_vertices = shape.getRing(j, coords);
+ add_to_shape(n_vertices, coords, &gpc_shape);
+ }
+ process_shape(path, area, &gpc_shape);
+ free_shape(&gpc_shape);
+ } else if ( area == IntLakeArea ) {
+ // interior of polygon is intermittent lake, holes are islands
+
+ init_shape(&gpc_shape);
+ for ( j = 0; j < shape.numRings(); j++ ) {
+ n_vertices = shape.getRing(j, coords);
+ add_to_shape(n_vertices, coords, &gpc_shape);
+ }
+ process_shape(path, area, &gpc_shape);
+ free_shape(&gpc_shape);
+ } else if ( area == ReservoirArea ) {
+ // interior of polygon is reservoir, holes are islands
+
+ init_shape(&gpc_shape);
+ for ( j = 0; j < shape.numRings(); j++ ) {
+ n_vertices = shape.getRing(j, coords);
+ add_to_shape(n_vertices, coords, &gpc_shape);
+ }
+ process_shape(path, area, &gpc_shape);
+ free_shape(&gpc_shape);
+ } else if ( area == IntReservoirArea ) {
+ // interior of polygon is intermittent reservoir, holes are islands
+
+ init_shape(&gpc_shape);
+ for ( j = 0; j < shape.numRings(); j++ ) {
+ n_vertices = shape.getRing(j, coords);
+ add_to_shape(n_vertices, coords, &gpc_shape);
+ }
+ process_shape(path, area, &gpc_shape);
+ free_shape(&gpc_shape);
+ } else if ( area == StreamArea ) {
+ // interior of polygon is stream, holes are islands
+
+ init_shape(&gpc_shape);
+ for ( j = 0; j < shape.numRings(); j++ ) {
+ n_vertices = shape.getRing(j, coords);
+ add_to_shape(n_vertices, coords, &gpc_shape);
+ }
+ process_shape(path, area, &gpc_shape);
+ free_shape(&gpc_shape);
+ } else if ( area == CanalArea ) {
+ // interior of polygon is canal, holes are islands
+
+ init_shape(&gpc_shape);
+ for ( j = 0; j < shape.numRings(); j++ ) {
+ n_vertices = shape.getRing(j, coords);
+ add_to_shape(n_vertices, coords, &gpc_shape);
+ }
+ process_shape(path, area, &gpc_shape);
+ free_shape(&gpc_shape);
+ } else if ( area == GlacierArea ) {
+ // interior of polygon is glacier, holes are dry land
+
+ init_shape(&gpc_shape);
+ for ( j = 0; j < shape.numRings(); j++ ) {
+ n_vertices = shape.getRing(j, coords);
+ add_to_shape(n_vertices, coords, &gpc_shape);
+ }
+ process_shape(path, area, &gpc_shape);
+ free_shape(&gpc_shape);
+ } else if ( area == VoidArea ) {
+ // interior is ????
+
+ // skip for now
+ FG_LOG( FG_GENERAL, FG_ALERT, "Void area ... SKIPPING!" );
+
+ if ( shape.numRings() > 1 ) {
+ FG_LOG( FG_GENERAL, FG_ALERT, " Void area with holes!" );
+ // exit(-1);