Cruisers Forum
 


Reply
  This discussion is proudly sponsored by:
Please support our sponsors and let them know you heard about their products on Cruisers Forums. Advertise Here
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 07-03-2011, 12:48   #121
Registered User
 
HappySeagull's Avatar

Join Date: Dec 2010
Location: B.C.,Canada
Boat: 29'
Posts: 2,423
Re: map2kap - OziExplorer to OpenCPN

Quote:
Originally Posted by asiviero View Post
BELOW AN EXAMPLE OF A .MAP FILE CONTENT:

__________________________________________________ ______
OziExplorer Map Data File Version 2.1
01-trscanski zaljev.tif
D:\Karte-Jadran\01-Trscanski zaljev.tif
1 TIFF scale factor
WGS 84,WGS 84, 0.0000, 0.0000,WGS 84
Reserveetc.............

ACTUALLY I HAVE ALL .TIF AND .MAP FILES FOR CROATIAN COAST, THE OFFICIAL ONES (CALLED "MALE KARTE" IN CROATIAN LANGUAGE).

I UNDESTAND THAT IT IS ONLY A MATTER TO LAUCH YOUR BATCH FILE IN ORDER TO HAVE THE CONVERSION TO BSB CHARTS? SHOULD I DOWNLOAD AN AMENDED VERSION OF MAP2KAP?

Thanks a lot

Attilio
Oh,good!that looks easy!Yes,get the newest map2kap http://opencpn.avnisoft.co.za/util/map2kap_0.1.11.rar ..the link is a few posts up.But,you will need some other stuff too...to run the batch or as single one-by-one conversions...

.. Before/after reading all this,you may prefer to install imagemagick as well.You will have to go back up this forum to figure out differences?for windows7.A lot of what I say next will help whatever,I think.



My way of using map2kap is a portable one with everything needed in the same folder that so there's no "installing" or uninstalling to do.This is Windows XP.I think my method will work for you on Win7....but ?
The time will be in the preparation...actually making kaps goes very quick.
RECIPE:http://www.cruisersforum.com/forums/...tml#post631711
that's what mine looks like.wanted:
map2kap_0.1.11.exe (I rename it to map2kap.exe for cmdline brevity)
files from libbsb-0.0.7
Also GetGnuWin32Libtifflibrary...binaries and Dependencies only-not the whole package!look for it.(I hated the install package!but it did work,sort of.)
from these,copy tiffinfo.exe,libtiff3.dll,jpeg62.dll,zlib1.dll,bsb fix.exe(handy not required) ,map2kap.exe and a cmdline shortcut into a special work folder
the cmd shortcut has its "start in" box cleared(per right-click"properties"),so it,too is portable.

This will be the hardest part of the whole thing:re-making the images(if you must) and matching the map files to them!The mapfiles MUST refer to these.
AND:the two files must be together...you tell Map2kap which tif and it looks for the mapfile to match it!see?
The tifs have to be no more than 128 colours.16 is fine for charts.You can make copies of your originals if they don't work as is.These can all be done in several good image editors as a batch.(irfanview is my fave).

You should do a few "singles" to see if it's working before batching.
for you,it might be easy to copy all the files "needed" in with your mapfiles and just try some singles to see how that works.This should work if the tifs are not "too-many colours" and the "map" files are already in there with them!Good luck!
make a "command" shortcut and put it in the workfolder.open it's properties dialogue(right click)and delete everything in the "start in" box.

the command after the prompt is
map2kap_0.1.11[space]"your chartimage.tif" [space]10000[space] meters[space]LLW <enter>
note the quotes for "names with spaces".
10000 would be the chart scale as in 1:10000 and meters can be fathoms,feet,even leagues but "leagues"doesn't show up in OpenCPN...

Map2kap will tell you if there's a problem

AS A BATCH:The batch script to use is ...the later ones are about fancier stuff like having a look at the kaps,moving them automatically into folders,etc etc.I just wrote another for an irfanview slideshow...!

@echo off
set /p scale= what is scale?[eg1:10000 is 10000]
set /p depth= what are depth units?[METERS,FATHOMS,FEET?]
set /p datum=what is sounding datum?[MSL,LLW,LLLW?]
FOR %%I IN (*.tif) DO (map2kap %%~nI.tif %scale% %depth% %datum%)
pause
END

