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 25-11-2015, 05:07   #196
Registered User

Join Date: Jan 2015
Location: La Plata - Argentina
Posts: 20
Question Re: map2kap - OziExplorer to OpenCPN

Quote:
Originally Posted by hyman View Post
Hi Diego,

my first guess would be that you might not have the Ruby programming language installed at all. Be sure you download and install version 2.0.0 (either 32bit or 64bit, whichever fits your operating system).

Then during installation be sure to tick the two options:
  • Add Ruby executables to your PATH
  • Associate .rb and.rbw files with this Ruby installation
If that doesn't help, then I am out of clues...

Regards

Horst
Hi Horst

It worked!
I installed Ruby on C:\Root and it worked.
With Ruby in the C:\Root load paths in the user environment and does not walk.
map2kap warns that it does not support Ruby 2.0.0, but creates the map. I will try with 1.9.3
Thank you for your help.
Best Regards
Diego
dmurias is offline   Reply With Quote
Old 25-11-2015, 05:10   #197
Registered User

Join Date: Jan 2015
Location: La Plata - Argentina
Posts: 20
Re: map2kap - OziExplorer to OpenCPN

Quote:
Originally Posted by dmurias View Post
Hi Horst

It worked!
I installed Ruby on C:\Root and it worked.
With Ruby in the C:\Root load paths in the user environment and does not walk.
map2kap warns that it does not support Ruby 2.0.0, but creates the map. I will try with 1.9.3
Thank you for your help.
Best Regards
Diego
Pardon!
With Ruby in the C:\Root load paths in the user environment and walk!!.
dmurias is offline   Reply With Quote
Old 25-11-2015, 20:18   #198
Registered User

Join Date: Jan 2015
Location: La Plata - Argentina
Posts: 20
Re: map2kap - OziExplorer to OpenCPN

Hi
In 31 conversions with map2kap program I had 10 times the same error (see the screen copy attached)
The errors seem to have something with the Ruby interpreter, but beyond me completely.
Any idea?

Diego
Attached Thumbnails
Click image for larger version

Name:	map2kap error.jpg
Views:	165
Size:	96.4 KB
ID:	113838  
dmurias is offline   Reply With Quote
Old 26-11-2015, 23:25   #199
Registered User

Join Date: Jul 2011
Location: Southern Germany
Boat: Crisline 530
Posts: 33
Re: map2kap - OziExplorer to OpenCPN

Hi Diego,

you wrote:
Quote:
Originally Posted by dmurias View Post
map2kap warns that it does not support Ruby 2.0.0, but creates the map. I will try with 1.9.3
I haven't updated the warning, but it should work fine with 2.0.0. Just keep that. I would not downgrade to 1.9.3 unlesse there is a problem.

Regards

Horst
hyman is offline   Reply With Quote
Old 27-11-2015, 00:15   #200
Registered User

Join Date: Jul 2011
Location: Southern Germany
Boat: Crisline 530
Posts: 33
Re: map2kap - OziExplorer to OpenCPN

Hi Diego,

as for the overflow problem in line 597, I am also out of clues for now. I need the exact command line you have been using when the problem occurred, and the files used. Then I can debug the problem and potentially find a solution for it.

You can of course first try Ruby 1.9.3 to see whether the problem still occurs, but I would be surprised if not...

Regards

Horst
hyman is offline   Reply With Quote
Old 27-11-2015, 04:18   #201
Registered User

Join Date: Jan 2015
Location: La Plata - Argentina
Posts: 20
Re: map2kap - OziExplorer to OpenCPN

Quote:
Originally Posted by hyman View Post
Hi Diego,

as for the overflow problem in line 597, I am also out of clues for now. I need the exact command line you have been using when the problem occurred, and the files used. Then I can debug the problem and potentially find a solution for it.

You can of course first try Ruby 1.9.3 to see whether the problem still occurs, but I would be surprised if not...

Regards

Horst
Worst:
Don't be surprised...
You're right, with 1.9.3 problem persists.
I send commands used below

Best regards
Diego

map2kap.rb ROU01.jpg 20000 METERS MLLW
map2kap.rb ROU02.jpg 20000 METERS MLLW
map2kap.rb ROU03.jpg 400000 METERS MLLW
dmurias is offline   Reply With Quote
Old 27-11-2015, 04:30   #202
Registered User

Join Date: Jan 2015
Location: La Plata - Argentina
Posts: 20
Re: map2kap - OziExplorer to OpenCPN

Quote:
Originally Posted by dmurias View Post
Worst:
Don't be surprised...
You're right, with 1.9.3 problem persists.
I send commands used below

Best regards
Diego

map2kap.rb ROU01.jpg 20000 METERS MLLW
map2kap.rb ROU02.jpg 20000 METERS MLLW
map2kap.rb ROU03.jpg 400000 METERS MLLW
Horst:
Info for debugging:
Before giving the error ima2kap is at full cpu for a long time
dmurias is offline   Reply With Quote
Old 27-11-2015, 14:45   #203
Registered User

Join Date: Jul 2011
Location: Southern Germany
Boat: Crisline 530
Posts: 33
Re: map2kap - OziExplorer to OpenCPN

