Re: TFW format
Frank Warmerdam <[email protected]>
| Newsgroups | gmane.comp.gis.freegis |
|---|---|
| Message-ID | <[email protected]> |
On 10/6/05, Petr <[email protected]> wrote: > Hello, > > i need help with tfw format. I have tiff image and tfw file with description: > 200.00000000 > 0.00000000 > 0.00000000 > -200.00000000 > 3408200.0000 > 5635500.0000 > > I searched internet and not found any information about using of this map. > > I need transform standard GPS coordinate (eg.: 50d04m55sN 14d26m03sE) to pixel coordinate in my map > (eg.: 256px,414px aproximately) and backwards. > Peter, You need to determine what coordinate system your image is using. It is clearly some sort of projected coordinate system. Till you know that, the .tfw isn't going to do you much good. By the way, the .tfw is saying that the center of the top left pixel of the image is at (3408200,5635500) and that each pixel is 200x200 (likely 200 meters by 200 meters). But without the coordinate system, you can't relate that to latitude and longitude values. Once you do have the coordinate system, you can use the PROJ.4 (or another projections package) to convert between lat/long values and projected coordinates. Then use the .tfw values to turn the projected values into pixel/line locations. BTW, do you happen to have a .prj file too? Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, [email protected] light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent