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 Rating: Thread Rating: 5 votes, 5.00 average. Display Modes
Old 11-02-2012, 02:50   #1
Registered User

Join Date: Mar 2010
Location: Normandy, France
Boat: Flush Poker, 8.25m (Point Barre)
Posts: 340
KML Overlay Plugin

Gooood moorning OpenCPN'ers !

Here's a new plugin: KMLOverlay.

Yes, that's it: You select some kml files and they are displayed right on your favorite nav software!
It uses Google's libkml for file parsing.

This is a very early version, it only display basic geometry: point, linestring & polygon. It doesn't display name, description nor uses styles. The color is hardcoded (gray).
I plan to implement GroundOverlay soon. This is a promising feature as it'd allow any image overlayed (with transparency) over the chart keeping coordinates, zooming, skew, etc (as you could do with a handcrafted kap file but the kap is not transparent)

Here's a build for OpenCPN 2.5.0
Move it to your plugin folder (remove the .doc extension)

This plugin also require this dll in opencpn root (C:\Program Files\OpenCPN\)
http://libkml.googlecode.com/svn/tag...2/libexpat.dll

PS: Sorry early adopters, this dll will not work with latest beta (API change) I'll provide the source quickly with a receipt for building (yes it works for every flavor of your favorite Unix - Fedora here - with a few dependency). And maybe a build dll for latest beta.

PPS: It's built with VC++ 2008, please check you've the redistributable package for this version.

Enjoy!

Edit: F*ck - "Your file of 509.0 KB bytes exceeds the forum's limit of 400.0 KB for this filetype."
Edit[2]: I uploaded it right here http://je.onfray.fr/dl/kmloverlay_pi.dll
SethDart is offline   Reply With Quote
Old 11-02-2012, 03:25   #2
Registered User
 
idpnd's Avatar

Join Date: Sep 2007
Location: Almería, ES
Boat: Chiquita 46 - Libertalia
Posts: 1,558
Re: KMLOverlay plugin

Wow! Impressed
__________________
sv Libertalia
idpnd is offline   Reply With Quote
Old 11-02-2012, 04:30   #3
Registered User
 
Gilletarom's Avatar

Join Date: Mar 2010
Location: France
Boat: 10.50 mètres
Posts: 3,050
Re: KMLOverlay plugin

Hello Sethdart

Heureux de te voir réapparaitre.

Well, several things:
1 ° Pavel has just released a new display of the marks and waypoints properties (for version 2.6.0-1310). I put a post in his thread. There is a problem that it appears with the operation of the route manager, tracks and waypoints. I'll report it. As it is you who has developed this manager, to see with Pavel.

2 ° I just tried to toy with your new tool that uses the kml files.

I set the first dll in the installation folder and the dll OpenCPN your plugin in the plugin folder. All this in version 2.5.0.

a) I activated your plugin. There are no preferences. is this normal?

b) I get to display a window that says a kml file is taken into account but ... Then, what can you do with?
I just get a gray rectangle in the area on the kml file on the chart.

So??
Gilletarom is offline   Reply With Quote
Old 11-02-2012, 13:18   #4
Registered User

Join Date: Feb 2010
Location: Tierra del Fuego
Boat: Phantom 19
Posts: 6,278
Re: KMLOverlay plugin

SethDart...
Finally something disappeared from my TODO list without me having to write a single line of code, thanks a lot
Your code should not be affected by the 2.6 API changes in other way than a version bump - just additions there. The more complicated part is the new toolchain - VC9 and VC10 libs seem not to be happy at all in a single process space, so you will have to upgrade to VS2010 for the build. Or just push the code to github and I will do the build.

Pavel
nohal is offline   Reply With Quote
Old 11-02-2012, 16:33   #5
Registered User
 
HappySeagull's Avatar

Join Date: Dec 2010
Location: B.C.,Canada
Boat: 29'
Posts: 2,423
Re: KMLOverlay plugin

...that's right! I have both VC's installed (for running 2.5 and 2.6 betas) and this plugin is invisible. Nada. Nothing.
HappySeagull is offline   Reply With Quote
Old 11-02-2012, 16:40   #6
Registered User

Join Date: Mar 2010
Location: Normandy, France
Boat: Flush Poker, 8.25m (Point Barre)
Posts: 340
Re: KMLOverlay plugin

