Converting BMP+LatLon to GeoTiff

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Converting BMP+LatLon to GeoTiff

Pete Flugstad
I have a several hundred bmp files with associated .wif files, which
contain the Lat/Lon
information for the BMP.  These .wif files are form:

    token World_Information
       Corner1     : -90.0 -180.0 0.0
       Corner2     : -45.0 -180.0 0.0
       Corner3     : -45.0 -135.0 0.0
       Corner4     : -90.0 -135.0 0.0
       Transparent :  0  0  0  255
       Name        : "World"
    end

I can't seem to find much info this format anywhere.

I've tried to use gdal_translate -a_ullr to turn these bmp's into
geotiffs, but I'm thinking
that that isn't doing what I expect.   My map program (openmap) won't
load them, and
when I run listgeo on them I don't see any tie points.

I'm still learning my way around things - can anyone point out the
likely very obvious
thing I'm messing up?  I'd like to avoid having to manually georectify
all of them.

Thanks,
Pete
_______________________________________________
Geotiff mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/geotiff
Reply | Threaded
Open this post in threaded view
|

Re: Converting BMP+LatLon to GeoTiff

Frank Warmerdam
Pete Flugstad wrote:

> I have a several hundred bmp files with associated .wif files, which
> contain the Lat/Lon
> information for the BMP.  These .wif files are form:
>
>     token World_Information
>        Corner1     : -90.0 -180.0 0.0
>        Corner2     : -45.0 -180.0 0.0
>        Corner3     : -45.0 -135.0 0.0
>        Corner4     : -90.0 -135.0 0.0
>        Transparent :  0  0  0  255
>        Name        : "World"
>     end
>
> I can't seem to find much info this format anywhere.

Pete,

I've never seen this format before either.

> I've tried to use gdal_translate -a_ullr to turn these bmp's into
> geotiffs, but I'm thinking
> that that isn't doing what I expect.   My map program (openmap) won't
> load them, and
> when I run listgeo on them I don't see any tie points.
>
> I'm still learning my way around things - can anyone point out the
> likely very obvious
> thing I'm messing up?  I'd like to avoid having to manually georectify
> all of them.

You aren't specific about what you actually did and what you got from
listgeo.

I'd think something like the following would be appropriate for the
above case.

   gdal_translate abc.bmp -a_ullr -180 -90 -135 -45 -a_srs WGS84 abc.tif

Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, [hidden email]
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent

_______________________________________________
Geotiff mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/geotiff
Reply | Threaded
Open this post in threaded view
|

Re: Converting BMP+LatLon to GeoTiff

Pete Flugstad
On Fri, Oct 8, 2010 at 9:57 PM, Frank Warmerdam <[hidden email]> wrote:
>  gdal_translate abc.bmp -a_ullr -180 -90 -135 -45 -a_srs WGS84 abc.tif

Heh - that's exactly what I did.  It gave me the listgeo output I showed -
no tie points, which is what OpenMap seemed to be looking for.  Or something -
I didn't spend a lot of time debugging.

Instead, using the OpenMap WorldFile Image code as a template, I created
classes to simply read the bmp/wif files in a manner similar to how the
WorldFiles are read - seems to work just fine.

It's for internal use right now, but I'll check into contributing this
code back.

Thanks,
Pete
_______________________________________________
Geotiff mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/geotiff