Page 2 of 2   << first < 1 2
Bookmark this page: Add GUI to make geotiff metadata to Yahoo MyWeb Add GUI to make geotiff metadata to Google Bookmarks Add GUI to make geotiff metadata to Windows Live Add GUI to make geotiff metadata to Del.icio.us Digg GUI to make geotiff metadata! Add GUI to make geotiff metadata to Netscape
  •  
  • Subject
  • Author
  • Date
If you were  Registered and logged in, you could reply and use other advanced thread options
Posted by Chris on October 12, 2006, 8:08 pm
Getting closer.

Now I have created a world (wld) file, I know the projection [UTM],
zone and datum [WGS84].

The gdal tools got as close as showing me a lat/long to go with my jpg,
but I could not convince it to save as a valid georeference tif. It did
do enough to make a gtf file from the wld file, however the gtf is not
good enough, without any zone clues I guess it cannot locate the
coordinates on the planet.

How do I get to a full gtf file, I tried various options but the
lat/long are always a couple of degrees off true. I would expect to
have fairly boilerplate tags, where only the zone need change.

Ta

Chris



Mattan wrote:
> chrisaaaaa@googlemail.com wrote:
> > I can dig up the projection and datum, with this and the co-ordinates
> > of opposite corners do I have enough?
> > Chris
> Maybe GDAL can be of help? Check out gdal_translate and gdalwrap,
> in that order, at http://www.gdal.org/gdal_utilities.html
>
> Good luck,
> Mattan


Posted by Tom Russo on October 13, 2006, 1:23 pm
On 12 Oct 2006 17:08:07 -0700, Mr. Richard Fayler of Fort Lee, New Jersey

> Getting closer.
> Now I have created a world (wld) file, I know the projection [UTM],
> zone and datum [WGS84].

> The gdal tools got as close as showing me a lat/long to go with my jpg,
> but I could not convince it to save as a valid georeference tif. It did
> do enough to make a gtf file from the wld file, however the gtf is not
> good enough, without any zone clues I guess it cannot locate the
> coordinates on the planet.

> How do I get to a full gtf file, I tried various options but the
> lat/long are always a couple of degrees off true. I would expect to
> have fairly boilerplate tags, where only the zone need change.

I believe you said you already knew the lat/lons of the corner points. If so,
you can compute the UTM zone quite simply. It is simply
longitude/6+30
done all in integer arithmetic, with West longitude negative. For example,
if your longitude is -105 (105W), that comes out to zone 13.

Once you know the zone, you should be able to tell gdal_translate how to
georeference it using your worldfile. Simply use the "-a_srs" option with the
EPSG number for that zone in WGS84 UTM. Assuming you're in the northern
hemisphere, the EPGS number for a UTM zone in WGS84 is just 32600 plus the
zone number. So if you're in, say, UTM zone 13, just tell gdal_translate
"-a_srs EPSG:32613" and give it your input raster and its associated
worldfile. It should create an appropriate geotiff with the right tags.

gdal_translate -t_srs EPSG:32613 input.jpg output.tif

If your worldfile is input.jgw (if I recall correctly), gdal_translate will
know to use it, and output.tif should show all the right tags if you do:
gdalinfo output.tif

--
Tom Russo KM5VY SAR502 DM64ux http://www.swcp.com/~russo/
Tijeras, NM QRPL#1592 K2#398 SOC#236 AHTB#1 http://kevan.org/brain.cgi?DDTNM
"And, isn't sanity really just a one-trick pony anyway? I mean all you get is
one trick, rational thinking, but when you're good and crazy, oooh, oooh,
oooh, the sky is the limit!" --- The Tick

Posted by Chris on October 27, 2006, 6:56 pm
Thanks Tom,

That was the missing step, now with this bat file I get what I wanted.

IrfanView.exe input.jpg /bpp=8 /convert=temp.tif
geotifcp.exe -e input.wld temp.tif temp_gf.tif
gdal_translate.exe -a_srs EPSG:32610 temp_gf.tif output.tif

Easy!!!

Chris


> On 12 Oct 2006 17:08:07 -0700, Mr. Richard Fayler of Fort Lee, New Jersey
> > Getting closer.
> > Now I have created a world (wld) file, I know the projection [UTM],
> > zone and datum [WGS84].
> > The gdal tools got as close as showing me a lat/long to go with my jpg,
> > but I could not convince it to save as a valid georeference tif. It did
> > do enough to make a gtf file from the wld file, however the gtf is not
> > good enough, without any zone clues I guess it cannot locate the
> > coordinates on the planet.
> > How do I get to a full gtf file, I tried various options but the
> > lat/long are always a couple of degrees off true. I would expect to
> > have fairly boilerplate tags, where only the zone need change.I believe you
said you already knew the lat/lons of the corner points. If so,
> you can compute the UTM zone quite simply. It is simply
> longitude/6+30
> done all in integer arithmetic, with West longitude negative. For example,
> if your longitude is -105 (105W), that comes out to zone 13.
> Once you know the zone, you should be able to tell gdal_translate how to
> georeference it using your worldfile. Simply use the "-a_srs" option with the
> EPSG number for that zone in WGS84 UTM. Assuming you're in the northern
> hemisphere, the EPGS number for a UTM zone in WGS84 is just 32600 plus the
> zone number. So if you're in, say, UTM zone 13, just tell gdal_translate
> "-a_srs EPSG:32613" and give it your input raster and its associated
> worldfile. It should create an appropriate geotiff with the right tags.
> gdal_translate -t_srs EPSG:32613 input.jpg output.tif
> If your worldfile is input.jgw (if I recall correctly), gdal_translate will
> know to use it, and output.tif should show all the right tags if you do:
> gdalinfo output.tif
> --
> Tom Russo KM5VY SAR502 DM64ux http://www.swcp.com/~russo/
> Tijeras, NM QRPL#1592 K2#398 SOC#236 AHTB#1http://kevan.org/brain.cgi?DDTNM
> "And, isn't sanity really just a one-trick pony anyway? I mean all you get is
> one trick, rational thinking, but when you're good and crazy, oooh, oooh,
> oooh, the sky is the limit!" --- The Tick


Posted by Paul Cooper on October 13, 2006, 5:08 am
On 12 Oct 2006 04:42:11 -0700, chrisaaaaa@googlemail.com wrote:

>I can dig up the projection and datum, with this and the co-ordinates
>of opposite corners do I have enough?
>Chris

Yes, that should be sufficient.

Page 2 of 2   << first < 1 2