I'm fine with the beta API (there are changes, particularly with the overlay function). The plugin was developped with for latest beta. Then I made the (very small) changes to build with stable. I only provided the .dll for stable version for better audience. Maybe I was wrong ;-)
Today, I tried to build with VS2010 on a W7 VM. It's a total failure. Crash of both opencpn (either with or without my plugin) and the plugin with a straight 2.5.0 version. I'll leave you the task to build the plugin. (or maybe you've a guide? or some directions)
I'll send you a PM with the receipt for building the plugin. (require libkml plus a few others .lib)
SethDart is offline   Reply With Quote
Old 11-02-2012, 16:43   #7
Registered User

Join Date: Mar 2010
Location: Normandy, France
Boat: Flush Poker, 8.25m (Point Barre)
Posts: 340
Re: KMLOverlay plugin

Quote:
Originally Posted by HappySeagull View Post
...that's right! I have both VC's installed (for running 2.5 and 2.6 betas) and this plugin is invisible. Nada. Nothing.
Can you show us what's in opencpn.log. Maybe something like:
Error: Failed to load shared library 'C:\Program Files\OpenCPN\plugins/kmloverlay_pi.dll' (error 14001:
something with side-by-side configuration... very cryptic to me ;-)
SethDart is offline   Reply With Quote
Old 11-02-2012, 17:47   #8
Registered User
 
LeaseOnLife's Avatar

Join Date: Apr 2008
Location: out cruising again, currently in Fiji
Boat: Sailboat
Posts: 1,479
Re: KMLOverlay plugin

On O-2.5.0 XP-Pro, VC++ 2008 Redistributable installed (4 different versions !?!?)

Code:
19:44:46: PlugInManager: Loading PlugIn: C:\Program Files\OpenCPN\plugins/kmloverlay_pi.dll
19:44:46: Error: Failed to load shared library 'C:\Program Files\OpenCPN\plugins/kmloverlay_pi.dll' (error 14001: this application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem.)
19:44:46:    PlugInManager: Cannot load library: C:\Program Files\OpenCPN\plugins/kmloverlay_pi.dll


Dirk
LeaseOnLife is offline   Reply With Quote
Old 11-02-2012, 21:50   #9
Registered User
 
HappySeagull's Avatar

Join Date: Dec 2010
Location: B.C.,Canada
Boat: 29'
Posts: 2,423
Re: KMLOverlay plugin

Quote:
Originally Posted by SethDart View Post
Can you show us what's in opencpn.log. Maybe something like:
Error: Failed to load shared library 'C:\Program Files\OpenCPN\plugins/kmloverlay_pi.dll' (error 14001:
something with side-by-side configuration... very cryptic to me ;-)
sorry. here. same as Leaseonlife has...
Code:
8:45:25 PM: PlugInManager: Loading PlugIn: C:\Program Files\OpenCPN\plugins/kmloverlay_pi.dll
8:45:25 PM: Error: Failed to load shared library 'C:\Program Files\OpenCPN\plugins/kmloverlay_pi.dll' (error 14001: this application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem.)
8:45:25 PM:    PlugInManager: Cannot load library: C:\Program Files\OpenCPN\plugins/kmloverlay_pi.dll
8:45:25 PM: PlugInManager: Loading PlugIn: C:\Program Files\OpenCPN\plugins/vdr_pi.dll
what I meant was, I have both VCredists 2008 for OPCN2.5 and Vcredist 2010 for OPCN2.6XXBeta installed. on XPSP2.

kmloverlayplugin doesn't show up at all in the SettingsWrench\Plugins page....not loading as you can see above in log excerpt. But I'm maybe not configured to test this at all with both VC's aboard?
HappySeagull is offline   Reply With Quote
Old 12-02-2012, 00:45   #10
Registered User

Join Date: Feb 2010
Location: Tierra del Fuego
Boat: Phantom 19
Posts: 6,278
Re: KMLOverlay plugin

Quote:
Originally Posted by SethDart View Post
I'm fine with the beta API (there are changes, particularly with the overlay function). The plugin was developped with for latest beta. Then I made the (very small) changes to build with stable. I only provided the .dll for stable version for better audience. Maybe I was wrong ;-)
Today, I tried to build with VS2010 on a W7 VM. It's a total failure. Crash of both opencpn (either with or without my plugin) and the plugin with a straight 2.5.0 version. I'll leave you the task to build the plugin. (or maybe you've a guide? or some directions)
I'll send you a PM with the receipt for building the plugin. (require libkml plus a few others .lib)
SethDart...
The guide at Compiling - Windows | Official OpenCPN Homepage is updated for the 2010 toolchain and so far didn't produce any problems I'm aware of.
What I haven't tried is to build in VS2010 against WX built in VS2008 and what I know is impossible is to mix executable built with one VC version with plugins built with another.

Pavel
nohal is offline   Reply With Quote
Old 12-02-2012, 11:03   #11
Registered User

Join Date: Mar 2010
Location: Normandy, France
Boat: Flush Poker, 8.25m (Point Barre)
Posts: 340
Re: KML Overlay Plugin

Hi all,

I just uploaded it right here:
https://github.com/OpenCPN/OpenCPN/tree/KMLOverlay

Here are some directions for building it:
[1] First, it require libkml (obviously)
Download it here Downloads - libkml - a KML library written in C++ with bindings to other languages - Google Project Hosting
Extract it
and build the solution.
[2] There are some third party library embedded inside (expat, zlib, minizip, uriparser) They are already built by Google, but unfortunately with VC2005. They are required for next step.
You'll find these library built with VC2010 here Issue 139 - libkml - lib file to support run libkml example in vs 2008 - a KML library written in C++ with bindings to other languages - Google Project Hosting
Download them three, you'll need it below.
[3] Now, let's build the plugin
- Resync your cmake config. Some variables are not set (sorry, I created Findlibkml.cmake from scratch and dunno how to find these libs auto-magically for Windows - if ever possible -. GNU/Linux users will not face this problem. Switch to GNU/Linux, it's way better ;-) ) so you'll have to fill them by hand (Use cmake GUI)
Here are the values (replace ${PATH_TO_LIBKML} with path from step [1] and ${PATH_TO_EXTRA} with path from step [2]):
libkml_KML_INCLUDE_DIR = ${PATH_TO_LIBKML}/src
libkml_BASE_LIBRARY = ${PATH_TO_LIBKML}/msvc/Release/libkmlbase.lib
libkml_DOM_LIBRARY = ${PATH_TO_LIBKML}/msvc/Release/libkmldom.lib
libkml_ENGINE_LIBRARY = ${PATH_TO_LIBKML}/msvc/Release/libkmlengine.lib
libkml_BOOST_INCLUDE_DIR = ${PATH_TO_LIBKML}/third_party/boost_1_34_1
libkml_MINIZIP_LIBRARY = ${PATH_TO_EXTRA}/minigzip-2010.lib
libkml_ZLIB_LIBRARY = ${PATH_TO_EXTRA}/zlib1-2010.lib
libkml_URIPARSER_LIBRARY = ${PATH_TO_EXTRA}/uriparser-2010.lib
libkml_EXPAT_LIBRARY = ${PATH_TO_LIBKML}/third_party/expat.win32/libexpat.lib

Now build the plugin and enjoy!

GNU/Linux users. Just download the source to your codebase. Install libkml-devel from your distro. Run make and it should just work.
Warning Fedora users: libkml-devel lack one dependency (boost-devel) You'll have to install it as well. Bug opened. I also sent patches to upgrade to libkml-1.2.0 I hope we have it soon (maintainer contacted, he said he would do it this week-end) You can easily install libkml 1.2.0 with my patches + spec. See bugzilla for reference.

PS: Pavel, can you build the plugin with your solution and send it here (or directly to me so I can replace mine at URL above) I'm trying to install VC2010 on my VM.

Regards.
Jean-Eudes
SethDart is offline   Reply With Quote
Old 12-02-2012, 12:26   #12
Registered User

Join Date: Feb 2010
Location: Tierra del Fuego
Boat: Phantom 19
Posts: 6,278
Re: KML Overlay Plugin

The plugin built with VS 2010 against OpenCPN 2.6.1310 beta on Windows is available for download at http://opencpn.xtr.cz/kmloverlay_pi.dll

Cheers

Pavel
nohal is offline   Reply With Quote
Old 12-02-2012, 13:23   #13
Registered User
 
Gilletarom's Avatar

Join Date: Mar 2010
Location: France
Boat: 10.50 mètres
Posts: 3,050
Re: KML Overlay Plugin

Hello pavel,

Quote:
Originally Posted by nohal
The plugin built with VS 2010 against OpenCPN 2.6.1310 beta on Windows is available for download at http://opencpn.xtr.cz/kmloverlay_pi.dll

Pavel
There 2 dll with this plug-in. Sethdart as said that the over dll do not run with 2.6 ..

What about ?

But, I try with the 2 dll and it run ok.

Gilletarom.
Gilletarom is offline   Reply With Quote
Old 12-02-2012, 13:30   #14
Registered User

Join Date: Feb 2010
Location: Tierra del Fuego
Boat: Phantom 19
Posts: 6,278
Re: KML Overlay Plugin

Gilletarom...
the one SethDart posted before is for 2.5.0, the one I posted now is for 2.6.1310 beta

Pavel
nohal is offline   Reply With Quote
Old 12-02-2012, 13:40   #15
Registered User
 
Gilletarom's Avatar

Join Date: Mar 2010
Location: France
Boat: 10.50 mètres
Posts: 3,050
Re: KML Overlay Plugin

Quote:
Originally Posted by nohal
the one SethDart posted before is for 2.5.0, the one I posted now is for 2.6.1310 beta
Pavel
We do not speak of the same dll.

I speak of this dll.
http://libkml.googlecode.com/svn/tag...2/libexpat.dll

and you speak of this dll:
http://opencpn.xtr.cz/kmloverlay_pi.dll

??
Gilletarom is offline   Reply With Quote
Reply

Tags
kml

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Plugin r.fairman OpenCPN 445 29-04-2020 11:11
New IAC Fleetcode Plugin for OpenCPN CBorchardt OpenCPN 77 23-04-2019 06:40
GRIB Weather Mark Ward OpenCPN 26 12-02-2012 22:33
Route Properties, Missing Functions James Baines OpenCPN 13 13-07-2011 05:31

Advertise Here


All times are GMT -7. The time now is 12:43.


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.