grass
grass copied to clipboard
[Bug] v.proj fails on data from Natural Earth dataset
Describe the bug
Reprojection of countries from the Natural Earth dataset fails with proj_trans() failed: tolerance condition error. Some vector maps seems to work which other don't.
To Reproduce
Start, e.g., in NC SPM (any location seems to work):
grass .../nc_spm.../user1
Get the location:
g.download.location url=https://zenodo.org/record/3968936/files/natural-earth-dataset.tar.gz
Reproject the data from the location:
v.proj dbase=... location=natural_earth_dataset mapset=PERMANENT input=countries output=countries
Expected behavior
Ideally, that it reprojects, but an error message with suggestions what to try would be nice too. I don't really know what to do.
Screenshots
v.proj dbase=$HOME/grassdata location=natural_earth_dataset mapset=PERMANENT input=countries output=countries
Selected PROJ pipeline:
+proj=pipeline +step +proj=unitconvert +xy_in=deg +xy_out=rad +step
+proj=lcc +lat_0=33.75 +lon_0=-79 +lat_1=36.1666666666667
+lat_2=34.3333333333333 +x_0=609601.22 +y_0=0 +ellps=GRS80
************************
Reprojecting primitives ...
WARNING: proj_trans() failed: tolerance condition error
ERROR: Error in GPJ_transform() (projection of input coordinate pair)
System description
- Operating System: Linux
- GRASS GIS version: master branch
version=7.9.dev
date=2021
revision=de3829cde
build_date=2021-06-06
build_platform=x86_64-pc-linux-gnu
build_off_t_size=8
libgis_revision=61d6f8c7d
libgis_date=2021-03-31T03:06:28+00:00
proj=7.2.1
gdal=3.2.1
geos=3.9.0
sqlite=3.31.1
Additional context
Happens in GUI, when reprojecting to other locations, with different v.proj parameters, but not for all data in the Natural Earth location.
Is it anyway possible to reproject global countries' borders into a CRS that is more specific to only one area? I just read here: https://en.wikipedia.org/wiki/Lambert_conformal_conic_projection and it says it's cut in the south. Could that be a reason?
A particular Lambert Conformal Conic projection depends on the standard latitude parallel(s) and the longitude of projection center: these determine for which area this projection is valid. Coordinates should not substantially exceed the standard latitude parallel(s), longitudes should be less than 90° away from the longitude of projection center.