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 19-10-2017, 06:57   #1
Registered User

Join Date: Aug 2017
Posts: 10
Depth soundings in vector charts

Hi, everyone!

I need to find the place in the OpenCPN source code where the depth soundings are read from the vector chart to be then displayed. I suppose lat/lon is also read in the same place, because this information is necessary to know where to display the value... :P

Can anyone help me here, please? The source code is huge, very complex, and someone who is more involved with its development will probably already know this, or at least be able to find it much quicker than I.



Thanks.

Cheers.
eduardopeloso is offline   Reply With Quote
Old 19-10-2017, 08:43   #2
Registered User

Join Date: Jun 2015
Posts: 379
Re: Depth soundings in vector charts

Quote:
Originally Posted by eduardopeloso View Post
Hi, everyone!

I need to find the place in the OpenCPN source code where the depth soundings are read from the vector chart to be then displayed. I suppose lat/lon is also read in the same place, because this information is necessary to know where to display the value... :P

Can anyone help me here, please? The source code is huge, very complex, and someone who is more involved with its development will probably already know this, or at least be able to find it much quicker than I.



Thanks.

Cheers.
Hi,
search for geoPtMulti or mps in source code.
What are you trying to do?
A lot of OpenCPN code for reading vector charts is from a project named gdal, working with this project code could be easier.
did-g is offline   Reply With Quote
Old 19-10-2017, 08:53   #3
Registered User

Join Date: Aug 2017
Posts: 10
Re: Depth soundings in vector charts

Thanks, did-g!

I need to extract lat/lon and depth value for all soundings in the chart into a text file.

Perhaps it would be best to try to get the code from gdal. I'll try to find it.

Cheers.
eduardopeloso is offline   Reply With Quote
Old 19-10-2017, 09:06   #4
Registered User

Join Date: Aug 2017
Posts: 10
Re: Depth soundings in vector charts

did-g:

This one? GDAL: GDAL - Geospatial Data Abstraction Library
eduardopeloso is offline   Reply With Quote
Old 19-10-2017, 09:10   #5
Registered User

Join Date: Jun 2015
Posts: 379
Re: Depth soundings in vector charts

Quote:
Originally Posted by eduardopeloso View Post
Thanks, did-g!

I need to extract lat/lon and depth value for all soundings in the chart into a text file.

Perhaps it would be best to try to get the code from gdal. I'll try to find it.

Cheers.
There's a copy on github .
For batch jobs gdal should be easier, sounding in s57 standard is a bit weird.

First time Opencpn open a S57 chart it converts it in an internal format Osenc.

A hack in opencpn would be to add your export for sounding in:
Osenc::CreateMultiPointFeatureGeometryRecord200

I don't remember if you can get sounding not of MultiPoint type.
did-g is offline   Reply With Quote
Old 19-10-2017, 10:21   #6
bcn
Registered User

Join Date: May 2011
Location: underway whenever possible
Boat: Rangeboat 39
Posts: 4,796
Re: Depth soundings in vector charts

And you will get the soundings only for plain S-57 charts by this way.
Neither for S-63 nor for oeSENC data.
bcn is offline   Reply With Quote
Old 19-10-2017, 17:54   #7
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,463
Re: Depth soundings in vector charts

eduardo...

Don't know exactly how you want to extract the depth data, whether directly from the S57 cell, or during OCPN runtime with a simple printf....

If the former, GDAL may be best. There is a Python interface that may make life simple.

If the latter, consider:

s52plib.cpp:
int s52plib::RenderMPS( ObjRazRules *rzRules, Rules *rules, ViewPort *vp )

Here you will see how OCPN Feature objects encode depth and lat/lon for multipoint soundings.

Good luck
Dave
bdbcat is offline   Reply With Quote
Old 07-04-2020, 21:57   #8
Registered User

Join Date: May 2013
Location: Croatia
Posts: 6
Re: Depth soundings in vector charts

I guess this is quite old post, but I will give it a try.

This is quite interesting for me as well, as I want to improve my ocean model in coastal waters and ENC are amazing source of info, much better then official topo charts like ETOPO, GTOPO etc.

Does anybody know about python or whatever tool that is capable of extracting SOUNDINGS from CM-93 v2 into something like shapefile, txt, whatever I could load into arcgis or python?

Haven't seen any post after, possibly Eduardo managed to extract the info?

Thanks in advance!

Regards,
Ivica
ivica is offline   Reply With Quote
Old 16-04-2020, 00:49   #9
Registered User
 
rooiedirk's Avatar

Join Date: Aug 2010
Location: Netherlands
Boat: Oneoff
Posts: 514
Re: Depth soundings in vector charts

I did it once, but deleted the code. However I think it was here.
Attached Thumbnails
Click image for larger version

Name:	Screenshot_20200416_094311.png
Views:	105
Size:	76.8 KB
ID:	212966  
__________________
Navigation is know where you are and what to do to get where you want.
But also: Know where you don't want to be and what to do to don't get there.
rooiedirk is offline   Reply With Quote
Old 16-04-2020, 01:52   #10
Registered User
 
rooiedirk's Avatar

Join Date: Aug 2010
Location: Netherlands
Boat: Oneoff
Posts: 514
Re: Depth soundings in vector charts

Can't edit the above post anymore, but if I add the line
Code:
printf("%f  %f  %f\n", lat, lon, depth);
in the position mentioned above I get an output like this.
Code:
52.634856  5.578131  4.100000
52.664151  5.580425  2.100000
52.660552  5.589875  0.800000
52.649258  5.607020  3.800000
52.634812  5.609590  4.200000
52.638594  5.553924  5.200000
52.644127  5.542943  4.700000
52.663117  5.525708  4.500000
52.663297  5.548883  5.000000
52.660734  5.498841  3.000000
52.636885  5.487185  3.900000
52.636792  5.505277  3.600000
52.629727  5.522335  2.900000
52.649440  5.514683  2.800000
52.666537  5.510046  4.200000
Latitude, Longitude and depth.
__________________
Navigation is know where you are and what to do to get where you want.
But also: Know where you don't want to be and what to do to don't get there.
rooiedirk is offline   Reply With Quote
Old 16-04-2020, 23:54   #11
Registered User

Join Date: May 2017
Location: Delft, NL
Boat: Hurley
Posts: 27
Re: Depth soundings in vector charts

For S-57, you can use GDAL's ogr2ogr. Not sure how to deal with CM-93, I don't have a copy of those.

Code:
ogr2ogr -f "[filetype]" -oo SPLIT_MULTIPOINT=ON -oo ADD_SOUNDG_DEPTH=ON [output] [input] SOUNDG
For example:

Code:
ogr2ogr -f "geojson" -oo SPLIT_MULTIPOINT=ON -oo ADD_SOUNDG_DEPTH=ON soundings.geojson 1R76W7RI.000 SOUNDG

Check the ogr2ogr documentation for supported vector formats.
Baksteen is offline   Reply With Quote
Reply

Tags
charts, depth


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
Resolution of Soundings in Vector Chart davidfay OpenCPN 8 12-09-2012 00:56
How to Read cm93 Charts Depth Soundings amadeus Navigation 5 28-05-2011 05:57
Vector Soundings Font Size? JesperWe OpenCPN 35 28-02-2010 04:57
DNC Vector compared to ENC vector chart? adjuvantjfoster Marine Electronics 8 17-09-2006 17:19

Advertise Here


All times are GMT -7. The time now is 21:48.


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.