Using MapWin with an image as map

Hi there!
I want to use a image file as map image.
I already have a image files with the lat&lon referenced to each image border.
Image.Open() is the correct object/procedure tu use with it?
I’m reading this as source:

Best Regards!!


You can very easily use an image file as map. I hate using that term though. you can plot points or do other GIS functions with a properly rectified image…There, that sounds more accurate.

I am very new to this API. I’m also not what you would call a “programmer”. So if I provide any information here, take it with a grain of salt.

It sounds like you have an image file. GREAT! What type? PNG,JPG,Tiff,etc…

“with the lat&long referenced to each image border”. This statement says a lot and also doesn’t say anything. Are you referring to image tiles? are you referring to having an image where you intrinsically know the border coordinates? By that I mean, you just know or have documented the coordinates of several points, but do NOT have some sort of worldfile for said image. Final question, OR do you have a world file like a .JGW or the like that is accompanying the image file? All of these things matter…

What language are you coding in?

I am coding in visual basic .NET <> so please keep that in mind.

I am using .JPG images. I wrote a subroutine that allows me to enter in coordinates for a known point. I match those coordinates with a X,Y pixel location (was using a mouse cursor, I am now using a set of crosshairs i draw on the screen at a known location). My subroutine, which uses some math (affine transformation) then does some math magic (with two more more data sets recorded) to develop the worldfile (.JGW). MapwinGIS is smart enough that if you open an image and there is a corresponding worldfile in the same directly names correctly, that it will use that data to draw the image and have all of the proper references (i.e projection, coordinates, yada yada yada). its clean and quick.

What part are you getting tripped up on?

Hi Eric! I’m thinking we are chasing the same. For now what I understand is that OCX can load an image but it’s from a world view not for a sector.

In online mode the ocx and openstreet map works great, in fact the control loads all the maps in some temp mechanism because disconnected show in detailed and world view without any issue.

So my second option use a PictureBox containing the map and a picture containing my marker image and doing some math (at now that functions are empty) position it int the picturebox using Load() statement. For now marker and label works it’s not the more beauty I see but are there. (I’m working on this now).
The only problem doing this is that the image can’t be rotated, must maintain lat and lon in 0 and 90° and the image must be completely linear.

The third option will be install a map server and try to connect the OCX but some of them are a little bit complex so is my last resort.

I’m using VB6, if you have some code help me a lot and a lot!
I’m trying to wrote a piece of code to get some pois from a DB and show them in a map that can be on-line or off-line. At the off-line mode the user must load the image file and load too the lat and lon reference.

Best Regards!

This is te testing picturebox + image + label