[gdal-dev] Reprojecting w/ gdalwarp .. cant figure it out
Frank Warmerdam
warmerdam at pobox.com
Tue May 10 15:19:10 EDT 2011
On 11-05-10 02:59 PM, fork wrote:
> Hi good people. FMIA -- "forgive me in advance" for the following newbie
> question....
>
> I am unable to figure how to reproject a raster file from UTM10 to Stateplane
> WAshington South from the command line.
>
> Here is what I do: I downloaded the most recent NAIP imagery in a sid file,
> opened the LizardTech viewer, exported a tif. The tfw for this tif is:
>
> 10.750000000000002
> 0.000000000000000
> 0.000000000000000
> -10.750000000000002
> 546002.750000000000000
> 5291042.750000000000000
>
> So I then downloaded the ".prj" files for UTM 10N and Stateplane from
> spatialreference.org and saved them to local files ([1] and [2]). Then I run the
> following:
>
> $ gdalwarp -s_srs utm10n.prj -t_srs spwasth.prj -co "TFW=YES" \
> ortho_imagery/ortho_1-1_1n_s_wa033_2009_1.tif foo.tif
>
> This works smoothly, EXCEPT that when I cat the tfw file I get almost exactly
> the same as the tfw cited above, except for some decimal numbers. I expect it
> to be VERY different however.
>
> Can anybody tell me what I am doing wrong?
Dear ForkAndWait,
I suspect you have a left over foo.tif and/or foo.tfw from previous
attempts. gdalwarp will not create a new output file if the output
file already exists. Otherwise your procedure seems quite reasonable.
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