Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 15-01-2012, 10:47   #1
Registered User

Join Date: Jan 2012
Posts: 52
GE and Image to BSB/KAP Using Imgkap

Hi,

I've been looking for a multi-platform solution to moving images either from Google Earth or scans or drawings to something that was Geo-referenced that I could use in charting programs.

I stumbled upon IMGKAP and found it worked great. So I wrote a little page with some instructions for others who might want to turn their images into BSB/KAP charts. It should work for PC/Linux/Mac.

Since I'm not very familiar with OpenCPN or other chart programs I'm not sure how this compares to the KAP files produced by GE2KAP or ChartAid. I was hoping someone could take the instructions for a test drive and let me know how it turns out.

How to make Charts from Google Earth Images

I've noticed GE2KAP allows you to overlay images. I would like to do this with imgkap too if it doesn't already support that feature. My problem is I'm pretty limited in my experience with chart plotting programs as I normally use my Garmin Vision Charts with satellite imagery on my GPS plotter.

Thanks,
Eric
__________________

__________________
Eric. is offline   Reply With Quote
Old 17-01-2012, 17:45   #2
Registered User
 
HappySeagull's Avatar

Join Date: Dec 2010
Location: B.C.,Canada
Boat: 29'
Posts: 1,984
Re: GE and Image to BSB/KAP using Imgkap

Eric,Good Idea for imgkap.Have you seen the thread here on MdJ's imgkap?
Imgkap - kap File Converter Tool

too much info,I know but it's worth skipping through and you could put nuggets on your page.
I looked at your instruction page.but If you don't mind a critique,I was a little confused by just typing "./imgkap"into a cmd window in Windows.I didn't see the "." for one.
Maybe "C:\imgkap\imgkap ..." to match the example or include a simple command prompt shortcut the user could put into the imgkapping folder.Then Path wouldn't matter.Or use a script dropped into the imgkapwork folder!then no path problem and no long lines of mistake possible stuff.Or how about a template idea,so the whole line could be set up ,at leisure, in a line of text and just copied/pasted into the cmd line.

a "double-click and go" script that makes it a little easier for me, is:

Code:
@echo on
@echo A script for MdJ's imgkap IMPORTANT
@echo You need know that South Latitude has a minus sign ahead of it.
@echo And,that West Longitude also has a minus sign ahead of it....
@echo Finally,that this program works up to 85(North) and -85(South)
@echo .....Of Course,you must use the "Enter"key after all inputs....
@echo off
:begin
set /p name= type or paste the name of the picture INCLUDING its "extension" tif,png,etc...
set /p TIDEDATUM =MEAN SEA LEVEL (MSL),LOWEST LOW WATER (LLW) etc.
set /p lat1= upper corner lat...
set /p long1= upper corner long...
set /p lat2= lower corner lat...
set /p long2= lower corner long...

imgkap -n -s "%TIDEDATUM%" "%name%" "%lat1%" "%long1%" "%lat2%" "%long2%"
pause
@echo on
@echo Like to make another?Or just close the window to quit.
@echo HINT:You don't have to re-enter values that are the same.Just tap the "Enter"key.
@echo off
GOTO begin
just copy and paste the above into a text file that is in a folder with imgkap.exe and your image..Change the ".txt" to ".bat" and double click it...NOTE THAT it is imgkap in the script above NOT imgkap1.1 etc....yes,I changed the name of the "exe "to save typing but you can edit the above to suit the 1.1 if you like!and Get rid of the instructions I wrote or whatever.
By the way I am using the "-n" switch....I still target to 256 colours and I've swung to pngs. Xnview (free)can "see" kaps" with the bsb plugin that's in with a package of plugins.

An overlay can be done but only ahead of time, as transparent layers fitted in something like adobe elements/Photoshop or the GIMP and saved as an image.Not as elegant as Paul Higgins's GE2KAP !
__________________

__________________
HappySeagull is offline   Reply With Quote
Old 18-01-2012, 06:48   #3
Registered User

Join Date: Jan 2012
Posts: 52
Re: GE and Image to BSB/KAP using Imgkap

Thanks for the ideas. I'm using linux (no GE2KAP for me) so I'll look into the windows instructions more.

I could easily write a bash script that could convert files and prompt you for lat/lon. I think imgkap will also do image conversions. And I could invoke GIMP via the command line to process overlays. I'm not sure how to pick the proper pixel locations yet....

I was thinking of writing a java tool that added a GUI function to imgkap and maybe switch the image libraries to Java instead of libfreeimage so it would be easer for people. It could show the image or the overlay image, you pick the LAT/LON points or corners and it builds the KAP file.

I'll look at that thread and see if I can get some other ideas!
__________________
Eric. is offline   Reply With Quote
Old 18-01-2012, 10:05   #4
Registered User
 
HappySeagull's Avatar

