Click here to Skip to main content
15,879,096 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
HI,

I am building a software package for the boater and I have got to the point where I need to include maps (charts in nautical terms) and to be able to place a cursor where a GPS currently reports the position... and to include... Routing, WayPoints, etc. I have snippets of code written to deal with some of the calculations but the Mapping (Charting) portion still illudes me. I am reading the NMEA sentances from the GPS and interpriting them. BUT now I would like to place the appropriate map (chart) on a frame and place an icon wher the boat is?

I read the article on "Build your own GIS Application using MapWinGIS" but that is for a very different type of charting and mapping. I also read "Write your own GPS Application" Which I have used/adapted a lot of the code from. Both excellent articles but do not address the use of detailed maps (charts) like those used in the boating (nautical) world.

Or maybe I am missing somthing?

If anyone knows of anything that will help steer me in that direction I will be very grateful.

Thanks in advance.
Posted
Comments
Sergey Alexandrovich Kryukov 28-Feb-11 20:22pm    
Add HREFs to the article you mention. It is not clear what's so special with nautical charts. A chart is a chart.

Please also explain what seems to be a problem. What functionality are your missing?

I would encourage using the term "chart" and not "map". In mathematics, term "char" is very closed to its geographic meaning (in the theory of manifolds), but "mapping" has too many uses, mostly in set theory and pretty close meaning in programming.
--SA
SquireDude 1-Mar-11 11:44am    
Sorry about not being explicit enough about the meaning of a map/chart my mistake. In nautical terms the word MAP is never used. A given area is called chart, not to be confused with an excell type chart! The electronic charts used in the marine/nautical world used to be the .BSB format and are now
•Raster Navigational Charts® (NOAA RNCs): bitmap electronic images of paper charts
•Electronic Navigational Charts® (NOAA ENCs): vector charts that conform to international standards
They are called RNC's (Raster Navigational Chart) and ENC's (Electronic Navigational Chart) using vector and raster graphics. Here is a link that better shows what I mean... http://www.nauticalcharts.noaa.gov/mcd/learn_diff_map_chart.html

I hope this helps clear up that point... my bad sorry.

To the next point you make... What functionality am I missing?
I am missing the functionality to display a nautical chart within my desktop (not web) application. I am not sure where to start. I have looked at several articles here that talk about mapping but mostly they are directed at displaying numeric values as colors or shapes (i.e. displaying a rough outline of the USA and coloring each state as to who has the most ground water reserves or potatoes.) My issue is very plain jane, display a given nautical chart for the area where you are currently (current lat/long position comes from a GPS interface). Then overlay a route with appropriate navigational waypoints along the way. Here is a NOAA on-line chart displayed and the type of functionality I need to include in my app. Again please note that my app has to be a stand-alone desktop app (WinForm) as it will be used by boaters at sea) http://www.charts.noaa.gov/OnLineViewer/18022.shtml

I hope this has helped and not hindered.

Thanks for your comments
Phill
Sergey Alexandrovich Kryukov 1-Mar-11 14:30pm    
Thanks for the reply. Even the Excel "chart" is still close to geographic chart than "map". You reference uses both terms, I understand why. Now, what is not clear in your clarification: if you want desktop application, do you still want feeding the chart data via Internet? Where do you want to have your data: locally of from internet. If from internet, you can use the same HTTP access as a Web browser would do. In you can have all locally, there are two possibilities: you have data and the software engine to process data with the API, or you have only data. If you have engine with API, you should address to this API and its documentation, I have no idea what is that; if you have just data, you'll need a complete description of data format and semantic, but in this case you can do whatever you want.
So you see, you question makes some forks...
--SA

1 solution

Hi,

First you need to decide you want to use an existing mapping platform (Google maps, ESRI maps or OpenSource GIS) or want to create your own.

Second thing how you are having your nautical chart. Is it a vector data or an image( scanned image). If it is vector data in what coordinate base it is. If it is unknown coordinate system then you need to transform all vertices in to a known coordinate system. Then you can plot your chart with any GIS software like MapWinGis.

If your chart is a scanned image then you need to translate the image coordinates in to real world coordinates which is called map registration. There are free tools available which can register your image to a GeoTiff. This GeoTiff you can use with many open source or commercial GIS packages.

For registration you need to know minimum 4 reference coordinates (in geographic or UTM) in your nautical chart. If you have just 4 reference points then go for polynomial order 1 and bilinear interpolation for translation. If you have many reference point then go for higher polynomial order and cubic interpolation (as some smoothing needed with affine transformation). Depends on how much accuracy required.


Once register the image then it is easily able to plot the GPS way points which are either in geographic or UTM.

If you choose smaller area in one frame (say a few hundred nautical miles) then go for UTM. If larger are a big ocean in one frame then need to use Geographic. Geographic is a spherical coordinate system which is complex than UTM for conversions.