the batch does the command line once on a lot of map files.Find the map files that have the same scale and depth units(ie:meters,fathoms etc)and copy both the tifs AND map files into the folder where they are made into kaps by the batch script.
Did I miss something?Well,let me know if I did or how it works.
PS:for you,it might be easy to copy all the files "needed" in with your mapfiles and just try some singles to see how that works.This should work!if the tifs are not too-many colours and the "map files are already in there with them!Good luck!
HappySeagull is offline   Reply With Quote
Old 09-03-2011, 03:38   #122
Registered User

Join Date: Mar 2011
Posts: 3
Re: map2kap - OziExplorer to OpenCPN

Quote:
Originally Posted by HappySeagull View Post
Oh,good!that looks easy!Yes,get the newest map2kap http://opencpn.avnisoft.co.za/util/map2kap_0.1.11.rar ..the link is a few posts up.But,you will need some other stuff too...to run the batch or as single one-by-one conversions...

.. Before/after reading all this,you may prefer to install imagemagick as well.You will have to go back up this forum to figure out differences?for windows7.A lot of what I say next will help whatever,I think.



My way of using map2kap is a portable one with everything needed in the same folder that so there's no "installing" or uninstalling to do.This is Windows XP.I think my method will work for you on Win7....but ?
The time will be in the preparation...actually making kaps goes very quick.
RECIPE:http://www.cruisersforum.com/forums/...tml#post631711
that's what mine looks like.wanted:
map2kap_0.1.11.exe (I rename it to map2kap.exe for cmdline brevity)
files from libbsb-0.0.7
Also GetGnuWin32Libtifflibrary...binaries and Dependencies only-not the whole package!look for it.(I hated the install package!but it did work,sort of.)
from these,copy tiffinfo.exe,libtiff3.dll,jpeg62.dll,zlib1.dll,bsb fix.exe(handy not required) ,map2kap.exe and a cmdline shortcut into a special work folder
the cmd shortcut has its "start in" box cleared(per right-click"properties"),so it,too is portable.

This will be the hardest part of the whole thing:re-making the images(if you must) and matching the map files to them!The mapfiles MUST refer to these.
AND:the two files must be together...you tell Map2kap which tif and it looks for the mapfile to match it!see?
The tifs have to be no more than 128 colours.16 is fine for charts.You can make copies of your originals if they don't work as is.These can all be done in several good image editors as a batch.(irfanview is my fave).

You should do a few "singles" to see if it's working before batching.
for you,it might be easy to copy all the files "needed" in with your mapfiles and just try some singles to see how that works.This should work if the tifs are not "too-many colours" and the "map" files are already in there with them!Good luck!
make a "command" shortcut and put it in the workfolder.open it's properties dialogue(right click)and delete everything in the "start in" box.

the command after the prompt is
map2kap_0.1.11[space]"your chartimage.tif" [space]10000[space] meters[space]LLW <enter>
note the quotes for "names with spaces".
10000 would be the chart scale as in 1:10000 and meters can be fathoms,feet,even leagues but "leagues"doesn't show up in OpenCPN...

Map2kap will tell you if there's a problem

AS A BATCH:The batch script to use is ...the later ones are about fancier stuff like having a look at the kaps,moving them automatically into folders,etc etc.I just wrote another for an irfanview slideshow...!

@echo off
set /p scale= what is scale?[eg1:10000 is 10000]
set /p depth= what are depth units?[METERS,FATHOMS,FEET?]
set /p datum=what is sounding datum?[MSL,LLW,LLLW?]
FOR %%I IN (*.tif) DO (map2kap %%~nI.tif %scale% %depth% %datum%)
pause
END

the batch does the command line once on a lot of map files.Find the map files that have the same scale and depth units(ie:meters,fathoms etc)and copy both the tifs AND map files into the folder where they are made into kaps by the batch script.
Did I miss something?Well,let me know if I did or how it works.
PS:for you,it might be easy to copy all the files "needed" in with your mapfiles and just try some singles to see how that works.This should work!if the tifs are not too-many colours and the "map files are already in there with them!Good luck!
Hi Happy Seagull. I made exactly as you instructed me, and you program worked without errors, but when I tried to load the charts with OpenCPN, only confuser horizontal lines appeared. I am sure the scale is right (1:100000), sounding is meter (we are in the Med) and measure is MSL. If you give me an email address I can send you the 5 maps I used for test, and perfectly readable with Ozi. In case you want to preserve your privacy, most probable, my email is asiviero1 at gmail dot com. Thanks
asiviero is offline   Reply With Quote
Old 09-03-2011, 16:35   #123
Registered User
 
