6

According to Wikipedia and ESRI last two lines in the world file represent x and y coordinates of center of upper left pixel.

Now, if I have a world file like this:

32.0
0.0
0.0
-32.0
691200.0
4576000.0

...can I say that the "real" upper left corner of the image (upper left corner of the upper left pixel) is:

X = 691200.0 - (32.0 / 2) = 691184.0
Y = 4576000.0 - (-32 / 2) = 4576016.0

...and should I use these coordinates if I want to use the image with Bing Maps or Google Maps (after converting to Lat/Long off course), or should I stick with original ones (pixel center coordinates).

UPDATE:

I just realized that the .tab file associated with the map has coordinates of the upper left pixel (0,0) calculated the same way as in my question above. Not sure about the exact formula but resulting coordinates are the same - shifted left for half of the pixel width and up for half of the pixel height. Now I'm pretty confident that this is the right way to do it.

1 Answer 1

4

Yes use geographical coordinates longitude and latitude for Google/Bing Maps.

When the world file is present, ArcGIS performs the image-to-world transformation. The image-to-world transformation is a six-parameter affine transformation in the form of

The transformation parameters are stored in the world file in this order:

20.17541308822119 (A)
0.00000000000000  (D)
0.00000000000000  (B)
-20.17541308822119 (E)
424178.11472601280548 (C)
4313415.90726399607956 (F)

The equation:

x1 = Ax + By + C
y1 = Dx + Ey + F

where

x1 = calculated x-coordinate of the pixel on the map
y1 =  calculated y-coordinate of the pixel on the map
x = column number of a pixel in the image
y = row number of a pixel in the image
A = x-scale; dimension of a pixel in map units in x direction
B, D = rotation angle
C, F = translation parameters; x,y map coordinates of the center of the upper left pixel
E = negative of y-scale; dimension of a pixel in map units in y direction

For Images to be overlayed with Bing Maps (MapCruncher should be used. )

for Google Maps use http://mapki.com/wiki/Add_Your_Own_Custom_Map

Both use Mercator Projection see parameters for Google Maps

useful links http://econym.org.uk/gmap/custommap.htm

3
  • Thanks, I know how to calculate the coordinates for specific pixel in the map but let's simplify this. Let's imagine that I have a single-pixel image (1x1 px) with the world file from the question. In such case my image would represent a 32x32 meters square with coordinates X=691200.0 and Y=4576000.0 being the center of this square. Coordinates for lower right corner of the image (using the formula) are X1=691232.0 and Y1=4575968.0. Now if I use those two points to make a rectangle on the Bing Maps, that rectangle will be shifted 16 meters right and down.
    – Anil
    Commented Sep 19, 2010 at 16:22
  • That's the reason I thought I should first calculate coordinates of the upper left corner of that pixel by subtracting half of the pixel width from X and half of the pixel height from Y and use these coordinates as the start point for coordinate calculations. That way I would get the rectangle that realy represents my pixel on the map.
    – Anil
    Commented Sep 19, 2010 at 16:23
  • GlobalMapper (A cheat?) exports to Bing and Google (and NASA Worldwind) Maps - Remember Mercator as in all cylindrical projections, parallels and meridians are straight and perpendicular to each other. In accomplishing this, the unavoidable east-west stretching of the map, which increases as distance away from the equator increases, is accompanied by a corresponding north-south stretching, so that at every point location, the east-west scale is the same as the north-south scale.
    – Mapperz
    Commented Sep 19, 2010 at 21:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.