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 16-02-2012, 12:28   #46
Registered User

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

git remote add github git://github.com/OpenCPN/OpenCPN.git
git pull github KMLOverlay
cd build
make
sudo make install
SethDart is offline   Reply With Quote
Old 16-02-2012, 15:20   #47
Registered User
 
sailias's Avatar

Join Date: Mar 2010
Location: Canada
Boat: On the Hard
Posts: 336
Re: KML Overlay Plugin

Thanks....here is the trick.

1. The addition of the external git repository has to be done from within the existing source directory. This is where I was getting caught all day as if you do it one level up it comes back as negative.

2. the libkml-devel package is installed as well as dependancies for Ubuntu 11.10 however the error message I get is as follows:

--------------
-- *** Building kmloverlay_pi ***
CMake Error at /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:91 (MESSAGE):
Could NOT find libkml (missing: libkml_INCLUDE_DIR)
Call Stack (most recent call first):
/usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:252 (_FPHSA_FAILURE_MESSAGE)
plugins/kmloverlay_pi/Findlibkml.cmake:61 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
plugins/kmloverlay_pi/CMakeLists.txt:61 (FIND_PACKAGE)
----------------------------------eof-------------

With make I can direct it to the appropriate directory to find those but running cmake -help provides no clues on how to point to /usr/include/klm. Adding it to the $PATH variable has no effect, nor does ldconfig.

Thanks for any pointers and your patience.

/ch
sailias is offline   Reply With Quote
Old 16-02-2012, 15:46   #48
Registered User
 
sailias's Avatar

Join Date: Mar 2010
Location: Canada
Boat: On the Hard
Posts: 336
Re: KML Overlay Plugin

OK I think I found the issue:

The cache file gives me the following:
-------------------------------------------------------
//Value Computed by CMake
kmloverlay_pi_BINARY_DIR:STATIC=/home/chris123/opencpn/build/plugins/kmloverlay_pi

//Value Computed by CMake
kmloverlay_pi_SOURCE_DIR:STATIC=/home/chris123/opencpn/plugins/kmloverlay_pi

//Path to a library.
libkml_BASE_LIBRARY:FILEPATH=/usr/lib/libkmlbase.so

//Path to a file.
libkml_BOOST_INCLUDE_DIR:PATH=libkml_BOOST_INCLUDE _DIR-NOTFOUND

//Path to a library.
libkml_DOM_LIBRARY:FILEPATH=/usr/lib/libkmldom.so

//Path to a library.
libkml_ENGINE_LIBRARY:FILEPATH=/usr/lib/libkmlengine.so

//Path to a file.
libkml_KML_INCLUDE_DIR:PATH=/usr/include/kml
--------------------------------------------------------eof------

So to me it looks like it cant find the libkml_boost. Now checking the installed files with synaptic, I get the following:

-------------------
usr/include/kml/third_party/boost_1_34_1
/usr/include/kml/third_party/boost_1_34_1/boost
/usr/include/kml/third_party/boost_1_34_1/boost/assert.hpp
/usr/include/kml/third_party/boost_1_34_1/boost/checked_delete.hpp
/usr/include/kml/third_party/boost_1_34_1/boost/config
/usr/include/kml/third_party/boost_1_34_1/boost/config.hpp
/usr/include/kml/third_party/boost_1_34_1/boost/config/compiler
/usr/include/kml/third_party/boost_1_34_1/boost/config/compiler/gcc.hpp
/usr/include/kml/third_party/boost_1_34_1/boost/config/no_tr1
/usr/include/kml/third_party/boost_1_34_1/boost/config/no_tr1/utility.hpp
/usr/include/kml/third_party/boost_1_34_1/boost/config/platform
/usr/include/kml/third_party/boost_1_34_1/boost/config/platform/linux.hpp
/usr/include/kml/third_party/boost_1_34_1/boost/config/platform/macos.hpp
/usr/include/kml/third_party/boost_1_34_1/boost/config/posix_features.hpp
/usr/include/kml/third_party/boost_1_34_1/boost/config/select_compiler_config.hpp
/usr/include/kml/third_party/boost_1_34_1/boost/config/select_platform_config.hpp
/usr/include/kml/third_party/boost_1_34_1/boost/config/select_stdlib_config.hpp
/usr/include/kml/third_party/boost_1_34_1/boost/config/stdlib
/usr/include/kml/third_party/boost_1_34_1/boost/config/stdlib/libstdcpp3.hpp
/usr/include/kml/third_party/boost_1_34_1/boost/config/suffix.hpp
/usr/include/kml/third_party/boost_1_34_1/boost/config/user.hpp
/usr/include/kml/third_party/boost_1_34_1/boost/detail
/usr/include/kml/third_party/boost_1_34_1/boost/detail/workaround.hpp
/usr/include/kml/third_party/boost_1_34_1/boost/intrusive_ptr.hpp
/usr/include/kml/third_party/boost_1_34_1/boost/scoped_ptr.hpp
-----------------------eof------

