[gdal-dev] SPHEROID["unretrievable - using WGS84"...

Armin Burger armin.burger at gmx.net
Thu Aug 5 09:58:01 EDT 2010


Edi

this is a typical issue with GDAL using less "common" projections specified with their EPSG code (it always works fine with UTM projections for example). The transformation is correct, but the GeoTiff header is a bit weird. This happens for me eg. when I use a pan-European projection like ETRS LAEA (EPSG 3035). 

The best way to avoid this is to specify the "-t_srs" not with the EPSG:2199 but with a file containing the WKT description of your projection. This seems to always write the complete WKT from your prj file into the GeoTiff header, so something like

... -t_srs path/to/epsg2199.prj ...
where epsg2199.prj is a text file containing the WKT representation of your projection.

WKT for 2199 should be:

PROJCS["Albanian 1987 / Gauss Kruger zone 4 (deprecated)",
    GEOGCS["Albanian 1987",
        DATUM["Albanian_1987",
            SPHEROID["Krassowsky 1940",6378245,298.3,
                AUTHORITY["EPSG","7024"]],
            AUTHORITY["EPSG","6191"]],
        PRIMEM["Greenwich",0,
            AUTHORITY["EPSG","8901"]],
        UNIT["degree",0.01745329251994328,
            AUTHORITY["EPSG","9122"]],
        AUTHORITY["EPSG","4191"]],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",21],
    PARAMETER["scale_factor",1],
    PARAMETER["false_easting",4500000],
    PARAMETER["false_northing",0],
    AUTHORITY["EPSG","2199"]]



An alternative is to use the full Proj4 definition string, like for your case

... -t_srs "+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=4500000 +y_0=0 +ellps=krass +units=m +no_defs" ... 

You can also specify your datum by adding in addition a clause to this string like
  +datum=your-datum
but this depends if GDAL recognizes the datum definition (I have not found a list of supported datums that one can use this way). 

An advantage using the latter approach is that you can also specify datum shift parameters with the additional clause like

  +towgs84=570.8,85.7,462.8,4.998,1.587,5.261,3.56

(values depend of course of your projection).

I hope this helps

Greetings
Armin



-------- Original-Nachricht --------
> Datum: Thu, 5 Aug 2010 05:42:40 -0700 (PDT)
> Von: "Edi.Karadumi" <edikaradumi at gmail.com>
> An: gdal-dev at lists.osgeo.org
> Betreff: [gdal-dev] SPHEROID["unretrievable - using WGS84"...

> 
> when i use gdalwarp -t_srs EPSG:2199 source.tif dest.tif i get an ok but
> when
> i use gdalinfo i get 
> the following result:
> 
> Driver: GTiff/GeoTIFF
> Files: dest.tif
> dest.tfw
> Size is 9375, 6250
> Coordinate System is:
> PROJCS["unnamed",
>    GEOGCS[,
>        DATUM["unknown",
>             SPHEROIK["unretrievable - using
> WGS84",6375137,298.257223563]],
>        PRIMEM["Greenwich",0],
>    UNIT["metre",1,
>        AUTHORITY["EPSG","9001"]],
>    AUTHORITY["EPSG","2199"]]
> Origin = (375000.00000000,4581000.0000000000)
> Pixel Size = (0.0800000000,-0.08000000000)
> Medatata:
> 
> ..........
> 
> is this normal?
> what is the meaning of all those unknown, unretrievable?
> 
> 
> 
> 
> -- 
> View this message in context:
> http://osgeo-org.1803224.n2.nabble.com/SPHEROID-unretrievable-using-WGS84-tp5376320p5376320.html
> Sent from the GDAL - Dev mailing list archive at Nabble.com.
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev

-- 
GMX DSL SOMMER-SPECIAL: Surf & Phone Flat 16.000 für nur 19,99 ¿/mtl.!*
http://portal.gmx.net/de/go/dsl


More information about the gdal-dev mailing list