[GRASS-user] projection issue

Vincent Bain bain at toraval.fr
Mon Mar 24 03:33:58 PDT 2014


Hello,

the trouble I am currently experiencing is dealing partly with cs2cs,
but partly with grass, so I post my question on this list...

Being within a Mercator location, defined with the location wizard
(calling epsg:3857), I type :
        
        echo "6.46311951 45.78037144" | m.proj -idg
        input parameters=[+proj=longlat +datum=WGS84]
        output parameters=[+proj=merc +lat_ts=0.0 +lon_0=0.0 +x_0=0.0
        +y_0=0 +k=1.0
        +no_defs +a=6378137 +rf=298.257223563 +towgs84=0.000,0.000,0.000
        +to_meter=1]
        
Which results in :

        719471.17278927|5714587.81400429|0.00000000

The thing is this set of geographic coordinates should return something
else...

        echo "6.46311951 45.78037144" | cs2cs +proj=longlat -f "%.8f"
        +to +init=epsg:3857
        
gives :

        719471.17278927	5745223.17292760 0.00000000

I guess this is not a m.proj issue, because passing projection argument
directly to cs2cs gives the same error :

        curproj=`eval g.proj -jf`

        echo "6.46311951 45.78037144" | cs2cs +proj=longlat -f "%.8f"
        +to $curproj
        
returns :

        719471.17278927	5714587.81400429 0.00000000

I can't figure what is going wrong. Would anyone have an idea ?
Thanks,

Vincent




More information about the grass-user mailing list