so if I am not mistaken, libkml_boost exist but cmake cannot find it.

Cluesless but not in Seatle...

/ch
sailias is offline   Reply With Quote
Old 16-02-2012, 16:00   #49
Registered User

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

you can tell the path to cmake with this:
cd build
cmake -Dlibkml_BOOST_INCLUDE_DIR=/usr/include/kml/third_party/boost_1_34_1 ../
make

Or you can install boost-dev (see message from Thomas/cagney at the beginning from this thread)
SethDart is offline   Reply With Quote
Old 16-02-2012, 16:27   #50
Registered User
 
sailias's Avatar

Join Date: Mar 2010
Location: Canada
Boat: On the Hard
Posts: 336
Re: KML Overlay Plugin

Yup installing boost-dev did the trick. Builds without errors. Will report back who she functions.

Many thanks

/ch
sailias is offline   Reply With Quote
Old 16-02-2012, 22:12   #51
Registered User
 
sailias's Avatar

Join Date: Mar 2010
Location: Canada
Boat: On the Hard
Posts: 336
Re: KML Overlay Plugin

Thanks Seth: I all seems to work now.

/ch
sailias is offline   Reply With Quote
Old 17-02-2012, 01:52   #52
Registered User

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

Would you mind opening a bug for Ubuntu about this?
libkml-dev sould pull boost-dev as a dependency.

Here's the bug I opened for Fedora:
https://bugzilla.redhat.com/show_bug.cgi?id=787388

It's slightly different for Fedora because libkml-devel doesn't even provide /usr/include/kml/third_party/boost_1_34_1 (it's stripped when building to ensure local boost-devel is used instead of this Google's embedded one)

This is a very easy change: add require to the packaging, rebuild the package and that's all.

Thanks,
Jean-Eudes
SethDart is offline   Reply With Quote
Old 18-02-2012, 01:15   #53
Registered User
 
sailias's Avatar

Join Date: Mar 2010
Location: Canada
Boat: On the Hard
Posts: 336
Re: KML Overlay Plugin

Sure no problem.

/ch
sailias is offline   Reply With Quote
Old 24-02-2012, 07:22   #54
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've pushed some updates to github:
https://github.com/OpenCPN/OpenCPN/commits/KMLOverlay

The plugin is now able to handle transparency for KML objects.

Unfortunately, this require some changes to the API. I'll check with Dave as he returns from his trip if they can be included in core OpenCPN. IMHO these changes can benefit to many plugins, mainly grib plugin. I've also updated both default plugins to reflect this change. All "Core:" commits shall be included in core OpenCPN by Dave, they are not directly related to this plugin (but API bump is, obviously).

Next to come: ScreenOverlay and GroundOverlay!
Attached Thumbnails
Click image for larger version

Name:	TransPoly.png
Views:	185
Size:	113.6 KB
ID:	37935  
SethDart is offline   Reply With Quote
Old 25-02-2012, 05:43   #55
Registered User

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

Ladies and Gentlemen,

Please wecome the new GroundOverlay!

I just pushed the latest changes to handle KML GroundOverlay feature.

Here's a kmz sample made with GE for Herm island near Guernsey

And this is the result displayed with this plugin. Alpha (transparency) is set directly in GE, and can be changed easily in the resulting KMZ file (or in GE) without further reprocessing the image.

