Opened 4 years ago

Last modified 4 years ago

#3992 new enhancement

v.import man page should say what -f's ro, rw, and rw+ are

Reported by: jidanni Owned by: grass-dev@…
Priority: trivial Milestone: 7.8.3
Component: Docs Version: git-releasebranch78
Keywords: Cc:
CPU: Unspecified Platform: Unspecified

Description

man v.import -f: document ro, rw, rw+

$ grass --exec v.import -f input=/dev/null 2>/dev/null |\
 perl -nwle '/\(([^)]+)/||die; print $1;'|sort|uniq -c
     40 ro
      2 rw
     47 rw+

OK, but the v.import man page should say what -f's ro, rw, and rw+ are.

Yes, the user might guess what ro and rw are, but not rw+!!.

Change History (2)

comment:1 by neteler, 4 years ago

Milestone: 7.8.3

comment:2 by neteler, 4 years ago

For reference, the output is

v.import -f
Supported formats:
 PCIDSK (rw+): PCIDSK Database File
 netCDF (rw+): Network Common Data Format
 JP2OpenJPEG (rw): JPEG-2000 driver based on OpenJPEG library
 JPEG2000 (rw): JPEG-2000 part 1 (ISO/IEC 15444-1), based on Jasper library
 PDF (rw+): Geospatial PDF
...

The ro, rw, and rw+ may come from GDAL/OGR. Since v.import is a wrapper around v.in.ogr, the related source code is this (main.c):

            if (GDALGetMetadataItem(hDriver, GDAL_DCAP_CREATE, NULL))
                pszRWFlag = "rw+";
            else if (GDALGetMetadataItem(hDriver, GDAL_DCAP_CREATECOPY, NULL))
                pszRWFlag = "rw";
            else
                pszRWFlag = "ro";

In GDAL itself I cannot find pszRWFlag, so no idea what it does and if it is still relevant...

One reference seems to be this: https://gdal.org/api/raster_c_api.html#c.GDAL_DCAP_CREATECOPY

I agree that the meaning of ro, rw, and rw+ should be explained in the manual pages of r/v.import and r.in.gdal/v.in.ogr.

Note: See TracTickets for help on using tickets.