I am working on a project to overlay the National Weather Service Doppler radar images over a map. The map I am working on is a projected coordinate system NAD83 15N. I am using SharpMap 1.0 libraries.
I am using a KMZ file provided by the Weather Service to get the link to the radar image. The link is.
The image is 660x550
I realize that gif files don't work with GdiImageLayer so for now I have just converted it to .png using Gimp for testing. Once working I would develop the code to convert it on the fly.
For now I am manually creating the world file using coordinates retrieved from the doc.kml file extracted from the kmz. The weather service image has the following lat/lon box coordinates.
I convert these coordinates from WGS84 to NAD8315N to get
North - 5281933
South - 4662024
East - 686592
West - 229292
Here is where I'm not sure on what I'm doing. I have read and re-read the wiki on how to setup the world files and what I calculate for x scale and y scale in the world file do not properly scale the image over the NAD83 coordinates - the image is not "stretched"
The X delta is 457300 meters
The Y delta is -619908 meters
One pixel on my map = 1474 meters
I'm not sure how the size of the gif image enters into the equation. Originally I thought I would just take the deltas of the x and y coordinates and divide by the map pixel size but that doesn't scale properly.
By trial and error I have come up with a world file that works but would like to develop the equation because I have other radar images that I wish to use. Here is what works.