To create a kmz:
- open GE
- go to the location you want to export with required zoom level
- menu File > Save > Save picture (Ctrl+Alt+S)
- menu Add > Image overlay (Ctrl+O)
* select picture previously saved
* center/resize picture to match background (play with transparency to switch between both)[1]
* adjust transparency as you want

To export:
- Right click on Places (panel on the left) :: {name of your overlay} > Save place as

Then you can open the kmz file with the plugin. The original picture saved at first step is no more required, it's embedded in the kmz file.

[1] Unfortunately GE does not map the image to the full screen as it was captured. I found it easier to create two place marks NW and SE to align picture later. Hopefully ge2kap or a similar tool can be created to achieve this automatically.
Attached Thumbnails
Click image for larger version

Name:	KML-GO.png
Views:	292
Size:	184.7 KB
ID:	37968   Click image for larger version

Name:	KML+GO.jpg
Views:	202
Size:	346.7 KB
ID:	37969  

Attached Files
File Type: doc herm.kmz.doc (108.9 KB, 76 views)
SethDart is offline   Reply With Quote
Old 25-02-2012, 07:06   #56
Registered User

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

Dear Windows testers,

I've just uploaded a full installer package here: http://je.onfray.fr/dl/opencpn_2.6.1310_setup.exe (26MB)
The kml plugin is included in this package. Works here on a Windows XP VM. Please test and report.

Warning, this is not official beta. I hope Dave will include required changes (rather small) required for the plugin to work this way. If not, I'll have to find another way ;-) or there won't be transparency :-(
SethDart is offline   Reply With Quote
Old 26-02-2012, 10:04   #57
Registered User
 
HappySeagull's Avatar

Join Date: Dec 2010
Location: B.C.,Canada
Boat: 29'
Posts: 2,423
Re: KML Overlay Plugin

Oh jeez, sorry. No, nothing - same old log entry. 2 XP laptops tried.
HappySeagull is offline   Reply With Quote
Old 26-02-2012, 10:14   #58
Registered User
 
LeaseOnLife's Avatar

Join Date: Apr 2008
Location: out cruising again, currently in Fiji
Boat: Sailboat
Posts: 1,469
Re: KML Overlay Plugin

Quote:
Originally Posted by HappySeagull View Post
Oh jeez, sorry. No, nothing - same old log entry. 2 XP laptops tried.
Happy: Thanks for breaking the bad news, didn't want to be the first one

Seth: Same here
LeaseOnLife is offline   Reply With Quote
Old 26-02-2012, 10:44   #59
Registered User

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

F..k!
Have you ever tried to build OpenCPN on these PCs?
I don't understand ; nothing special on my side. Can it be related to libexpat? I don't even know how to find what's wrong ; if it's my plugin, libexpat or some incompatibility with some wxWidgets.
Have you another libexpat in your path or somewhere else? Same for wxWidgets?
Last wednesday, I tried to get it to run on a Win7 that failed before. After 4 hours recompiling everything: libkml, uriparser, gzip, expat, wxWidgets I surrendered! I'm not expert in Windows. Let's hope Dave has a clue. I don't really knows what options he's enabled to get the whole working.

If anyone has an idea, I'm all ears. The whole source is available with instructions to compile it.

Thanks
SethDart is offline   Reply With Quote
Old 26-02-2012, 11:22   #60
Registered User
 
LeaseOnLife's Avatar

Join Date: Apr 2008
Location: out cruising again, currently in Fiji
Boat: Sailboat
Posts: 1,469
Re: KML Overlay Plugin

Seth... don't get frustrated.

I am not going to build from source, fully knowing that I am missing out on some cutting edge features. But part of testing is to use an (end-) user's environment.

Cheers

Dirk
LeaseOnLife is offline   Reply With Quote
Reply

Tags
kml


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 10:11
New IAC Fleetcode Plugin for OpenCPN CBorchardt OpenCPN 77 23-04-2019 05:40
GRIB Weather Mark Ward OpenCPN 26 12-02-2012 21:33
Route Properties, Missing Functions James Baines OpenCPN 13 13-07-2011 04:31

Advertise Here


All times are GMT -7. The time now is 11: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.