Raster image load in a correct coordinates

Mar 31, 2012 at 1:04 PM
Edited Mar 31, 2012 at 1:15 PM

Hi,

I am using MapWinGIS 4.8 with c# language. I want to make an application that would display world map and on top of that would be a shape layer. The world map should be like bing or google maps, so I download raster images from bing (like that: http://msdn.microsoft.com/en-us/library/aa940990.aspx). That image doesn't have any data only zoom level (zoom levels: http://msdn.microsoft.com/en-us/library/aa940990.aspx ), center latitude and center longitude. I need to put it in correct place and at a correct scale that it would look good with my shape layer (shapes are specified by latitude and longitude). When I try to add raster I do like this:

 

//Downloaded raster at this latitude (44.6381374115826) and longitude (-63.5868457585728) centers.
//But to add I need to know bottom left corner.
imagefile.OriginalXllCenter = -63.5868457585728;
imagefile.OriginalYllCenter = 44.6381374115826;
//Scale, dont know how to count it too.
imagefile.OriginalDX = 0.001;
imagefile.OriginalDY = 0.001;

 

So how could I put the image in a correct latitude and longitude and with good scale?

Coordinator
Apr 1, 2012 at 9:09 PM

You can have a look at the Tiles plug-in.

It handles getting Bing maps, Google Maps, OpenStreetMap maps and others.

You can get it the source code here: http://svn.mapwindow.org/svnroot/MapWindow4Plugins/mwTiles/