[FWTools] WG: gdalwarp utility

Frank Warmerdam warmerdam at pobox.com
Tue Sep 22 11:52:54 EST 2009


Portolés Diana wrote:
> Hello,
> 
>  
> 
> I have downloaded the FWtools 2.4.3. And I am using the utility gdalwarp 
> to converter a georeferencied imaged (WGS84) to the Swiss coordinate 
> System, but without sucess:
> 
> The Swiss system has as projection = Oblique Mercator, or Bessel 
> ellipsoid 1841. And as datum the CH1903. What I have written  is the 
> code 19841, that coresponds to an Oblique Mercator and datum_code =6149, 
> that correspond to the CH1903 datum according to the files 
> gdal_datum.csv and projop_wparm.csv under the folder FWTOOLS2.4.3/data.
> 
> /L:\Inventis\User\POD\SRTM_DATA\FWTools2.4.3\bin>gdalwarp -t_srs 
> "+proj=19841 +da/
> 
> /tum=6149"// -tr 90 90 
> L:\Inventis\User\POD\SRTM_DATA\srtm_38_03\srtm_38_03.tif C:\/
> 
> /temp\suiza1.tif/
> 
> /ERROR 1: Translating source or target SRS failed:/
> 
> /+proj=19841 +datum=6149/
> 
> 
> Could you please tell me what I should write exactly? Or do you have a 
> user manual of the aplication where is explained this.

Diana,

Briefly, you can specify EPSG coordinate systems like this:

   gdalwarp -t_srs EPSG:19841 -tr 90 90 in.tif out.tif

But the number 19841 is, I think, for a component of the projected
coordinate system.  Normally we refer to EPSG:21782 (CH1903 / LV03C-G)
for this coordinate system.  19841 will not work with GDAL or PROJ.

I'm a bit suspicious about the translation of EPSG:21782 to PROJ.4.
You should likely test a known point before you trust the result.
I see the proj.4 expansion is:

   +proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333333333 +k_0=1 
+x_0=600000 +y_0=200000 +ellps=bessel +towgs84=674.374,15.056,405.346,0,0,0,0 
+units=m +no_defs

The page on gdal utilities has some information on acceptable
SRS specifications at:

   http://www.gdal.org/gdal_utilities.html

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



More information about the FWTools mailing list