Once the GPS points plotted and you want to display nautical miles then you need to convert the mouse over real world coordinate to distance and angle from the reference real world coordinate point. The nautical miles usually a distance and angle from a reference point.

So there are many choices whether you are going to use a existing package or going to develop your own, which coordinate system you prefer and how you are having your base map (nautical chart) data (vector or raster-image). Once decided then post your comments if any doubts.

If you are going to develop your own web based then SVG (scalable vector graphics from adobe) may help you. Already there is a package SVG Map is there. If existing packages then there are lot of open source web maps and commercial ESRI web map services are there.

ESRI web map service can be integrated with Silver Light at client side.

If planned your own software with windows app, then you can use c# or vb.net with available coordinate transformation libraries. The controls like picture box will make your job easy to translate the view port from view port coordinates to map coordinates. A custom panel class will be more fit if you know all the mathematical map matrix transformations.

I given a basic guidance here. You can dig more in the internet
 
Share this answer
 
Comments
SquireDude 1-Mar-11 12:13pm    
Hi Albin,

WOW! It is clear that you know your stuff around charting programs.

I am not sure where to start as some of what you have asked and offered I have no idea about.

First the Chart type...
•Raster Navigational Charts® (NOAA RNCs): bitmap electronic images of paper charts
•Electronic Navigational Charts® (NOAA ENCs): vector charts that conform to international standards
The BSB (raster) version is being phased out but still widely used all over the world. The Vector charts are more popular as they are a FREE download from NOAA.

I am not sure I know what you are asking when you asked for the coordinates? Is that the scalse of the chart? or the Lat & Long range of the chart? Both can vary depending on how much detail is needed. On an approach to an anchorage you would want the most detail on the other hand if you are crossing an ocean you want the inverse.

I have no problem using an already written product if I can interface with it and there is source code so if bug should be found I can address it. I do not want to re-invent the wheel if I don't have to! I looked at what was MapWinGIS which is now MapWindow and downloaded it yesterday and am still looking it over.

This as this will be used on boats at sea this is a WinForm application with an Access database behind it. There fore it needs no outside referances or sources once loaded. As I noted the charts can be downloaded prior top a trip FREE from NOAA. OR the user can purchase a set of BSB charts on CD.

Again thanks Albin. I hope this will give you more information about my project and it will help keep this dialog open so you can continue to suggest and guide me as know much more than I about the issues and products involved.
Sergey Alexandrovich Kryukov 1-Mar-11 14:32pm    
This is good to start and a good list of options, my 5. As I said in my comment to my answer, the question if forked, OP should sort it out.
--SA
Albin Abel 1-Mar-11 14:46pm    
Thanks SAKryukov
Albin Abel 1-Mar-11 14:56pm    
Hi SquirDude,

The coordinates as you said the grographic Range, but need it for reference points. Say you choose one point at the chart and how you can refer that point to real world?. using a coordinates, isn't it?. Just like the x, y in a Cartesian plane. So when you are adding GPS points or some other data which are in some coordinate system has to overlay on your chart. So you have to tell the software this place in my paper chart is this coordinate in real world. So the software can map other data in a coordinate system to your chart. You may be clear now. As you are using NOAA charts it should have coordinate reference points.

As you want to use MS Access , make sure MapWinGis supports it. The free databases like MySql. Postgre sql (MySql spatial, PostgreSql Spatial) supports spatial modules which helps you to store spatial vector data. Even Oracle has oracle spatial. The Postgre people also have a GIS version 'PostGIS'. May be you need to have a look at it also.
SquireDude 2-Mar-11 12:02pm    
Hi Albin,

Sorry I didn't get back to you yesterday but we lost power for several hours yesterday and it shot a big hole in the day.

I have to think a bit about your suggestions on the coordinates issue, I am sure you are correct as ALL nautical charts come with a reference to it's scale and Lat/Long (on the top left corner and bottom right corner). They will probably be the answer but I will have to check first.

All the charts will have come from NOAA, British, or French, and dowenloaded to the local machine. ALL charts will be on a local HDD or on CD prior to a trip. There are several different formats still floating around as I noted in my last email. I know because I bought several to cover my South Pacific trip in 1997/8. BSB was the only format available and they came on CD at about $400 per CD. Now the US NOAA has them for FREE as a download in Raster or Vector formats.

I chose MS Access as its is small and movable and not really dependent on much to work. If I put an MS SQL DB behind it there would be lots of version issues (Windows versions that is). So the choice was made because of simplicity, size, and installtion perameters. I am open to MS SQL (been using it for 20 years) if it is installable on most versions of Windows.

As for your last suggestion I most certailny will look into Postgre's version "PostGIS"... I was totally unahware of the diffirent DB availabe for this type of project. WOW Back to the drawing board on this one!

Thanks

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900