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

Veronica Andreo veroandreo at gmail.com
Tue Aug 2 07:12:55 PDT 2016


Hello list,

I downloaded generalized coastlines from:
http://openstreetmapdata.com/data/generalized-coastlines and as they are in
mercator projection (epsg:3857) and I'm working in eu_laea, i wanted to use
v.import to reproject (and subset to my region) on the fly... but I can't
get v.import nor v.proj to work...

This is the command I'm using (copied from the GUI) and the error:

v.import input=coastlines_z8.shp epsg=3857 datum_trans=0 --> the same with
whatever value > 0 that I put here

WARNING: All available OGR layers will be imported into vector map
<coastlines_z8>
Projection information updated
WARNING: All available OGR layers will be imported into vector map
<coastlines_z8>
Importing
</home/veroandreo/gisdata/coastlines-generalized-3857/coastlines_z8.shp> ...
WARNING: All available OGR layers will be imported into vector map
<coastlines_z8>
Check if OGR layer <coastlines_z8> contains polygons...
Default driver / database set to:
driver: sqlite
database: $GISDBASE/$LOCATION_NAME/$MAPSET/sqlite/sqlite.db
Importing 30179 features (OGR layer <coastlines_z8>)...
-----------------------------------------------------
Building topology for vector map <coastlines_z8 at PERMANENT>...
Registering primitives...
30179 primitives registered
2796082 vertices registered
Building areas...
[...]
Reprojecting <coastlines_z8>...
Reprojecting primitives ...
WARNING: pj_transform() failed: failed to load datum shift file
ERROR: Unable to re-project vector map <coastlines_z8 at PERMANENT> from
<temp_import_location_12909>
ERROR: Unable to to reproject vector <coastlines_z8>

Moreover, if I use datum_trans=-1 which is supposed to throw the list of
parameters, I get the following error:

v.import input=coastlines_z8.shp epsg=3857 *datum_trans=-1*

ERROR: No output format specified, define one of flags -p, -g, -j, or -w
Traceback (most recent call last):
  File "/home/veroandreo/software/grass-7.3.svn/dist.x86_64
-pc-linux-gnu/scripts/v.import", line 290, in <module>
    sys.exit(main())
  File "/home/veroandreo/software/grass-7.3.svn/dist.x86_64
-pc-linux-gnu/scripts/v.import", line 158, in main
    datum_trans=options['datum_trans'])
  File "/home/veroandreo/software/grass-7.3.svn/dist.x86_64
-pc-linux-gnu/etc/python/grass/script/core.py", line 410, in
run_command
    return handle_errors(returncode, returncode, args,
kwargs)
  File "/home/veroandreo/software/grass-7.3.svn/dist.x86_64
-pc-linux-gnu/etc/python/grass/script/core.py", line 329, in
handle_errors
    returncode=returncode)
grass.exceptions.CalledModuleError: Module run None
['g.proj', 'epsg=3857', 'datum_trans=-1'] ended with error
Process ended with non-zero return code 1. See errors in the
(error) output.

Then, I created a new location from the .prj and imported the file. So, I
went to my target location to reproject with the good old v.proj but I get
the same warning message at the end and the file is not projected:

v.proj location=mercator mapset=PERMANENT input=coastlines_z8

WARNING: pj_transform() failed: failed to load datum shift file
ERROR: Unable to re-project vector map <coastlines_z8 at PERMANENT> from
<mercator>

In conclusion:

1. can someone illustrate on what datum_trans means in v.import, what
number goes there and/or provide a working example, please?

2. what is the datum shift file and where is it supposed to be?

Thanks a million in advance for any help/hint!

Best,
Vero

ps1: I'm using grass 73 svn r69040M under Fedora 24
ps2: my way-around to get the file imported was: opening the mercator file
in qgis, saving as eu_laea and importing with v.in.ogr into my eu_laea
location (suboptimal, but works)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20160802/d8cf0ba4/attachment.html>


More information about the grass-user mailing list