Wednesday, 8 February 2017

raster - Coordinates of upper left corner in the world file?



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.




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...