[GRASS-dev] [GRASS GIS] #3992: v.import man page should say what -f's ro, rw, and rw+ are

#3992: v.import man page should say what -f's ro, rw, and rw+ are
-------------------------+---------------------------------
Reporter: jidanni | Owner: grass-dev@…
     Type: enhancement | Status: new
Priority: trivial | Milestone:
Component: Docs | Version: git-releasebranch78
Keywords: | CPU: Unspecified
Platform: Unspecified |
-------------------------+---------------------------------
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+**!!.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3992&gt;
GRASS GIS <https://grass.osgeo.org>

#3992: v.import man page should say what -f's ro, rw, and rw+ are
--------------------------+---------------------------------
  Reporter: jidanni | Owner: grass-dev@…
      Type: enhancement | Status: new
  Priority: trivial | Milestone: 7.8.3
Component: Docs | Version: git-releasebranch78
Resolution: | Keywords:
       CPU: Unspecified | Platform: Unspecified
--------------------------+---------------------------------

Comment (by neteler):

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.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3992#comment:2&gt;
GRASS GIS <https://grass.osgeo.org>