Hi Diego,

for debugging I also need at least one failing pair of your .map and .jpg files. You can send the files to the email address I gave you this morning (see your private messages).

Regards

Horst
hyman is offline   Reply With Quote
Old 27-11-2015, 15:02   #204
Registered User

Join Date: Jan 2015
Location: La Plata - Argentina
Posts: 20
Re: map2kap - OziExplorer to OpenCPN

Quote:
Originally Posted by hyman View Post
Hi Diego,

for debugging I also need at least one failing pair of your .map and .jpg files. You can send the files to the email address I gave you this morning (see your private messages).

Regards

Horst
Horst:

Send them this morning.
Just in case I forward them again
Best regards

Diego
dmurias is offline   Reply With Quote
Old 27-11-2015, 23:53   #205
Registered User

Join Date: Jul 2011
Location: Southern Germany
Boat: Crisline 530
Posts: 33
Re: map2kap - OziExplorer to OpenCPN

Hi Diego,

I got your files ... will look into the issue the next few days ...

Regrads

Horst
hyman is offline   Reply With Quote
Old 28-11-2015, 16:18   #206
Registered User

Join Date: Jul 2011
Location: Southern Germany
Boat: Crisline 530
Posts: 33
Re: map2kap - OziExplorer to OpenCPN

Hi Diego,

debugging turned up two problems on my side:
  1. map2kap doesn't like the Mac-style line-endings used in your .map files
  2. It also doesn't like the fact that your .map files don't contain an IWH (Map Image Width/Height) line
Since you didn't see the first problem, we can for now concentrate on the second. You will need to add a line like the following to each of your non-working .map files:
IWH,Map Image Width/Height,5666,4709
The two numbers are the pixel dimensions (width, heigth) of the corresponding .jpg file. You can obtain the correct numbers by opening the .jpg file in just about any graphics program. Most of these will have a way to tell you about the pixel dimensions. Be sure to get the order of the two numbers right.

With this addition, the files should convert just fine.

I will need to improve the error handling in the script to issue a proper error message (instead of hanging until the overflow occurs), when this problem is encountered.

Regards

Horst
hyman is offline   Reply With Quote
Old 29-11-2015, 03:29   #207
Registered User

Join Date: Jul 2011
Location: Southern Germany
Boat: Crisline 530
Posts: 33
Re: map2kap - OziExplorer to OpenCPN

Hi everybody,

I have now fixed all currently known issues. Currently I am testing the new Ver 0.4.00 release candidate with the following improvements:
  • Better guessing of chart scale
    • now also looks at chart title given in .map file (thanks to Diego for providing files that inspired me)
    • zoom levels in file names now must be preceded by -, as to less easily confuse them with simple file numbers
  • Now also accepting .map files wit Mac-style line endings
  • Better error checking on .map files (missing entries no longer lead to the unspecific hang/crash described by Diego)
  • Since Ruby 2.0.0 will soon go out of support, the preferred Ruby version is now 2.1.5 or any higher 2.1.x revision
Anything else that someone is desperately waiting for?

Regards

Horst
hyman is offline   Reply With Quote
Old 29-11-2015, 05:02   #208
Registered User

Join Date: Jan 2015
Location: La Plata - Argentina
Posts: 20
Re: map2kap - OziExplorer to OpenCPN

Quote:
Originally Posted by hyman View Post
Hi Diego,

debugging turned up two problems on my side:
  1. map2kap doesn't like the Mac-style line-endings used in your .map files
  2. It also doesn't like the fact that your .map files don't contain an IWH (Map Image Width/Height) line
Since you didn't see the first problem, we can for now concentrate on the second. You will need to add a line like the following to each of your non-working .map files:
IWH,Map Image Width/Height,5666,4709
The two numbers are the pixel dimensions (width, heigth) of the corresponding .jpg file. You can obtain the correct numbers by opening the .jpg file in just about any graphics program. Most of these will have a way to tell you about the pixel dimensions. Be sure to get the order of the two numbers right.

With this addition, the files should convert just fine.

I will need to improve the error handling in the script to issue a proper error message (instead of hanging until the overflow occurs), when this problem is encountered.

Regards

Horst
Hi Horst.
All ok.
Adding the missing IWH line all the .kap files were created
Thank you for your help.
Diego
dmurias is offline   Reply With Quote
Old 30-11-2015, 00:24   #209
Registered User

Join Date: Jul 2011
Location: Southern Germany
Boat: Crisline 530
Posts: 33
Re: map2kap - OziExplorer to OpenCPN

Hi all,

this is to announce version 0.4.00 of map2kap , the easiest converter from Ozi Explorer .map files to the common BSB/KAP chart format. This version contains the following improvements over 0.3.00:
  • A bugfix for the "ALT_SEPARATOR" problem on Linux
  • Better parsing of .map files:
  • Better guessing of chart scale if not given on command line:
    • Now also looks at chart title given in .map file
    • Chart scales or zoom levels in file names now must be preceded by -, as to less easily confuse them with simple file numbers
  • Since Ruby 2.0.0 will soon go out of support, the preferred Ruby version is now 2.1.7 (should work on 2.1.5 or any higher 2.1.x revision)
  • Some cleanup and documentation updates here and there

