On 26/02/2019 23:37, Rich Shepard
wrote:
Current map displayed is Pit_Lakes@pit_lakes. I want to export the 42 rows
Looking at the source code for db.out.ogr, I see that this module has a somewhat strange approach to checking for the overwrite flag. There is a test for existence of a file with the same name as the GRASS *input* layer, but with .dbf extension. If such a file exists, the module fails, as you saw. I can only guess that this unusual test was implemented to avoid overwriting the *.dbf component of a shapefile. That is, when saving an attribute table to a dbf file, if there was a shapefile with the same name, then it's dbf component would get changed, corrupting the whole shapefile. I think this could be done more simply. (I'll suggest a PR)
In your case, you could get around the issue by simply adding the overwrite flag to your command. Since you're saving to a *.csv, there's no danger of overwriting any existing dbf.
Regards, Micha
-- Micha Silver Ben Gurion Univ. Sde Boker, Remote Sensing Lab cell: +972-523-665918 |
_______________________________________________ grass-user mailing list grass-user@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/grass-user