HappySeagull's Avatar

Join Date: Dec 2010
Location: B.C.,Canada
Boat: 29'
Posts: 2,423
Re: map2kap - OziExplorer to OpenCPN

Thanks,Asiviero.I got your tifs and map files.I made em into 16 colour tifs and they ran through map2kap perfectly for a nice kap.looks good in OpenCPN.
I know you have probably done the same(16 colours) as you said,but my program reports 256 colours so i ran em through irfan....I've suffered this before.Some image editors don't save what you "do" to images even if you go straight to the "save" dialogue Fastone works but only by finding the way in the save dialogue..."Tiff 24 bit"-click that. .it's not a button but it should be .(sigh)

Packbits or No compression is ok,by the way.but NOT LZW.

I sent the map and revised tif back and the kap too.I hope you get em ok.
Don't forget Kapview when you get a chance.It's really handy to quickview kaps.If there's a problem in conversion,they show up here right away,before the folderol of loadin' em up in Opencpn.

PS
Interesting that your charts are 72 dpi compared to my 96 but that didn't matter.Works fine.
HappySeagull is offline   Reply With Quote
Old 22-03-2011, 15:20   #124
Registered User

Join Date: Jul 2009
Location: The Netherlands
Boat: Koopmans, 33 ft cutter
Posts: 170
Re: map2kap - OziExplorer to OpenCPN

Just in case nobody brought this up yet: the latest version of Global Mapper (12.01) converts Ozi maps (ozfx3) to "marine" maps which run very well in OpenCPN. The major snag is the 350 $$ ticket.
Zoef is offline   Reply With Quote
Old 23-03-2011, 15:47   #125
Registered User
 
HappySeagull's Avatar

Join Date: Dec 2010
Location: B.C.,Canada
Boat: 29'
Posts: 2,423
Re: map2kap - OziExplorer to OpenCPN

Quote:
Originally Posted by Zoef View Post
Just in case nobody brought this up yet: the latest version of Global Mapper (12.01) converts Ozi maps (ozfx3) to "marine" maps which run very well in OpenCPN. The major snag is the 350 $$ ticket.
Nobody brought it up....I see it's described as a "new feature"? so I wonder if they follow this forum and figure there's a demand for it or a way to increase their clientele into OZI users before Map2kap carries us all into the church of OpenCPN...
Too late.I've taken my vows and am wearing the big O on my cassock.

Now I'm guessing but maybe it only does the ozfx3 files so you'd need a newer version of Ozi as well?
HappySeagull is offline   Reply With Quote
Old 23-03-2011, 23:18   #126
Registered User

Join Date: Jul 2009
Location: The Netherlands
Boat: Koopmans, 33 ft cutter
Posts: 170
Re: map2kap - OziExplorer to OpenCPN

