[Gdal-dev] trouble converting units in raster images
Jeff Hoffmann
jeff at propertykey.com
Fri Nov 4 18:07:21 EST 2005
Jeff Hoffmann wrote:
> I have a raster layer that is composed of a few hundred GeoTIFF files;
> all of the files are NAD83 / Alabama West, although some have the units
> set to meters, other are feet. I'm trying to get them all to the same
> units, but I can't figure out how to do that. I'm trying to do it with
> gdalwarp (with parameters "-s_srs '+init=epsg:26930 +units=ft' -t_srs
> '+init=epsg:26930'"). I'm using GDAL version 1.3.1.0. The command
> changes the coordinate system information when I do a gdalinfo on the
> file, but the origin, pixel size, corner coordinates all stay the same
> numbers. Is there something I'm not doing right? It seems like it
> should be pretty straightforward. Or is there some other way to
> accomplish this if it just won't work?
OK, I feel a little stupid now, but also a little confused. To get this
to work, I removed the "-s_srs '+init=epsg:26930 +units=ft'" and just
used the "-t_srs '+init=epsg:26930'". I don't know why that worked
because the source SRS parameter should match what was in the file, but
apparently something must be different. That's not the confusing part,
though. I tried a bunch of different parameter combinations and
sometimes I would delete the existing target file and sometimes I
wouldn't. It would just happily run if there was an existing target
file (or at least it didn't give me an error) but the corner
coordinates/pixel size always stayed the same even though the units
changed (the coordinate system information did get updated from ft->m).
--
Jeff Hoffmann
jeff at propertykey.com
More information about the Gdal-dev
mailing list