[Gdal-dev] gdalwarp with multiple options
Frank Warmerdam
fwarmerdam at gmail.com
Fri Aug 5 13:59:40 EDT 2005
On 8/5/05, Marco Vieira <marco_vieira at uk2.net> wrote:
> Hi list.
>
> It is not a big spot.
>
> $ gdalwarp -s_srs '+proj=tmerc +k_0=0.9996 +x_0=500000 +y_0=10000000
> +ellps=intl +lat_0=0 +lon_0=-51' -t_srs '+proj=latlong +ellps=WGS84'
> test.tif test_out.tif
>
> works.
>
> $ gdalwarp -tr 150 150 test.tif test_out.tif
>
> works too.
>
> $ gdalwarp -s_srs '+proj=tmerc +k_0=0.9996 +x_0=500000 +y_0=10000000
> +ellps=intl +lat_0=0 +lon_0=-51' -t_srs '+proj=latlong +ellps=WGS84' -tr
> 150 150 test.tif test_out.tif
>
> Returns a float point exception.
>
> Creating output file that is 0P x 0L.
> ERROR 1: _TIFFVSetField:test_out.tif: Bad value 0 for "RowsPerStrip"
> Exceção de ponto flutuante
Marco,
The problem is that you are trying to specify the output resolution as
150m x 150m but the output coordinate system is degrees. So when
GDAL computes how many 150 degree x 150 degree pixels it will
need for the data, it comes up with 0x0 which causes the failure.
Since 1.2.6 I have made the code issue an error instead of core dumping,
but it still doesn't work as you want. 150m is roughly 0.00135 degrees,
so try using "-tr 0.00135 0.00135" instead of "-tr 150 150".
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