Opened 12 years ago

Closed 12 years ago

#835 closed defect (invalid)

v.out.ogr -c flag doesn't work?

Reported by: lutra Owned by: grass-dev@…
Priority: normal Milestone: 6.4.0
Component: Vector Version: 6.4.0 RCs
Keywords: Cc:
CPU: x86-32 Platform: Linux


When exporting with v.out.ogr, if the input layer has islands a message show

"WARNING: The map contains islands. To preserve them in the output map, use the -c flag"

but if used, the -c flag seems to have no effect in the resulting vector.

Change History (2)

comment:1 Changed 12 years ago by mmetz

The -c flag only has an effect if some features of the selected type have no category in the selected layer.

That warning can be misleading because islands consist of one or more areas within a larger area. One island can consist of holes (areas that don't have a centroid with category) and valid areas (with centroid and category) at the same time, or only areas or only holes. If all areas in all islands have a centroid with category, the -c flag will indeed have no effect.

Tested with landuse in the Spearfish dataset, exporting to shapefile once with once without -c flag. Holes are preserved with the -c flag, i.e. appear as holes (not filled areas) surrounded by filled areas. Without the -c flag, holes become valid areas that are displayed like any other area. Displaying both shapefiles in QGIS, the one with holes preserved on top of the other one with holes converted to areas, immediately shows the differences between the two vectors.

Markus M

comment:2 Changed 12 years ago by lutra

Resolution: invalid
Status: newclosed

You are right. I tested the spearfish dataset and it works fine. Probably the vector I used before is not as I supposed. I'll make further tests but I guess that meanwhile I can close this as invalid.

Note: See TracTickets for help on using tickets.