View previous topic :: View next topic |
Author |
Message |
tekhead
Joined: 21 Jan 2005 Posts: 2
|
Map Plotting |
Posted: Fri Jan 21, 2005 9:22 am |
|
|
Hello,
I'm new to this forum but you all seem like very intelligant people so i thought i'd see if you could help me solve a wee problem for me!?
I'm compling a project where I am to use a GPS navigation system to plot a course on a map, basically a tracker system, in Visual Basic!
I need to know how to get a map to display in VB so that i would be able to make marks on it using an X,Y plot system.!?
Maybe someone has a link to a tutorial somewhere to show me how to do this???? I know it has to of been done before!
Thanks in advance,
Enda. |
|
|
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
Posted: Fri Jan 21, 2005 9:37 am |
|
|
What map? What format? Are you to draw a map? Or load one? Mostly likely you will use an object that has a handle to a device context available. The picture control is probably the easiest for you although you could just use the background of a form or even create your own user control. |
|
|
tekhead
Joined: 21 Jan 2005 Posts: 2
|
|
Posted: Fri Jan 21, 2005 10:11 am |
|
|
Loading a map would suffice, most probably a bitmap!
If I insert my map into a picture box, then i obviously have the distances in cm,inch,pixels or whatever but i've to take in a position from the GPS and plot on the map in Longitute and Latitude! |
|
|
Kasper
Joined: 14 Jan 2004 Posts: 88 Location: Aurora, Ontario, Canada
|
|
|
Douglas Kennedy
Joined: 07 Sep 2003 Posts: 755 Location: Florida
|
|
Posted: Sat Jan 22, 2005 2:50 pm |
|
|
When it comes to maps there a few issues to be aware of.
The map often covers a much wider area than the immediate locale you are interested in. This is what is known as scaling in which you can zoom in and out. by adjusting the scale.
The next issue is that maps typically involve lines with a lot of constant background. The efficient way they are stored is either vector map maps ( a collection of polygon segments with start and end pts) representing the lines( shore line contour line etc) on the map. The other way is a raster scan with the compression coming from a run length encoding scheme ( so many pixels of background.so many pixels of the line, more background, more line...to the end of the raster line. If the background on a raster line extended in from the margin 1000 pixels before a shore line was encountered that would be represented by a single encode of 1000 and the pixel instead of 1000 pixels all of which are the same.
Raster maps are easier to interface to an lcd display but harder to scale (zoom). Vector is the easiest to scale but more complex to display on an LCD. |
|
|
guestr Guest
|
RE: |
Posted: Wed Jan 26, 2005 7:55 am |
|
|
Hi,
Not very difficult in VB.
You need to get the map as an image file. Then using the scale factor of the map you need get the equivalent to a pixel.
The pixel equivalent should be in terms of the units used by the hardware. Thus in a way linking the hardware to the software.
thanks
arun |
|
|
guestr Guest
|
RE: |
Posted: Wed Jan 26, 2005 7:55 am |
|
|
Hi,
Not very difficult in VB.
You need to get the map as an image file. Then using the scale factor of the map you need get the equivalent to a pixel.
The pixel equivalent should be in terms of the units used by the hardware. Thus in a way linking the hardware to the software.
thanks
arun |
|
|
pat
Joined: 07 Sep 2003 Posts: 40 Location: Adelaide, Australia
|
|
Posted: Wed Jan 26, 2005 4:53 pm |
|
|
Unless this is a task you want to do for fun, or you've been told to for a course/collage/university etc you're doing, then have a look at http://www.oziexplorer.com/
You can scan any map, then georeference it by telling the software the coordinates of points on the scan, plug your NMEA-0183 compatible GPS (just about all GPS on the market) into your PC serial port, and it will plot your position in real time on the map.
I've purchased this software and its very good. There is a free version available for download, it has some limitations, but all the features are usable.
Cheers,
Patrick |
|
|
|