[GRASS-dev] Re: [GRASS-user] v.in.ogr weird import

Moritz Lennert mlennert at club.worldonline.be
Wed Jul 9 03:26:40 EDT 2008


On 08/07/08 22:49, Christian Ferreira wrote:
> Hi Moritz,
> 
> 
> Let's go...
> 
>>
>> What does g.proj -p show ?
> 
>  g.proj -p
> -PROJ_INFO-------------------------------------------------
> name       : Latitude-Longitude
> datum      : wgs84
> towgs84    : 0.000,0.000,0.000
> proj       : ll
> ellps      : wgs84
> -PROJ_UNITS------------------------------------------------
> unit       : degree
> units      : degrees
> meters     : 1.0
> 
> 
>> Are the shapefiles accompanied by .prj files ?
> 
> Yes. And they look like this:
> 
> GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]
> 
> And the g.proj output of a vector is:
> 
>  g.proj -p Tracklines2.shp
> Trying to open with GDAL...ERROR 4: `Tracklines2.shp' not recognised
> as a supported file format.
> 
> Trying to open with OGR......succeeded.
> A datum name wgs84 (WGS_1984) was specified without transformation parameters.
> Note that the GRASS default for wgs84 is towgs84=0.000,0.000,0.000.
> -PROJ_INFO-------------------------------------------------
> name       : Lat/Lon
> proj       : ll
> datum      : wgs84
> a          : 6378137
> es         : 0.006694379990141316
> no_defs    : defined
> -PROJ_UNITS------------------------------------------------
> unit       : degree
> units      : degrees
> meters     : 1.0
> 
> And after import this data with v.in.ogr, I see:
> 
>  At v.info I see:
> 
>  |   Projection: UTM (zone 0)                                                 |
>  |            N: -9.053        S: -10.666                                     |
>  |            E: -78.787       W: -80.817                                     |
>  |            B: 0.000         T: 0.000                                       |
> 
> 
> The weird part comes now...
> 
> 1) My locations show this "Projection: UTM" for any vectors imported,
> but the location is on Lat-Long.
> 2) This same location when opened at GRASS 6.3 (Windows) show the
> projection correctly for these "rebel vectors"
> 3) GRASS 6.3 (Windows) also can import the shapefiles in the right
> way, but if I take the location back to Linux, the is problem back.
> 
> Maybe I have a plataform issue. I tried this (importing data at my
> GRASS 6.3 Linux):
> 
> 1) import shapefiles created at QGIS;
> 2) (re)reproject my shapefiles with ogr2ogr;
> 3) created a location based in a shapefile (with prj file)
> 
> None worked.
> 
> Actually my vectors work fine (I tried display and some analysis), but
> they are weird... because they have a Lat-Long extent, but show an UTM
> projection.
> 

I have to admit that I'm stumped here...
Forwarding to grass-dev for further advice.

Moritz


More information about the grass-dev mailing list