[GRASS-dev] [GRASS GIS] #4021: r.import/v.import: confusing error message "ERROR: proj"
GRASS GIS
trac at osgeo.org
Fri Jan 17 02:25:42 PST 2020
#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.
Location PROJ_INFO is:
name: Lambert Conformal Conic
proj: lcc
datum: nad83
a: 6378137.0
es: 0.006694380022900787
lat_1: 36.16666666666666
lat_2: 34.33333333333334
lat_0: 33.75
lon_0: -79
x_0: 609601.22
y_0: 0
no_defs: defined
init: EPSG:3358
Dataset PROJ_INFO is:
name: WGS 84
datum: wgs84
ellps: wgs84
proj: ll
no_defs: defined
ERROR: proj <=== ?!
Importing <roadsmajor_LL.gpkg> ...
Check if OGR layer <roadsmajor> contains polygons...
100%
Creating attribute table for layer <roadsmajor>...
Default driver / database set to:
driver: sqlite
database: $GISDBASE/$LOCATION_NAME/$MAPSET/sqlite/sqlite.db
Column name <cat> renamed to <cat_>
Importing 355 features (OGR layer <roadsmajor>)...
100%
-----------------------------------------------------
Building topology for vector map <test at PERMANENT>...
Registering primitives...
Reprojecting <test>...
WARNING: Vector map <test> already exists and will be overwritten
Reprojecting primitives ...
Building topology for vector map <test at user1>...
Registering primitives...
}}}
Hence, "ERROR" followed by "Importing..." is not ideal.
I didn't get yet an idea since the message is composed in
r.in.gdal/v.in.ogr:
https://github.com/OSGeo/grass/blob/master/raster/r.in.gdal/proj.c#L196
Effectively, the "ERROR" part should be suppressed when r.in.gdal was
called by r.import (v.in.ogr respectively).
Any ideas?
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/4021>
GRASS GIS <https://grass.osgeo.org>
More information about the grass-dev
mailing list