Join Date: Dec 2010
Location: B.C.,Canada
Boat: 29'
Posts: 1,984
Re: GE and Image to BSB/KAP using Imgkap

That'd be great, Eric! A GUI for imgkap!

It's more WinDose but incidentally,another Eric wrote a GUI for Map_Cal and tiff2bsb that is quite cool. HELPCAL.
Convert TIFF Image into Map KAP
I find it's very good.


The GM2SC is quite interesting...
__________________
HappySeagull is offline   Reply With Quote
Old 18-01-2012, 11:26   #5
Registered User

Join Date: Jan 2012
Posts: 52
Re: GE and Image to BSB/KAP using Imgkap

Thanks, I read those threads but I must admit since I've never really worked with electronic chart plotters, some of the discussions in those threads are a bit esoteric to me.

If I did write a Java based tool (any OS platform) that could calibrate images and generate kap files, would it be anything novel or would it just be another tool? It seems there are a lot of different solutions out there.

Is there anything in OpenCPN that can do this? It seems like it would be an easy add-on for them.

A few other detailed questions:
1. Why 256 colors?
2. Is there a tool I could view the features of that would be a good example (remember I can't run windows programs to see them)?
3. Is there anything I could do that would make it novel and useful?

Thanks,
Eric
__________________
Eric. is offline   Reply With Quote
Old 18-01-2012, 11:41   #6
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 2,468
Re: GE and Image to BSB/KAP using Imgkap

Eric...
Nice idea
Quote:
Originally Posted by Eric. View Post
Is there anything in OpenCPN that can do this? It seems like it would be an easy add-on for them.
Well, we write a chartplotter, not a chart production tool. And our plates are pretty full as it is. If you don't insist on Java, feel free to implement it though.
Quote:
1. Why 256 colors?
It's a maximum palette size (BSB standard) Much less is usually needed for a chart (if it does not come from Aerial photography) For example for the NGA charts library, we currently use 32 color palettes and they look well.
Some more technical info about the format at https://github.com/ngacharts/ngachar...r-and-bsb-file
If in doubt, feel free to ask, we have gained some expertise over time.
Quote:
2. Is there a tool I could view the features of that would be a good example (remember I can't run windows programs to see them)?
Nope. But if you have Wine, MapCal should work under it.
Quote:
3. Is there anything I could do that would make it novel and useful?
Make it less annoying to use than MapCal, that would be really great

Cheers

Pavel
__________________
nohal is online now   Reply With Quote
Old 18-01-2012, 12:12   #7
Registered User

Join Date: Jan 2012
Posts: 52
Re: GE and Image to BSB/KAP using Imgkap

Thanks the info and for that link. I've seen the libbsb stuff, but that page was a bit more complete and answered some questions I had been wondering about.

Quote:
Originally Posted by nohal View Post
Well, we write a chartplotter, not a chart production tool.
Good point. I've actually been more interested in chart creation because I write guidebooks and have to do my own mapping and sounding. I've worked with QGIS (QGIS Features) some but found it to be overkill and rather difficult for making simple ARC layers (lat/long grids, etc.).

I have many ideas based on my experience making charts that might be best complemented in OpenCPN which could be used as both navigation and data collection and then ported over to some chart production tool.

I noticed one of the requested features on the list is for displaying 3d bathometric data. While I'm not interested in 3d, I would be interested in building a depth layer that could be overlaid into OpenCPN.

If I were to investigate doing something related to this feature as well, is there any insight into how this data could be displayed or how the data would be collected and recorded in OpenCPN?

Thanks,
Eric
__________________
Eric. is offline   Reply With Quote
Old 18-01-2012, 15:02   #8
Registered User
 
HappySeagull's Avatar

Join Date: Dec 2010
Location: B.C.,Canada
Boat: 29'
Posts: 1,984
Re: GE and Image to BSB/KAP using Imgkap

Eric,not sure if this will encourage your fertile grey matter,but reading that,OpenCPN's "Quilting" plus chartmaking "quilting borders" using same-depth sounding locations...... occurs to me.It could follow your bathymetry.Each depth would be a separate kap or, if it were a Vector chart...as in CM93s...?
Quilting as it is,is first the removal of paperchart borders and allows charts to overlap as well.It also allows zooming through scales.So zooming in/out through a multitude of depth-kaps seems interestingand possibleright now,given the patience of making a pile of kaps -each expressing a map at a different depth for one location and possibly tricking the scale reading that OpenCPN uses so she would zoom deeper as you zoomed under the surface.Maybe "-"scale values in the header?
It can't yet be done transparently though
.which is yet another bird-brained thought,I suppose.
Somehow too,the data would need sucking out of an NMEA capable? sounder which I don't have so I don't know but that can't be so hard...matching depth,gps and time ?as a track.even if it needed parsing for depths later.

I don't know if this might duplicate Google Earth's present or future capabilities

PS I guess you can't run Paul Higgins GE2KAP on your linux machine?Because it is a fast friendly way to make a kap!
__________________
HappySeagull is offline   Reply With Quote
Old 18-01-2012, 22:53   #9
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 2,468
Re: GE and Image to BSB/KAP using Imgkap

Quote:
Originally Posted by Eric. View Post
Good point. I've actually been more interested in chart creation because I write guidebooks and have to do my own mapping and sounding. I've worked with QGIS (QGIS Features) some but found it to be overkill and rather difficult for making simple ARC layers (lat/long grids, etc.).

I have many ideas based on my experience making charts that might be best complemented in OpenCPN which could be used as both navigation and data collection and then ported over to some chart production tool.

I noticed one of the requested features on the list is for displaying 3d bathometric data. While I'm not interested in 3d, I would be interested in building a depth layer that could be overlaid into OpenCPN.

If I were to investigate doing something related to this feature as well, is there any insight into how this data could be displayed or how the data would be collected and recorded in OpenCPN?
Eric,
the plugin API lets you create overlays for the chart viewport and gives you access to all the NMEA data the app has, so you should probably be able to do it.
The docs are unfortunately more or less non-existent - you have to study the code of the existing plugins and ask if it's not clear. Not that difficult actually.
A rather small plugin to start with is at https://github.com/nohal/wmm_pi. https://github.com/nohal/gecomapi_pi is more interesting code-wise as it uses some of the viewport API, but is dealing with GE, so you can't run it to see what it does - and yes, I wrote both, so can answer any questions.
Both the plugins bundled with OpenCPN are interesting as well - Dashbboard for the NMEA stream handling and Grib for the overlay rendering.

Pavel
__________________
nohal is online now   Reply With Quote
Old 19-01-2012, 15:32   #10
Registered User

Join Date: Jan 2012
Posts: 52
Re: GE and Image to BSB/KAP Using Imgkap

All good information. After thinking about it and looking back at QGIS, I think there are several challenges that exclude KAP files.

QGIS really works best with SHP files. But there is a S57 plug-ins that work with it that I have not tried (and might not be working). Since both OpenCPN and QGIS could work with s57, perhaps that is a better format than KAP. It would allow layering too.

So a OpenCPN plugin could record and/or display depth as a s57 format. And QGIS could still be used for chart creation letting you import soundings as a s57 layer...? I'll have to take a look at the example OpenCPN plug-ins and see what's involved.

Then perhaps a separate simple chart builder tool as a GUI for imgkap that could also read s57 depth data, and gpx data. While still letting you do some lat/lon calibration and maybe some basic drawing stuff.
__________________
Eric. is offline   Reply With Quote
Old 19-01-2012, 23:40   #11
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 2,468
Re: GE and Image to BSB/KAP Using Imgkap

Eric...
S-57 and BSB are different beasts, hard to compare - each has it's pros and cons and serves it's purposes.
As far as I remember, QGIS is using GDAL for the format conversion and S-57 support there is read-only, so it will probably be nontrivial to produce a S-57 chart using the available tools and libraries.
If I had to do this including the data collection and other tricks, I would probably use Spatialite for the data and then maybe borrow a little part of OpenCPN's presentation library to render my overlay, if it was appropriate.

Pavel
__________________
nohal is online now   Reply With Quote
Old 28-02-2012, 08:29   #12
Registered User

Join Date: Jan 2012
Posts: 52
Re: GE and Image to BSB/KAP Using Imgkap

It's been a while since I've looked at this, but I'm back to looking into doing some kind of GUI for IMGKAP. I have a little time now to look into what is required.

It would be nice to be able to pull up GE images in the tool and set a lat/lon range + resolution and have it create KAP files from there without making the user calibrate it...wouldn't it?

I still have to comb through GE's license info to make sure this is an ok use.
__________________

__________________
Eric. is offline   Reply With Quote
Reply

Tags
charts, google earth, imgkap, opencpn, bsb

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Google Earth to BSB / KAP phiggins Navigation 986 21-08-2014 01:45


Our Communities

Our communities encompass many different hobbies and interests, but each one is built on friendly, intelligent membership.

» More about our Communities

Automotive Communities

Our Automotive communities encompass many different makes and models. From U.S. domestics to European Saloons.

» More about our Automotive Communities

RV & Travel Trailer Communities

Our RV & Travel Trailer sites encompasses virtually all types of Recreational Vehicles, from brand-specific to general RV communities.

» More about our RV Communities

Marine Communities

Our Marine websites focus on Cruising and Sailing Vessels, including forums and the largest cruising Wiki project on the web today.

» More about our Marine Communities


Copyright 2002-2012 Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 21:40.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2014, vBulletin Solutions, Inc.

Sailing News Delivered to your Email!

Stay up-to-date with the latest cruising news.

unsusbcribe at anytime with one click

Close [X]


ShowCase vBulletin Plugins by Drive Thru Online, Inc.