Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 14-09-2010, 14:21   #31
Registered User

Join Date: Dec 2005
Location: WNA
Boat: Dufour 35
Posts: 3,249
Quote:
Originally Posted by GPS-Marco View Post
Hello.

I realized a world KAP map from the WMM 2010.0 declination Image (World Magnetic Model - Maps of Magnetic Elements)

I uploaded the map on mediafire.

WMM2010.7z

You can download the chart and try it. If you want, this chart can be freely distributed as you like.

Ciao, Marco.
Marco

Thank you!
I changed the link on the opencpn.org/download to your file.
The one I found earlier, and converted, was to old, epoch 2000.

Thomas
__________________

__________________
cagney is offline   Reply With Quote
Old 15-09-2010, 06:06   #32
Registered User
 
Netsurfer's Avatar

Join Date: Jan 2010
Location: Cologne, Germany
Boat: Beneteau Oceanis 331
Posts: 557
Quote:
Originally Posted by GPS-Marco View Post
I realized a world KAP map from the WMM 2010.0 declination Image (World Magnetic Model - Maps of Magnetic Elements)
Maybe it would be possible to integrate Shapefile Support to OCPN (see: http://shapelib.maptools.org/)?

Then it wouldn't be necessary to always convert such maps as the shapefiles are available for download (see: ftp://ftp.ngdc.noaa.gov/geomag/wmm/wmm2010/shapefiles/)

Gunther
__________________

__________________
Deutschsprachige Community- und Support-Website unter OpenCPN.de
Netsurfer is offline   Reply With Quote
Old 16-09-2010, 07:17   #33
Senior Cruiser
 
idpnd's Avatar

Cruisers Forum Supporter

Join Date: Sep 2007
Location: Almería, ES
Boat: Chiquita 46 - Libertalia
Posts: 1,551
..am once again wondering to self if any of the more popular georeferencing formats could be supported to supplement the arduous kap process..
__________________
sv Libertalia
idpnd is offline   Reply With Quote
Old 16-09-2010, 09:46   #34
Registered User

Join Date: Dec 2005
Location: WNA
Boat: Dufour 35
Posts: 3,249
Quote:
Originally Posted by Netsurfer View Post
Maybe it would be possible to integrate Shapefile Support to OCPN (see: http://shapelib.maptools.org/)?

Then it wouldn't be necessary to always convert such maps as the shapefiles are available for download (see: ftp://ftp.ngdc.noaa.gov/geomag/wmm/wmm2010/shapefiles/)

Gunther
I had a look at an old discussion between Rhoel_Asia and Manimaul.
It doesn't seem possible to use a shapefile to create a S57 vector chart. The Internet is full of suggestions about how to perform the reverse procedure though. If this actually is the case, there is no point in integrating shape file support.
I hope I'm wrong on this
Thomas
__________________
cagney is offline   Reply With Quote
Old 16-09-2010, 12:44   #35
Obsfucator, Second Class
 
dacust's Avatar

Cruisers Forum Supporter

Join Date: Feb 2008
Location: Southeast USA.
Boat: 1982 Sea Ray SRV360
Posts: 1,743
Quote:
Originally Posted by cagney View Post
I had a look at an old discussion between Rhoel_Asia and Manimaul.
It doesn't seem possible to use a shapefile to create a S57 vector chart. The Internet is full of suggestions about how to perform the reverse procedure though. If this actually is the case, there is no point in integrating shape file support.
I hope I'm wrong on this
Thomas
I am either totally missing the point, or I don't understand your post.

If you can't create an S57 from a shapefile, and there are lots of shapefiles out there we'd like to use, wouldn't we want to provide shapefile support?

If you can create shapefiles from S57's, then if you were going to have to choose only one format to support, wouldn't you pick shapefiles? (I am so totally not suggesting that, BTW).

Confusedly yours,

-dan
dacust is offline   Reply With Quote
Old 17-09-2010, 05:39   #36
Registered User

Join Date: Jan 2010
Location: Montevideo, Uruguay
Posts: 238
Quote:
Originally Posted by dacust View Post
If you can't create an S57 from a shapefile, and there are lots of shapefiles out there we'd like to use, wouldn't we want to provide shapefile support?
I've done work with shapefiles. In my experience (mapserver, etc), they are very hungry of resources for fully dynamic applications. In other words, map re-drawing would be slow and use a lot of CPU (and battery's amps).

A better approach, perhaps, would be to make images with the shapefiles and then geo-reference them. The quilting feature of opencpn would work well with tiles.

So perhaps the long term solution to some of our problems is to develop a good image geo-referencing tool for opencpn. I know that there are some tools out there for windows, but noy very well integrated and none yet on Linux, the only OS I use.
__________________
dpons is offline   Reply With Quote
Old 17-09-2010, 10:53   #37
Registered User

Join Date: Dec 2005
Location: WNA
Boat: Dufour 35
Posts: 3,249
Quote:
Originally Posted by dacust View Post
I am either totally missing the point, or I don't understand your post.

If you can't create an S57 from a shapefile, and there are lots of shapefiles out there we'd like to use, wouldn't we want to provide shapefile support?

If you can create shapefiles from S57's, then if you were going to have to choose only one format to support, wouldn't you pick shapefiles? (I am so totally not suggesting that, BTW).

Confusedly yours,

-dan
Dan

I don't think that there are many shapefiles, that are useful to navigators, and because of this there is no point in developing OpenCPN support.
Quote:
If ...... there are lots of shapefiles out there we'd like to use
Where are they? Anyone know of any other useful charts (information or navigation) ? Depons ?

The magnetic variation chart is one exception.
It seems obvious to me that shapefiles are a subset of S57 charts, and contains much less information.
If a shapefile could be converted to a S57, then this would be an easy way to display the magnetic variation chart, and similar charts, but this does not seem possible.

Depons
Quote:
So perhaps the long term solution to some of our problems is to develop a good image geo-referencing tool for opencpn.
Yes that would be great.
Meanwhile I'm quite happy to convert any chart picture to an kap file.
I doesn't take that many minutes, generally, but then I've done quite a few the last year, and have never used any special tools for this. Gimp, Kate, a calculator the command line and a the odd utility script is all I use.

Thomas
__________________
cagney is offline   Reply With Quote
Old 18-09-2010, 02:13   #38
Registered User
 
Netsurfer's Avatar

Join Date: Jan 2010
Location: Cologne, Germany
Boat: Beneteau Oceanis 331
Posts: 557
Quote:
Originally Posted by cagney View Post
Depons
Quote:
So perhaps the long term solution to some of our problems is to develop a good image geo-referencing tool for opencpn.
Yes that would be great.
Sounds at bit like "reiventing the wheel" to me.

There are so many different georeferenced formats out there. Some of them could be called somehow "standard". And there are already (freely available) tools[1] to convert files from one format to another.

The main problem is that OCPN actually supports none of them.

So it seems to be more logical/ practical for me to add support for one of these formats (and then use the already existing tools) than developing a new tool for one of OCPN supported formats.

Gunther

[1] e.g. GDAL: GDAL - Geospatial Data Abstraction Library
__________________
Deutschsprachige Community- und Support-Website unter OpenCPN.de
Netsurfer is offline   Reply With Quote
Old 18-09-2010, 06:22   #39
Registered User

Join Date: Jan 2010
Location: Montevideo, Uruguay
Posts: 238
Quote:
Originally Posted by Netsurfer View Post
Sounds at bit like "reiventing the wheel" to me.

There are so many different georeferenced formats out there. Some of them could be called somehow "standard". And there are already (freely available) tools[1] to convert files from one format to another.

The main problem is that OCPN actually supports none of them.

So it seems to be more logical/ practical for me to add support for one of these formats (and then use the already existing tools) than developing a new tool for one of OCPN supported formats.

Gunther
I don't think I got my concept through. I'm not suggesting developing an importing tool for all types of georeferenced formats, just a tool (not necessarily part of the ocpn binary) to convert from the main ones that we don't support. For example, I have a gazillion oziexplorer (.map + .tif) charts of places where I can't get BSB or ENC charts. I'd love to be able to convert them easily and use them.

Other example is geotiff, there are tons of JPL and alike sat pics , georeferenced, that could be used. It seems to me that is easier to build a static converter than to do dynamic support for some of them. I know that making dynamic support for shapefiles would be a significant task. Mapserver and similar have a more than decade of devoted development and is not that much dynamic.

Thomas: there are tons of shapefiles for inland use, rivers, roads, topography, towns, borders, point of interest, etc. If we had an easy way to import and georeferencing tif or png, there are already tools like shp2img that create images from shapefiles (if you know how to configure it, not trivial).

For starters, and from the fragments that I read (or the few that I fully understood) here about conversion, I think that would be possible to develop a auto converter from georeferenced ozi formats to bsb.

Diego
__________________
dpons is offline   Reply With Quote
Old 26-09-2010, 11:32   #40
Registered User

Join Date: Dec 2005
Location: WNA
Boat: Dufour 35
Posts: 3,249
Quote:
Originally Posted by dpons View Post

For starters, and from the fragments that I read (or the few that I fully understood) here about conversion, I think that would be possible to develop a auto converter from georeferenced ozi formats to bsb.

Diego
You are right. For fun, I converted Argentinian Chart H-5089 from Ozi/jpg to a .kap file only based on the info in the .map file, just to see that I understood the -map format. Reasonably successful, biggest problem was a crap georeferencing to start with and wrong size of the picture(a few pixels), and a skewed picture.
I might just write a ozi kap converter one day, but as with all data manipulation, garbage in garbage out.

Thomas
__________________
cagney is offline   Reply With Quote
Old 27-09-2010, 04:24   #41
Registered User

Join Date: Jan 2010
Location: Montevideo, Uruguay
Posts: 238
Quote:
Originally Posted by cagney View Post
You are right. For fun, I converted Argentinian Chart H-5089 from Ozi/jpg to a .kap file only based on the info in the .map file, just to see that I understood the -map format. Reasonably successful, biggest problem was a crap georeferencing to start with and wrong size of the picture(a few pixels), and a skewed picture.
I might just write a ozi kap converter one day, but as with all data manipulation, garbage in garbage out.

Thomas
I started working on a .map to template converter. That would only cover part of the task, but it saves a lot of calculator work. The output is the template used as input for tif2bsb.

Two problems I encountered: missing IWF stanza (not too hard to recreate from the tiff dimensions) in a few cases, and images not apt for tif2bsb. The hardest part of the whole process is to convert the tiff images so they are indexed and < 128 colors, which takes a half a dozen operations with gimp plus a little time on the big images.

Yet, I could rework all the local charts I have and they now work nicely with opencpn. I'll clean up a bit the code, add a config file option (for pic layers, datum, etc), and post it later this week.

Diego
__________________
dpons is offline   Reply With Quote
Old 27-09-2010, 10:11   #42
Registered User

Join Date: Dec 2005
Location: WNA
Boat: Dufour 35
Posts: 3,249
To prepare any picture for tif2bsb.
I'll use example.jpg as an example but any picture format that ImageMagic can handle is alright. This is the method I used (with a few more arguments to the first "convert") when converting the Pilot Charts pdf:s.

First Step;
Code:
convert example.jpg -font courier -fill red  -gravity SouthEast -pointsize 10 -annotate +3+18 'OpenCPN' example.gif
This makes sure that the pictures color scheme is correct, may not be necessary for all pictures. Works even for a black and white chart picture, as colors is added to the picture.

Second step:
Code:
convert example.gif -colors 127 example.tif
Example tiff will now work with tif2bsb. I have not yet came across a case were this doesn't work!!! The intermediate gif picture is essential, in many cases, to get a tif which has colors that tif2bsb accepts. Even tifs that tif2bsb rejects can be corrected this way.

The produced tiff may not be of optimal size.
So as you see, there is no need for Gimp.
ImageMagic ports are available for a number of programming languages.

Thomas
__________________
cagney is offline   Reply With Quote
Old 27-09-2010, 13:11   #43
Obsfucator, Second Class
 
dacust's Avatar

Cruisers Forum Supporter

Join Date: Feb 2008
Location: Southeast USA.
Boat: 1982 Sea Ray SRV360
Posts: 1,743
The intermediate .gif is not needed for all .tifs (or all image types, for that matter).

If the .tif is a palette .tif, but has too many colors, then:
Code:
convert example.tif -colors 127 example_2.tif
should work.

If the .tif is an RGB .tif, then the intermediate .gif is needed.

This is because a .tif can be either an RGB type or a palette type. tif2bsb requires a palette type .tif. The guys on the ImageMagick forum could not tell me a way to get convert to specify which type of .tif to create.
  • If you are converting from an RGB type image (.jpg, .bmp, etc.), convert automatically creates an RGB type .tif.
  • If you are converting from a palette typ image (.gif, etc.), convert automatically creates a palette type .tif.

So, until someone finds another way, the only way I know to use "convert" to convert an RGB type image to a palette type .tif requires an intermediate palette-only image type, and I chose .gif on the ImageMagick guys recommendation.

-dan
dacust is offline   Reply With Quote
Old 27-09-2010, 15:22   #44
Registered User

Join Date: Dec 2005
Location: WNA
Boat: Dufour 35
Posts: 3,249
Quote:
Originally Posted by dacust View Post


So, until someone finds another way, the only way I know to use "convert" to convert an RGB type image to a palette type .tif requires an intermediate palette-only image type, and I chose .gif on the ImageMagick guys recommendation.

-dan
It appears that "tiffmedian" directly converts a RGB-tiff to palette-tif
Quote:
SYNOPSIS



tiffmedian [ options ] input.tif output.tif
DESCRIPTION


tiffmedian applies the median cut algorithm to an RGB image in input.tif to generate a palette image that is written to output.tif. The generated colormap has, by default, 256 entries. The image data is quantized by mapping each pixel to the closest color values in the colormap.
tiffmedian is a part of LibTiff. More here :TIFFMEDIAN

Thomas
__________________
cagney is offline   Reply With Quote
Old 27-09-2010, 16:16   #45
Obsfucator, Second Class
 
dacust's Avatar

Cruisers Forum Supporter

Join Date: Feb 2008
Location: Southeast USA.
Boat: 1982 Sea Ray SRV360
Posts: 1,743
Quote:
Originally Posted by cagney View Post
It appears that "tiffmedian" directly converts a RGB-tiff to palette-tif


tiffmedian is a part of LibTiff. More here :TIFFMEDIAN

Thomas
Still the same number of steps.

But, maybe someone could experiment. Could be that tiffmedian will do a better job with the colors.

jpg(RGB)-convert-gif(palette)-convert-tif(palette)
vs
jpg(RGB)-convert-tif(RGB)-tifmedian-tif(palette)

-dan
__________________

dacust is offline   Reply With Quote
Reply

Tags
charts

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
OpenCPN.org - Feature Requests Netsurfer OpenCPN 8 14-05-2017 01:15
Pilot Charts Now Available as Digital Charts cagney OpenCPN 21 11-09-2010 14:29
OpenCPN.org DNS Problem? zemaria OpenCPN 17 29-03-2010 07:36
OpenCPN.org Announcement manimaul OpenCPN 31 10-03-2010 15:25



Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 19:49.


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

ShowCase vBulletin Plugins by Drive Thru Online, Inc.