[QUOTE=HappySeagull Now I'm guessing but maybe it only does the ozfx3 files so you'd need a newer version of Ozi as well?[/QUOTE]

Version 3.95.4q is OK. Don't know about older versions.
Zoef is offline   Reply With Quote
Old 24-03-2011, 11:10   #127
Registered User

Join Date: Jul 2009
Location: The Netherlands
Boat: Koopmans, 33 ft cutter
Posts: 170
Re: map2kap - OziExplorer to OpenCPN

[QUOTE=HappySeagull Now I'm guessing but maybe it only does the ozfx3 files so you'd need a newer version of Ozi as well?[/QUOTE]

Tested also ozf2 to kap conversion with Global Mapper. Now I can drive in Dijon France using OpenCPN.
Zoef is offline   Reply With Quote
Old 25-03-2011, 15:28   #128
Registered User
 
HappySeagull's Avatar

Join Date: Dec 2010
Location: B.C.,Canada
Boat: 29'
Posts: 2,423
Re: map2kap - OziExplorer to OpenCPN

mmm. as to "Road Kaps",I don't need Ozi (or GM) at all.
I just download maps with MobileAtlasCreator and convert em with Map2kap,so yes,OpenCPN can go for a drive too!
HappySeagull is offline   Reply With Quote
Old 03-04-2011, 15:37   #129
Registered User
 
HappySeagull's Avatar

Join Date: Dec 2010
Location: B.C.,Canada
Boat: 29'
Posts: 2,423
Re: map2kap Recipe Maptech

My Recipe old,old,Maptechs
Linux user? go upthread and find Cagney's batch!
windows users,pathetic as we are will pay the price...read on?
This is all repeated from upthread somewhere but it's here,together now.

...So Download Ozi as a trial AND the Ozi pcx plugin to show these and calibrate them-that's super easy.mere minutes.Just import em from their folder.Ozi will write it's own mapfiles into a folder you choose/and or create.Choose wisely.You can now see your maptechs...by browsing to this folder in OZI,if you didn't "associate" map files to it.Ozi is very gentle and doesn't savage your computer.
NEXT:
download Snagit as a 30 day trial (they want your email but they don't choke your inbox)
Snagit is the only one I found that'll scroll Ozi window all ways and output them as great big tifs.Nothing else worked.It was a bit of Bloatbattle to get it to just do that for me and even then,it's a bit like baking bread as it churns along doing a capture.My machine is older though.Output the tifs to the same folder you put the mapfiles.
Best,for charts, to set output as 16 colour tifs uncompressed (or packbits compression ,after a test to kap with map2kap)If you can't find a way to do this,you'll have to batch convert em to this with....well,not xnview-it writes something even libbsb doesn't like.Irfanview ok.Or what you like,but whatever,test to kap before doing a ton of em.!!

map2kap will also convert from other formats quite well but needs a few extras...climb the thread.

Snagit will name the output as a numbered series.While one is in the oven,you can be renaming the cooling ones.because...the Ozimapfile itself -or better,copies! -needs editing to agree with the tif -a simple text editor does this.Don't bother with a path to directory,just the tif name is fine,as long as the mapfile and the image are together in any directory.Otherwise,Ozi will load from the old pcx's...and that's no good.
Further,(best you know now!)the mapfile and the tif need have the SAME name for map2kap and really,your sanity too.
The work is done!very nearly...
After all that,and a few tests, sort the mapfiles as to scale, and depths(fathoms,meters,feet?)
and try the batch script above....

see "Kapview" for a nice way to SEE yer new kaps on a double click.Anything wrong here, is not going to work in OpenCPN.Libbsb's "bsbfix" may do the trick but not always.
Next,and soo obvious,test your charts in OpenCPN!a waypoint on one should agree with another tested chart.Using CM93 to test is not to be trusted unless you are "aware"...of their pitfalls
HappySeagull is offline   Reply With Quote
Old 26-05-2011, 15:06   #130
Registered User

Join Date: May 2011
Posts: 847
Re: map2kap - OziExplorer to OpenCPN

Thanks to everyone over in the charts forumn for pointing me to this. I am now converting .maps to .kaps and have my Ozi charts readable in OpenCPN. A big problem for me is that a major part of my workflow on Ozi has been to create map features, and sometimes comments, these are included in the .map files but not processed by map2kap.

I'm guessing that it is all possible but don't know exactly what is involved. The comments are probably better left out it as they can obscure information unless they can be toggled on and off. The map features in Ozi are a set of symbols made from 18px x 18px icons. Ozi overlays these on the map using information that is stored in the .map file. lat, lon, and filename of the icon.

Is there any chance that map2kap could process these features and include them in the kap file?

There are a lot of features on some maps and I don't really want to have to handle them as waypoints even in a layer in OpenCPN.

Any comments or ideas?
Littlechay is offline   Reply With Quote
Old 27-05-2011, 10:07   #131
Registered User
 
HappySeagull's Avatar

Join Date: Dec 2010
Location: B.C.,Canada
Boat: 29'
Posts: 2,423
Re: map2kap - OziExplorer to OpenCPN

...I think you'll have to suffer through that one.
I always considered Ozi's "map" files and "evts" and "plts'" and "wpt" files to be layers because they don't imbed into the original graphic or kap chart.

You'll just have to hunt those comments,features down Comments should be easy...aren't they in the map files?(can't remember) so with notepad or whatever linux has copy/paste them into a gpx per the thread offered in Charts...

Click image for larger version

Name:	Clipboard01.png
Views:	273
Size:	7.9 KB
ID:	27857

despite appearances,that little slot can hold a lot of info,including several lines...though I wish it were a little bigger in windows

"GPSU" and gpsbabel can be quite a help if there's linuxy ones

Or,there's the screengrab route,I suppose.

If it seems a lot of work,consider that at least you're now working in a non-proprietary format and it's easier to pass these along to non-ozi users,or other apps you may want to use.
HappySeagull is offline   Reply With Quote
Old 29-05-2011, 03:36   #132
Registered User

Join Date: Dec 2005
Location: Helsingborg
Boat: Dufour 35
Posts: 3,891
Re: map2kap - OziExplorer to OpenCPN

I have never used Ozi at all. The script was based on available documentation of the map format, and worked for my own limited needs. I have never seen any documentation on the Ozi format for layers. It's probably fairly easy to find out as long as you have a version of Ozi installed. There is nothing stopping the script to be extended to include wpts, notes etc etc, by creating a OpenCPN layer through a gpx file. Exactly how to "translate" Ozi features to available OpenCPN features is another thing.....

On another note....
Map2kap probably should be ported to use imgkap instead of tiff2bsb. I came across some tiffs where I had to do exactly that, as libbsb couldn't handle them.

Thomas
cagney is offline   Reply With Quote
Old 29-05-2011, 09:40   #133
Registered User

Join Date: May 2011
Posts: 847
Re: map2kap - OziExplorer to OpenCPN

I have played around with some stuff and moved some map features over to a gpx file to use as a layer. I used a spread sheet to edit the data from an Ozi map file, did a search and replace on the icon names to get them to match the ones I had in OpenCPN then used babel to convert the csv to gpx. Worked fine.

Comments i have not dealt with yet.

The formats of the map features (MF) and comments (MC)can be found at these two links
MapFile - androzic - OziExplorer map file format. - Unofficial oziexplorer client for Android - Google Project Hosting
Map File Format

It would be easy enough make a script to output the features and comments into separate gpx files I suppose? The problem with the features is matching the icon file names.
Littlechay is offline   Reply With Quote
Old 31-05-2011, 00:41   #134
MdJ
Registered User

Join Date: Jul 2010
Location: France
Boat: Etap 22i
Posts: 65
Re: map2kap - OziExplorer to OpenCPN

Quote:
Originally Posted by cagney View Post
On another note....
Map2kap probably should be ported to use imgkap instead of tiff2bsb. I came across some tiffs where I had to do exactly that, as libbsb couldn't handle them.

Thomas
Hello Thomas,

If you want to compile directly with internal functions, I can help you.

Make an email, private message or thread imgkap ...

M'dJ
MdJ is offline   Reply With Quote
Old 26-08-2011, 00:08   #135
Registered User

Join Date: Jul 2011
Location: Southern Germany
Boat: Crisline 530
Posts: 33
map2kap 0.2.00 - now based on imgkap

Hi all,

some of you have asked for a version of map2kap that uses imgkap instead of the aging tiff2bsb. After consulting with the original author of map2kap, I have done a rewrite that takes full advantage of the superior capabilities of imgkap in the following areas:
  • Much faster processing
  • All image processing is done internally in imgkap. This removes all previous dependencies (now the only thing you need to have installed is imgkap).
While I was at it, I also implemented the following improvements:
  • More flexible file name handling (can now specify picture file name, map file name or base name without extension as first parameter)
  • Automatically calculating scale for map if given a Google zoom level at the end of the file name (something like xyz-15.jpg)
  • Now correctly handling map files with non-standard number of calibration points (for example from NoniMapView; great tool BTW)
  • Creating Dusk and Night colormaps in the resulting KAP file
  • Improved consistency checking and error handling
  • Internal restructuring and clean-up of the script code
Having said that, the new script code hasn't had much testing so far, so you may run into problems that I didn't see in the few test cases I ran it through. Let me therefore suggest that you keep a copy of the previous script version somewhere, renamed to map2kap.rb.bak (or something like that), so you can easily switch back in case of problems.

Of course, feel free to run the new script through as many test cases as you can. If you find any problems, please report them here, so I can fix them.

For technical reasons I had to name the uploaded file map2kap.rb.doc. So, when you install, be sure to remove the .doc extension from the file name.

Best wishes

Horst
Attached Files
File Type: doc map2kap.rb.doc (19.1 KB, 139 views)
hyman is offline   Reply With Quote
Reply


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
Portable OpenCPN zemaria OpenCPN 12 05-07-2010 04:34
I Have a Few Questions Regarding OpenCPN Skua OpenCPN 1 03-06-2010 22:24
OpenCPN bdbcat OpenCPN 1343 19-09-2009 15:59
OziExplorer phiggins Navigation 2 27-06-2009 13:43

Advertise Here


All times are GMT -7. The time now is 01:38.


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

ShowCase vBulletin Plugins by Drive Thru Online, Inc.