For those of you who haven't used map2kap before, here are the installation instructions for
  • Windows XP (no longer recommended for security concerns)
  • Windows 7 (preferred, my testing platform)
  • Windows 8 and 10 (untested)
  1. Download the version 2.1.7 of the Ruby programming language (32 or 64bit, whichever fits your system best). Newer ruby versions haven't been tested and aren't currently recommended, but may still work.
  2. Install Ruby under "Program Files" rather than in the default location the installer offers (the root directory of your system drive).
    Make sure you tick the following options during the Ruby install:
    - Add Ruby executables to your PATH
    - Associate .rb and.rbw files with this Ruby installation
  3. Create a new folder "Chart Tools" in "C:\Program Files\"
  4. Download imgkap.exe and place it into "C:\Program Files\Chart Tools".
  5. Download map2kap.zip and unzip. Place both contained files map2kap.rb (the actual conversion tool) and map2kap.bat (the drag&drop companion) into "C:\Program Files\Chart Tools", too.
  6. "Copy" the batch file map2kap.bat and "Paste shortcut" on the Desktop (or any other place that you like for drag&drop).
  7. Edit the "Path" environment variable as described in this tutorial, appending ;C:\Program Files\Chart Tools (with the semicolon at the beginning!) to the "Variable value".
  8. Double-click map2kap on the desktop. A new window should appear, showing brief version and usage information for map2kap.
Users of older versions of map2kap on Windows follow this update procedure:
  1. Uninstall the existing Ruby version if it is below 2.1.7
  2. If you uninstalled Ruby in step 1, download and install as described in step 1 and 2 above
  3. Follow steps 5, 6, and 8 of the instructions above to update map2kap itself
Users of Linux or Mac OS will need to compile imgkap themselves (out of scope for this description). For them, map2kap.bat is not used. For Linux there is a way to enable drag&drop.


How to use


In order to create a BSB/KAP file from an Ozi MAP, you always need a pair of source files:
  • A picture file (for example .jpg, .png oder .tif)
  • A Calibration file ending in .map
Both of these should be stored in the same folder. Conversion can be started either of two ways:
  • Open a command prompt. cd into the folder containing the source files. Start map2kap.rb with the required command line parameters. (Without any parameters map2kap.rb shows brief usage information.)
  • If no other parameters are needed besides the file name(s), you can also drag&drop files onto the map2kap Desktop symbol.
Either way, map2kap informs about progress and potential problems during conversion. If you get errors about image files not found, try using the image files instead of the .map files. map2kap will find the .map files automatically if they are named and located as they should.

The chart scale is determined in different ways (sorted by precedence):
  1. command line option
  2. from a numeric ending of the chart title in the .map file, preceded by :
    (Example: ROU 02 Bahia de Maldonado e Isla de Lobos 1:20000)
  3. from a numeric ending of the file name, preceded by a -
    (Example: BeaverLake-15.map)
    • endings between -500 and -10000000 are directly used as scales 1:500 .. 1:10000000
    • endings between -6 and -20 are treated as zoom levels, and converted to an apropriate scale
  4. If none of the above is present, interactive entry
If multiple contradicting chart scales are found on the command line and/or in files, map2kap issues a warning, but continues processing.

Converted BSB/KAP files are placed into the same folder that contains their respective source files.

Have fun, and post any feedback you might have, in this thread.

Horst
hyman is offline   Reply With Quote
Old 22-12-2015, 10:41   #210
Registered User

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

I've come back to Map2kap after some time. I used it successfully in the past but not this time.

I have everything set up as in your post above with fresh installs of everything.

I gave up trying to get anything to work in the 4.1108 beta so all comments refer to a fresh install of OCPN 4.0

Background: I'm have a few landsat images of the Chiloe area of Chile that I have processed and calibrated in Ozi. I want to make Kap files of these for use in OCPN.

I drag the map file into the map2kap desktop icon and the console appears. I enter the scale (1000000) when prompted, get a warning that the map is transverse mercator (which it is) and everything completes.

I move the resulting kap file to a charts director in OCPN

OCPN catalogues the chart file OK and shows the chart outline in the correct place.

If OpenGL is on and I click click on the chart in the selection bar the thumbnail of the chart shows up but no chart loads (or it is invisible).

If OpenGL is off OCPN crashes when I click on the chart.

The last lines of the OCPN log are like this
Code:
17:44:56: Initializing Chart C:\Charts\Chile\Landsat kaps\Guafo landsat colour nasa method.kap
17:44:56:    Warning: Skew override on chart C:\Charts\Chile\Landsat kaps\Guafo landsat colour nasa method.kap is 135.108 degrees
Attached, the map file, and the screenshot from the crashdump (remove extensions as appropriate).

kap file is circa 11MB and the original tif image circa 114MB. I have tried attaching the kap with a .avi extension but not sure that will work.

Any ideas?

Chris
--
Tweed's World | A high latitude sailor preparing for tropical cruising
Littlechay 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 10:50.


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.