[GRASS-user] v.import and v.proj errors

Moritz Lennert mlennert at club.worldonline.be
Tue Aug 2 09:36:38 PDT 2016


On 02/08/16 17:24, Veronica Andreo wrote:
> Hi Helli,
>
> 2016-08-02 11:37 GMT-03:00 Helmut Kudrnovsky <hellik at web.de
> <mailto:hellik at web.de>>:
>
>      >as they are in mercator projection (epsg:3857) and I'm working in
>     eu_laea
>
>     I assume eu_laea is epsg: 3035 (http://epsg.io/3035)?
>
>     if yes, epsg3035 is dedicated to the area of Europe.
>
>     is the generalized coastlines data for the whole world?
>
>
> yes and yes
>
>     maybe world wide data in epsg:3857 (http://epsg.io/3857) can't be
>     reprojected into a epsg:3035 location without too much distortion?
>
>
> mhm... I see... and it makes sense...
>
>     my workflow in such cases where only a subregion of worldwide data
>     is needed
>     : I use the clip mechanism of ogr2ogr [1] in order to clip out my
>     region and
>     reproject only this clipped area.
>
>     HTH
>
>
> it does, indeed :) (I wonder what is qgis using then to make the global
> data re-projection...)
>
> I also tried with clipping to my region inside v.import (which is maybe
> equivalent to your trick with ogr2ogr?), but got the same error every
> time... boh... would be anyway useful to clarify what this "datum_trans"
> option means.
>

I can confirm the issue when using v.in.ogr + v.proj, when using the 
file to define the location:

grass73 -c 
/data/GEODATA/OSM/coastlines-generalized-3857/coastlines_z8.shp 
/data/GRASS/DATA7/test_3857/
v.in.ogr /data/GEODATA/OSM/coastlines-generalized-3857/coastlines_z8.shp

and then in the EPSG 3035 location:

v.proj location=test_3857 mapset=PERMANENT input=coastlines_z8
Reprojecting primitives ...
ATTENTION: pj_transform() a échoué: failed to load datum shift file
ERREUR :Unable to re-project vector map <coastlines_z8 at PERMANENT> from
         <test_3857>


However, when I create the 3857 location using the EPSG code, it works:

grass73 -c epsg:3857 /data/GRASS/DATA7/test_3857_epsg/
[...]
v.proj location=test_3857_epsg mapset=PERMANENT input=coastlines_z8

success.

There is a difference in the projection definition between the two:

diff -u test_3857/PERMANENT/PROJ_INFO test_3857_epsg/PERMANENT/PROJ_INFO
--- test_3857/PERMANENT/PROJ_INFO	2016-08-02 18:24:25.965809631 +0200
+++ test_3857_epsg/PERMANENT/PROJ_INFO	2016-08-02 18:28:18.427085934 +0200
@@ -7,7 +7,5 @@
  x_0: 0.0
  y_0: 0
  k: 1.0
-nadgrids: @null
  wktext: defined
  no_defs: defined
-over: defined

Erasing the 'nadgrids: @null' from the first allows to reproject.

The .prj file of the original shapefile contains:

EXTENSION["PROJ4","+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 
+lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext 
+no_defs +over"]

I guess the issue comes from how this is handled...

Moritz--
Département Géosciences, Environnement et Société
Université Libre de Bruxelles
Bureau: S.DB.6.138
CP 130/03
Av. F.D. Roosevelt 50
1050 Bruxelles
Belgique

tél. + 32 2 650.68.12 / 68.11 (secr.)
fax  + 32 2 650.68.30


More information about the grass-user mailing list