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 20-10-2015, 07:21   #91
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,996
Images: 2
Re: Hydrographic Survey Plugin

Quote:
"looks like you have imported nohal_soundings.gmp"
Actually not. I "Read Nmea" and selected VDR-AIS-file.txt from my File Thingie directory NMEA.

Quote:
"At the moment you need to use the dropdown to re-select the survey name. When you do this the soundings will appear in the table."
Thanks, I had been shutting down O and restarting to get it to show. This is a bit of a problem and makes it harder to use.

Quote:
"'Profile' had so many problems I commented it out for the time being."
Nothing is showing for me, ever . I assume this is a graphic display and may depend on opengl or something. Have not fooled with it yet.

Quote:
At the moment I think all the soundings of all the surveys in the database are plotted. Need to make a way of only rendering soundings from the survey in the dropdown.
I believe that is correct. It does help us find the soundings because only a few of the menu items are operational such as "Read Nmea" "Export" "Import" "New" and "Delete" - "Zoom to" which would help does not work. And "Properties" might help us locate them.

I did look in Route Manager and I think these are actually shown as "Tracks"
In doing this I wished that I could go into "Tracks" or "Routes" and select a waypoint or track and just "Zoom to it" but that is probably an O feature request.

I tried to run several VDR files to see if Survey_pi would record the Nmea data stream which is what I would expect. It does not seem to do that yet, and there are no controls for that anyway, such as start, stop, save to etc. So I am guessing it is not implimented yet. For the time being we are just reading Nmea recordings and Import & Export *.gmp files.

"Reading Nmea" tends to be pretty picky about the file format and hangs up easily causing O to stall. This operation will have to become more robust such that malformed and unknown sentences and partial sentences are automatically thrown out.
rgleason is offline   Reply With Quote
Old 20-10-2015, 07:35   #92
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,996
Images: 2
Re: Hydrographic Survey Plugin

This could be a very useful plugin. I would love to record some areas and routes and have them as a more accurate overlay.
rgleason is offline   Reply With Quote
Old 21-10-2015, 06:47   #93
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,996
Images: 2
Re: Hydrographic Survey Plugin

Quote:
I messed up the toggle Pavel made for recording NMEA from a connection to instruments. However, if you start a new survey again and play a VDR file using the VDR plugin you will see that the depth information appears in the table anyway, just no way of stopping or starting it yet. With this I found that Lat and Lon were reversed (fix not yet uploaded to GitHub) so you need to zoom out a long way to find the (wrongly plotted) soundings on the chart.
Thanks Mike, this is helpful. I will try VDR again.
rgleason is offline   Reply With Quote
Old 30-10-2015, 11:54   #94
Registered User

Join Date: May 2012
Posts: 1,253
Re: Hydrographic Survey Plugin

My fork of Survey_pi has been updated and should now compile "standalone" for OpenCPN 4.1.925+. The package part is still not working.

geos_c.lib, iconv.lib, freexl.lib and proj.lib from C:\OSGeo4W (Windows) have to be linked in.

To find WxWidgets 3.0.2 I used CMake-GUI instead of the command prompt.

To run the plugin you will need geos_c.dll, iconv.dll, freexl.dll and proj.dll in the main OpenCPN program folder.

OpenGL OFF only.

Mike
Rasbats is offline   Reply With Quote
Old 30-10-2015, 21:19   #95
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,996
Images: 2
Re: Hydrographic Survey Plugin

I deleted my previous setup, including the readme file and the geos files that I had placed there.

The new readme file no longer seems to have the instructions for windows, but I went back and looked at pavels readme which says put *.dll's in the survey_pi main directory.

