#4021: r.import/v.import: confusing error message "ERROR: proj"
--------------------------------+---------------------------------
Reporter: neteler | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.8.3
Component: Raster | Version: git-releasebranch78
Keywords: r.import, v.import | CPU: Unspecified
Platform: Unspecified |
--------------------------------+---------------------------------
For most users the "ERROR: proj" part in the notification which CRS was
found and that the reprojection does not match that of the current
location is confusing, also in a technical sense as it is sent to stderr:
{{{
grass78 ~/grassdata/nc_spm_08/user1
# generate test data
v.out.ogr input=roadsmajor output=roadsmajor.gpkg
ogr2ogr -t_srs epsg:4326 roadsmajor_LL.gpkg roadsmajor.gpkg
v.import input=roadsmajor_LL.gpkg output=test --o
WARNING: Projection of dataset does not appear to match current location.
We could always just rename 'ERROR' to something like 'Difference in:'
since that is the meaning right?
But I don't like the entire warning, it's too long. Maybe we could set
verbosity level to -1 for that r.in.gdal call unless r.import is called
with --v.
Replying to [comment:1 annakrat]:
> We could always just rename 'ERROR' to something like 'Difference in:'
since that is the meaning right?
Using 'Difference in:' is a good idea and explains better why two CRS's
differ. Note that this would need to be changed in r.in.gdal, r.external,
v.in.ogr, v.external.
>
> But I don't like the entire warning, it's too long. Maybe we could set
verbosity level to -1 for that r.in.gdal call unless r.import is called
with --v.
IMHO, it depends on how r.in.gdal is used. Currently, when using the -j
flag (Perform projection check only and exit), a warning is issued. This
could be changed to a `G_message()` which can be suppressed with --quiet
if r.in.gdal in run in a script such as r.import. Again, changing
`G_warning()` to `G_message()` should be done in r.in.gdal, r.external,
v.in.ogr, v.external.
When r.in.gdal is used without the -j flag, the different CRS's and the
first encountered difference should be reported as done now (using
'Difference in: ...' instead of 'ERROR: ...'
Replying to [comment:2 mmetz]:
> Replying to [comment:1 annakrat]:
> > We could always just rename 'ERROR' to something like 'Difference in:'
since that is the meaning right?
>
> Using 'Difference in:' is a good idea and explains better why two CRS's
differ. Note that this would need to be changed in r.in.gdal, r.external,
v.in.ogr, v.external.
> >
> > But I don't like the entire warning, it's too long. Maybe we could set
verbosity level to -1 for that r.in.gdal call unless r.import is called
with --v.
>
> IMHO, it depends on how r.in.gdal is used. Currently, when using the -j
flag (Perform projection check only and exit), a warning is issued. This
could be changed to a `G_message()` which can be suppressed with --quiet
if r.in.gdal in run in a script such as r.import. Again, changing
`G_warning()` to `G_message()` should be done in r.in.gdal, r.external,
v.in.ogr, v.external.
>
> When r.in.gdal is used without the -j flag, the different CRS's and the
first encountered difference should be reported as done now (using
'Difference in: ...' instead of 'ERROR: ...'