[gdal-dev] Problem using gdalwarp to reproject Lambert Conformal Conic (LCC) to longlat

Frank Warmerdam warmerdam at pobox.com
Fri Jan 7 16:51:05 EST 2011


On 11-01-07 04:18 PM, James Hiebert wrote:
> All,
>
> Below is a question/probelm from one of my co-workers (who doesn't (yet)
> want to subscribe to the list).
>
> ~James Hiebert
>
>
> From: Hailey Eckstrand<haileye at uvic.ca>
> Date: Fri, 7 Jan 2011 13:05:10 -0800
>
> Hello all,
> I am trying to reproject a geotif using gdalwarp:
> gdalwarp -t_srs "+proj=longlat" -s_srs "+proj=lcc +lat_0=47.5 +lat_1=30.0 +y_0=3200000.0 +lat_2=60.0 +x_0=3825000.0 +lon_0=-97.0 +a=6370000" -r bilinear -srcnodata "1e20" -dstnodata "1e20" -tr 0.5 0.5 -te -137.812943839532 33.8985446218588 -102.312943839532 63.3985446218588 mm5i-lcc.tif  mm5i-latlong.tif
>
> ERROR 1: Translating source or target SRS failed:
> +proj=lcc +lat_0=47.5 +lat_1=30.0 +y_0=3200000.0 +lat_2=60.0 +x_0=3825000.0 +lon_0=-97.0 +a=6370000
>
> When I use the proj/invproj unix command, it works fine:
>
> invproj +proj=lcc +lat_0=47.5 +lat_1=30.0 +y_0=3200000.0 +lat_2=60.0 +x_0=3825000.0 +lon_0=-97.0 +a=6370000<<  EOF

James,

I would suggest you collegue be more explicit about the earth models.
PROJ.4 definitions passed to GDAL utility are parsed by GDAL, converted
to WKT, and then later converted back to PROJ.4 format and so not all
definitions supported by PROJ.4 are necessarily supported by GDAL.

In this case I suspect GDAL is confused by the lack of a +b value for
the lcc projection.  It may also not handle a missing earth model on the
geographic coordinate system well.

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 gdal-dev mailing list