Your note above in the forum says to put *.lib in the plugin main dir
geos_c.lib, - NOT found
iconv.lib, - found (also in survey_pi main dir
freexl.lib - found
proj.lib - NOT found
(Your note in the readme say *.dll's)

I am unable to find the files as noted above. I went back and found the corresponding dlls and put them in survey_pi. and configured the cmake-Gui
and then ran the standalone. I got some errors in the attached.
(also see my notes above the error output please.)

Should I make a file OSgeo4W.7z with the four dlls' needed?
Then someone with authority can upload to sourceforge

Then For Windows, Download from Sourceforge opencpnplugins - Browse Files at SourceForge.net
which contains:
freexl.dll,
geos_c.dll,
proj.dll,
iconv.dll
And extract to the main survery_pi/ directory.

Do you know if the full 1.7 gb of OSgeo4W still be needed to be installed on the machine in order to compile survey_pi?

I am now having trouble compiling PI with OpenCPN because it appears things have changed a little...since I did it. - Keeeps us on our toes.

If you can think of why I am getting these errors, would sure like any ideas.

When Generating the Cmake-Gui there was an error:
tinyxml library not found <-------!!!!!!!
Don't think that would generate all the errors we got though.
Lot of

"spatialite.obj : error LNK2019: unresolved external symbol"

Maybe I need c:/OSgeo4W in my environment path?

[So some of the programs do need to be installed and this is the list of what is needed I expect-- would be nice to know if we could just install certain ones...and which ones... sometime.]

===
Ah ah. I just understood which parts of OSgeo4W are needed!!!
Quote:
Compilation on Windows:
Get OSGeo4Win: OSGeo4W
Install the following libraries : proj.4, freexl, geos, iconv
If you don't like the default location C:\OSGeo4W, you will have to modify CMakeLists.txt
---
How to make this a little clearer to users? - I will check the website and see how the OSgeo4W selections are made.

Thanks
Rick
Attached Thumbnails
Click image for larger version

Name:	CMake-GUI-Survey.png
Views:	363
Size:	63.5 KB
ID:	111941  
Attached Files
File Type: doc survey_pi-error-comments.doc (15.9 KB, 49 views)
rgleason is offline   Reply With Quote
Old 31-10-2015, 12:00   #96
Registered User

Join Date: May 2012
Posts: 1,253
Re: Hydrographic Survey Plugin

The easy part first: Dlls to make the plugin run.

Quote from Pavel:
Usage on Windows Copy the following DLLs to the OpenCPN program folder: freexl.dll, geos_c.dll, proj.dll, iconv.dll - They can be found in the bin subfolder of your OSGeo4W installation
Unquote

So these files could be available on SourceForge for users to download and should be placed in the main OpenCPN program folder, to allow the plugin to run.

The hard part: Lib files to build the plugin.

My workflow for making this plugin was CMake-GUI - configure/generate. Then Visual Studio Express 2013 for Desktop to finally link and build.

Quote from my post:
geos_c.lib, iconv.lib, freexl.lib and proj.lib from C:\OSGeo4W (Windows) have to be linked in.
Unquote

I did not explain this very well. The linking in VS 2013 was done by:
Properties/Linker/Input/Additional Dependencies and then making an entry for each of these .lib files. On my machine the files remain in C:\OSGeo4W\lib. The errors reported are all due to the lack of links to these libs.

My C:\OSGeo4W is 300MB. Using osgeo4w-setup-x86.exe and Advanced Install you can choose to install just the libraries you need, which correspond to those listed above.

Perhaps someone with a knowledge of CMake could take a look at CMakeLists.txt, to make the manual linking redundant (and probably remove a lot of mistakes lurking there). 'TinyXML not found' is not a problem, because I included those files in the source code and it will build with those.

Unfortunately the final plugin is too large to post here.

Hope this helps.
Mike
Rasbats is offline   Reply With Quote
Old 31-10-2015, 18:22   #97
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,996
Images: 2
Re: Hydrographic Survey Plugin

Mike, Its hard to believe I managed to compile it on 10/18, but the file is sitting right here. After trying to again.... I'm still having some trouble with lib files.

File Path
geos_c.lib C:\OSGeo4W\lib
iconv.lib C:\OSGeo4W\lib
freexl.lib ??
-don't have, I have found the file freexl_i.lib
proj.lib ?? -don't have

What would you suggest I do?
PS- Ok I'll try just installing the libraries needed.

---
Quote:
My workflow for making this plugin was CMake-GUI - configure/generate.
Then Visual Studio Express 2013 for Desktop o finally link and build.
I've done the CMake-Gui Configure/generate.
Where do I go in VS2013 for Desktop to set up the links with paths?
rgleason is offline   Reply With Quote
Old 31-10-2015, 20:03   #98
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,996
Images: 2
Re: Hydrographic Survey Plugin

Progress on compiling standalone survey_pi
----------------------------
Usage on Windows
You need 4 dll files from OSGeo4W.
Copy the following DLLs to the OpenCPN program folder: freexl.dll, geos_c.dll, proj.dll, iconv.dll - They can be found in the bin subfolder of your OSGeo4W instalation
The four DLL files needed are also in OpenCPN Beta File Thingie rguser, rgpass
Under Hydrology_pi directory, look for OSgeo4W-DLL.7z
Unzip to the ../survey_pi/ main directory.
The files are freexl.dll, geos_c.dll, iconv.dll and proj.dll.

Compilation on Windows:
You need 4 libraries from OSGeo4W.
Get OSGeo4Win: OSGeo4W
Quick Start for OSGeo4W Users
Download the ​32bit or ​64bit OSGeo4W network installer <--- Get 32bit
The file I downloaded for OSGeo4W was 'osgeo4w-setup-x86.exe'.
Start this file, and pick "Advanced Mode" when it shows up.
Install the following libraries: proj.4, freexl, geos, iconv
--The above file is a selector for what to download.
--Don't blindly do a full install (1.7gb) in 'Advanced mode'. Some components require 3rd party additions
--Using these searchs (freexl, geos, iconv, proj) and then change 'skip' to keep for download.
--e.g. Advanced mode you enter a search for "freexl" and then change 'skip' to download,
--Then search for the next lib. Then install by continuing with "Next".
If you don't like the default location C:\OSGeo4W, you will have to modify CMakeLists.txt
After running this left me with C:\OSGeo4W\ and folders apps,bin,etc,include,lib,share,var. (73mb)

File Path
geos_c.lib C:\OSGeo4W\lib
iconv.lib C:\OSGeo4W\lib
freexl_i.lib C:\OSGeo4W\lib
NOTE: Don't find freexl.lib !!!
proj_i.lib C:\OSGeo4W\lib NOTE Don't find proj.lib !!!

Mike are the last two correct?
Also briefly, how do I link using VS2013?
don't seem to find help on that with searches.
rgleason is offline   Reply With Quote
Old 01-11-2015, 04:49   #99
Registered User

Join Date: May 2012
Posts: 1,253
Re: Hydrographic Survey Plugin

My mistake again .... aaaargggghhhh

freexl.lib and proj.lib are not installed in Windows folder c:\OSGeo4W\libs using the basic setup program now available. Perhaps they were in the past.

Along the way I must have made these 2 libs and copied them to that folder.

To save the pain of describing where to find and make the libs (a la Google) I have now put all 4 libs on GitHub, in an Extras/libs folder.

For linking with Visual Studio 2013 Express for Desktop:
Solution Explorer shows a list of items. Right-Click on survey_pi and at the bottom of the list you will find 'Properties'. Select 'Properties' and a form 'survey_pi Property Pages' is shown.

Click on 'Linker' and 'Input' and at the top of the list on the right you will find 'Additional Dependencies'. Click on the line of files and on the far right you get a drop down arrow. Click this and you get the option <Edit...>. The files are now shown as a list and you can insert the 4 lib files one by one. Copy and paste can be used in this list. The path to the lib file needs to be included as well as the file name.

Sorry about all the pain with this plugin.

Mike
Rasbats is offline   Reply With Quote
Old 01-11-2015, 05:58   #100
Registered User

Join Date: May 2012
Posts: 1,253
Re: Hydrographic Survey Plugin

Rick ...

I found another source of the dll and lib files:

https://groups.google.com/forum/#!to...rs/H3HTu7FrqRM

This references a 7z file available online:

http://www.gaia-gis.it/spatialite-3....a1-MSVC-x86.7z

Have tested with the files from this source and they seem to work ok.

OpenGL OFF only at the moment.

Mike
Rasbats is offline   Reply With Quote
Old 01-11-2015, 06:34   #101
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,996
Images: 2
Re: Hydrographic Survey Plugin

Mike, I am sorry. I feel like I have you jumping through hoops or something. I am pretty uninitiated, but learning. This morning I was trying to understand linking better.

I found Sandro Furieri's post 10/16/11
Quote:
I've prepared an experimental binary distribution fully
based on MSVC 2010 (Win32):
www.gaia-gis.it/spatialite-3.0.0-BETA1/splite-3.0.0-beta1-MSVC-x86.7z
[this includes updated build-scripts: please check the README files]
Downloaded it and looked at it and it does indeed have those two files!
Should I remove the 73mb that I downloaded and install this? or Just keep what I have and install this?

Your description for linking is simple & good. I found these
Walkthrough: Creating and Using a Dynamic Link Library (C++)
https://msdn.microsoft.com/en-us/library/ms235636.aspx
Typically you need to do 5 things to include a library in your project:
c++ - How to include libraries in Visual Studio 2012? - Stack Overflow

Now I think I have some things to do!

PS: Found it expects to be in C:\splite-msvc so I can install separately.
rgleason is offline   Reply With Quote
Old 01-11-2015, 07:42   #102
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,996
Images: 2
Re: Hydrographic Survey Plugin

Mike, Your description for linking is very helpful.
A question has come up. Can I link the files using
..\GitHub\o-plugin\mr-survey_pi\Extras\libs
or should I link to this path C:\splite-msvc\lib?
rgleason is offline   Reply With Quote
Old 01-11-2015, 08:04   #103
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,996
Images: 2
Re: Hydrographic Survey Plugin

It appears I need more than just Extras/libs files as I got Link ref errors.

From Sandro Furieri's post 10/16/11 :
"I've prepared an experimental binary distribution fully based on MSVC 2010 (Win32):
www.gaia-gis.it/spatialite-3.0.0-BETA1/splite-3.0.0-beta1-MSVC-x86.7z
[this includes updated build-scripts: please check the README files]"

Download this file, create a new folder C:/splite-msvc and extract the files in accordance with the readme.

To link OSGeo4W files with Survey_pi while in Visual Studio 2013 Express for Desktop:
  1. Open Visual Studio 2013 Express for Desktop.
  2. Open a File > New project and point to ..survey_pi/build/survey_pi.sln
  3. Solution Explorer (right panel) shows a list of items.
  4. Right-Click on the "survey_pi" halfway down the list not the top survey_pi (8 projects).
  5. Select "Set to startup project"
  6. Right Click again on "survey_pi" halfway down the list.
  7. At the bottom of the popup list you will find 'Properties'.
  8. Select 'Properties' and a form 'survey_pi Property Pages' is shown.
  9. Click on 'Linker' and 'Input' and at the top of the list on the right you will find 'Additional Dependencies'.
  10. Click on the line of files and on the far right you get a drop down arrow.
  11. Click this and you get the option <Edit...>.
  12. The files are now shown as a list and you can insert the 4 lib files one by one.
  13. Copy and paste can be used in this list. The path to the lib file needs to be included as well as the file name.
Added to the end:
C:\splite-msvc\lib\freexl.lib;
C:\splite-msvc\lib\iconv.lib;
C:\splite-msvc\lib\proj.lib;
C:\splite-msvc\lib\geos_c.lib;

Now when I do cmake -T v120_xp .. and cmake --build . --config release
I still get 68 Link Ref errors....
Do I need to follow the Readme in splite-msvc and

Quote:
General Setup:
--------------
the main folder is intented to be:
C:\splite-msvc

thus, the following layout is expected:

-+ C:
+-+ splite-msvc
+-+ bin [.exe and .dll files]
+-+ include [header files]
+-+ lib [.lib libraries]

in order to compile and link:
- open the Visual Studio Command Prompt
- goto the folder containing the sources

nmake /f makefile.vc
nmake /f makefile.vc install
Quote:
C:\splite-msvc>nmake /f makefile.vc
Microsoft (R) Program Maintenance Utility Version 12.00.21005.1
Copyright (C) Microsoft Corporation. All rights reserved.
NMAKE : fatal error U1052: file 'makefile.vc' not found
Stop.
rgleason is offline   Reply With Quote
Old 01-11-2015, 08:15   #104
Registered User

Join Date: May 2012
Posts: 1,253
Re: Hydrographic Survey Plugin

Rick ...

Quote
A question has come up. Can I link the files using
..\GitHub\o-plugin\mr-survey_pi\Extras\libs
or should I link to this path C:\splite-msvc\lib?
Unquote

You should be able to link to either but 'C:\splite-msvc\lib' will be better, to avoid having libs in the Git in future.

Just starting to look at the README to see if we can avoid using OSGeo4W.

Mike
Rasbats is offline   Reply With Quote
Old 01-11-2015, 08:18   #105
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,996
Images: 2
Re: Hydrographic Survey Plugin

When I check to see if it is installed properly according to the readme:

Quote:
C:\splite-msvc>SET PATH=C:\splite-msvc\bin

C:\splite-msvc>ECHO %PATH%
C:\splite-msvc\bin

C:\splite-msvc>sqlite3
SQLite version 3.7.8 2011-09-19 14:49:19
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> SELECT load_extension("spatialite.dll");

sqlite> SELECT sqlite_version();
3.7.8
sqlite> SELECT spatialite_version();
3.0.0
sqlite> SELECT proj4_version();
Rel. 4.7.1, 23 September 2009
sqlite> SELECT geos_version();
3.3.0-CAPI-1.7.0
sqlite> .quit

C:\splite-msvc>
The readme says
sqlite> SELECT spatialite_version(); 3.0.0-beta1
but it is
sqlite> SELECT spatialite_version(); 3.0.0

The readme says
sqlite> SELECT geos_version(); 3.3.0-CAPI-1.7.1
but it is
sqlite> SELECT geos_version(); 3.3.1-CAPI-1.7.0

Probably does not matter.
rgleason is offline   Reply With Quote
Reply

Tags
survey

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
OpenCPN Radar Overlay PlugIn bdbcat OpenCPN 904 Today 13:19
Hydrographic Survey Plugin nohal OpenCPN 332 21-11-2024 09:17
Marine Survey 101 boatpoker Monohull Sailboats 42 15-07-2021 06:51
Low Cost Boat Worth a Survey ? JDRichlen Liveaboard's Forum 52 18-03-2012 11:32

Advertise Here


All times are GMT -7. The time now is 23:28.


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.