World file

Aus Geoinformation HSR
Wechseln zu: Navigation, Suche

World File (.tfw, .jgw (.jfw))

Das ESRI World-Format (world file, world-file) speichert Bild-zu-Weltkoordinaten-Daten zur Georeferenzierung von Rasterbildern. Der Dateiname heisst gleich, während die Datei-Extensions für tif tfw, für jpg jgw heissen, also der erste und letzte Buchstabe der dreibuchstabigen Erweiterung ergänzt mit 'w' am Schluss.

Konversion World file zu Google Earth

Google Earth expects image overlays unprojected with lat/long extents while worldfiles are projected by default in UTM. The projection in world files are not specified, but often you can make a guess, e.g. "UTM Zone 49 S".

Tipp: Use gdalwarp (see GDAL) to convert each jpg/worldfile into an unprojected GeoTiff, and then gdal_translate to produce a jpeg compatible with Google Earth, along with another worldfile listing in lat/lon.

 1. gdalwarp -s_srs '+proj=utm +zone=49 +datum=WGS84 +south' -t_srs 'EPSG:4326' my_image.jpg my_image.tif
 2. gdal_translate -outsize 50% 50% -of JPEG -co WORLDFILE=YES my_image.tif my_image_50.jpg

Format

Hier ein Beispiel (mit CH1903-Koordinaten):

 A: 1.25
 B: 0
 C: 0
 D: -1.25
 E: 675000.625
 F: 277999.375

Erläuterungen:

  • Zeile A: Die erste Zahl ist gleich der Länge eines Pixels in horizontaler Richtung.
  • Zeile B/C: Die zweite und die dritte Zahl sind Rotationswinkel, die jedoch 0 sind und oft ignoriert werden (z.B. ArcView 3.x).
  • Zeile D: Die vierte Zahl ist die Länge eines Pixels in vertikaler Richtung. Zu beachten ist hier das negative Vorzeichen.
  • Zeile E/F: Die zwei letzten Zeilen/Zahlen sind die Koordinaten der linken oberen Ecke des Bildes (hier: Landeskoordinaten der Schweiz).

Bemerkung zu E/F: Die Zahlen hier sind in einem bestimmten Koordinaten-Referenz-System gehalten (KRS, engl. CRS oder SRS). Angaben zu KRS werden z.B. bei ESRI-Produkten oft in .PRJ-Dateien abgelegt.


English text:

The ESRI World format stores the image-coordinates-to-world-coordinates transformation data resulting from the georeferencing process executed in the Map Assistant. The resulting file contains the transformation factors A to F defining the registering of the image in accordance with the equation below:

  1. x' = A x + B y + C
  2. y' = D x + E y + F

with x,y = Image coordinates

    x',y'= Real world coordinates
    A = x-scale
    B,D = rotation terms
    C,F = translation terms
    E = y-scale (negative)
    

Example for a .tfw file:

   A: 4.23214625853148
   D: 0.00000000000000
   B: 0.00000000000000
   E: -4.23214625853148
   C: 3404018.70881921
   F: 5819863.55539414

Weblinks