[gdal-dev] Problem using gdalwarp to reproject Lambert Conformal Conic (LCC) to longlat
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 hail...@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=320.0 +lat_2=60.0 +x_0=3825000.0 +lon_0=-97.0 +a=637 -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=320.0 +lat_2=60.0 +x_0=3825000.0 +lon_0=-97.0 +a=637 When I use the proj/invproj unix command, it works fine: invproj +proj=lcc +lat_0=47.5 +lat_1=30.0 +y_0=320.0 +lat_2=60.0 +x_0=3825000.0 +lon_0=-97.0 +a=637 EOF 80 80 85 80 90 80 EOF 125d15'53.681W 20d51'29.908N 124d50'5.035W 21d0'18.418N 124d24'10.336W 21d8'59.642N Any idea where the problem is? Here is my gdal build info: $ svn info Path: . URL: https://svn.osgeo.org/gdal/trunk/gdal Repository Root: https://svn.osgeo.org/gdal Repository UUID: f0d54148-0727-0410-94bb-9a71ac55c965 Revision: 21425 Node Kind: directory Schedule: normal Last Changed Author: warmerdam Last Changed Rev: 21425 Last Changed Date: 2011-01-07 11:36:23 -0800 (Fri, 07 Jan 2011) revision number 21425 Hailey Eckstrand hail...@uvic.camailto:hail...@uvic.ca GIS Analyst Pacific Climate Impacts Consortium www.PacificClimate.Orghttp://www.PacificClimate.Org C198 Segdewick Building, University of Victoria PO Box 1700 Sta CSC, Victoria, BC V8V 2Y2 Tel: (250) 472-5591 Fax: (250) 472-4830 - End forwarded message - -- James Hiebert Lead, Computational Support Pacific Climate Impacts Consortium http://www.pacificclimate.org C178 Segdewick Building, University of Victoria PO Box 1700 Sta CSC, Victoria, BC V8V 2Y2 E-mail: hieb...@uvic.ca Tel: (250) 472-4521 Fax: (250) 472-4830 ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] Problem using gdalwarp to reproject Lambert Conformal Conic (LCC) to longlat
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 Eckstrandhail...@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=320.0 +lat_2=60.0 +x_0=3825000.0 +lon_0=-97.0 +a=637 -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=320.0 +lat_2=60.0 +x_0=3825000.0 +lon_0=-97.0 +a=637 When I use the proj/invproj unix command, it works fine: invproj +proj=lcc +lat_0=47.5 +lat_1=30.0 +y_0=320.0 +lat_2=60.0 +x_0=3825000.0 +lon_0=-97.0 +a=637 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, warmer...@pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush| Geospatial Programmer for Rent ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] Problem using gdalwarp to reproject Lambert Conformal Conic (LCC) to longlat
On 01/07/11 22:18, James Hiebert wrote: 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=320.0 +lat_2=60.0 +x_0=3825000.0 +lon_0=-97.0 +a=637 -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=320.0 +lat_2=60.0 +x_0=3825000.0 +lon_0=-97.0 +a=637 Hi, Your SRS definition is incomplete, because you haven't defined completely the ellispoid. Try to add one of the +b, +rf , +f, +e or +es parameters, and it should work. Jean-Claude ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] Problem using gdalwarp to reproject Lambert Conformal Conic (LCC) to longlat
Thanks for the quick response. It was definitely the missing +b. It seems that proj will fill in the +b with the same value if +a is given. Adding +b to the s_srs flag did the trick. ~James On Fri, Jan 07, 2011 at 04:51:05PM -0500, Frank Warmerdam wrote: 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 Eckstrandhail...@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=320.0 +lat_2=60.0 +x_0=3825000.0 +lon_0=-97.0 +a=637 -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=320.0 +lat_2=60.0 +x_0=3825000.0 +lon_0=-97.0 +a=637 When I use the proj/invproj unix command, it works fine: invproj +proj=lcc +lat_0=47.5 +lat_1=30.0 +y_0=320.0 +lat_2=60.0 +x_0=3825000.0 +lon_0=-97.0 +a=637 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, warmer...@pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush| Geospatial Programmer for Rent ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev -- James Hiebert Lead, Computational Support Pacific Climate Impacts Consortium http://www.pacificclimate.org C178 Segdewick Building, University of Victoria PO Box 1700 Sta CSC, Victoria, BC V8V 2Y2 E-mail: hieb...@uvic.ca Tel: (250) 472-4521 Fax: (250) 472-4830 ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev