Cruisers Forum
 

Go Back   Cruisers & Sailing Forums > Seamanship, Navigation & Boat Handling > OpenCPN
Cruiser Wiki Click Here to Login
Register Vendors FAQ Community Calendar Today's Posts Log in

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 12-09-2019, 01:57   #1
Registered User

Join Date: Sep 2019
Posts: 3
Questions regarding DEPARE visualizaton

Hi forum,

I apologize if this is the incorrect place to post this questions.

I'm working on visualizing some ECN data, where I have been validating my efforts so far using OpenCPN.

However, I have a couple of questions regarding the data visualization procedure, since the data format is a bit odd.


When extracting the DEPARE layer, it contains various features. A given feature seems to at least contain one polygon describing the depth areas. However, sometimes there seems to be a list of multiple polygons, where the first listed one is the bounding one, and the subsequent ones are within it.

1) For a given feature, are all the polygons within bounding polygon supposed to be "blank"/empty, i.e. not related to the overall depth value at hand?

2) Is there ever any overlap between the bounding polygons?

3) What is the plotting order in OpenCPN? I'm thinking something like: Depth areas -> tracks -> land -> top marks

Please excuse me if some of the terminology is lacking, I'm fairly new at this.
I have also attempted to consult the Github repository for clues.

Thank you for reading this.

Best regards,
Thomas
thomas.e is offline   Reply With Quote
Old 12-09-2019, 02:42   #2
Senior Cruiser
 
GordMay's Avatar

Cruisers Forum Supporter

Join Date: Mar 2003
Location: Thunder Bay, Ontario - 48-29N x 89-20W
Boat: (Cruiser Living On Dirt)
Posts: 49,875
Images: 241
Re: Questions regarding DEPARE visualizaton

Greetings and welcome aboard the CF, Thomas.
__________________
Gord May
"If you didn't have the time or money to do it right in the first place, when will you get the time/$ to fix it?"



GordMay is online now   Reply With Quote
Old 12-09-2019, 06:44   #3
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,465
Re: Questions regarding DEPARE visualizaton

Thomas...


1. You are effectively correct. Polygons are rendered using OpenGL "Winding rules". Clockwise regions are filled, anti-clockwise are empty.


2. Polygons can overlap, but not generally if they are intended to be filled. DEPARE polys do not overlap.


3. There is no defined plotting order in S57. The S52 PLIB defines a "display priority" parameter that determines the final rendering order. Generally, LNDARE and DEPARE are drawn first, so that POINT and LINE objects render on top,


Good Luck
Dave
bdbcat is offline   Reply With Quote
Old 13-09-2019, 01:16   #4
Registered User

Join Date: Sep 2019
Posts: 3
Re: Questions regarding DEPARE visualizaton

Quote:
Originally Posted by bdbcat View Post
Thomas...


1. You are effectively correct. Polygons are rendered using OpenGL "Winding rules". Clockwise regions are filled, anti-clockwise are empty.


2. Polygons can overlap, but not generally if they are intended to be filled. DEPARE polys do not overlap.


3. There is no defined plotting order in S57. The S52 PLIB defines a "display priority" parameter that determines the final rendering order. Generally, LNDARE and DEPARE are drawn first, so that POINT and LINE objects render on top,


Good Luck
Dave
Hi Dave, thank you very much for your response.

I have some follow-up questions regarding 1), since I'm unsure about this CW and CCW notation. I'm using GDAL/OGR (https://gdal.org/) to obtain a given feature for the DEPARE layer. Where the code may return something like the following:

feat is some feature within DEPARE
Code:
feat.GetGeomFieldCount() #Returns 1
feat.GetGeometryRef().GetGeometryCount() # Returns 9
From the above I assume there are 9 geometries within the feature, where the following
Code:
feat.GetGeometryRef().GetGeometryRef(0).GetPoints()
represents the boundary polygon and the subsequent (1-8) geometries represent polygons within the bounding polygon.

My assumption is that the first polygon is always the bounding one, is this always the case?

The current approach is to colour the bounding polygon and remove colour specified by the geometries following the bounding ones.


I hope my questions make sense. Thank you in advance.

Have a nice weekend,
Thomas
thomas.e is offline   Reply With Quote
Old 13-09-2019, 01:56   #5
Registered User

Join Date: Sep 2019
Posts: 3
Re: Questions regarding DEPARE visualizaton

Quote:
Originally Posted by bdbcat View Post
Thomas...


1. You are effectively correct. Polygons are rendered using OpenGL "Winding rules". Clockwise regions are filled, anti-clockwise are empty.


2. Polygons can overlap, but not generally if they are intended to be filled. DEPARE polys do not overlap.


3. There is no defined plotting order in S57. The S52 PLIB defines a "display priority" parameter that determines the final rendering order. Generally, LNDARE and DEPARE are drawn first, so that POINT and LINE objects render on top,


Good Luck
Dave
Hi Dave,

Thank you very much for your response.

I have some follow-up questions regarding 1), since I'm unsure what you mean exactly by the CW and CCW notation.

My implementation interfaces with the maps using GDAL/OGR (Similar to OpenCPN). For a given feature in layer DEPARE, a situation may be as follows:

Code:
feat.GetGeomFieldCount() # Returns 1
feat.GetGeometryRef().GetGeometryCount() # Returns 9
For a given feature, a geometry with 9 geometries exist, where

Code:
feat.GetGeometryRef().GetGeometryRef(0).GetPoints()
contains the polygon information for the bounding polygon, and the subsequent indices (1-8) contains information about the polygons within the bounding polygon. My approach is then to colour the entire bounding polygon, and then remove colour as stated by the remaining polygons.

It is merely an assumption on my end, that the first geometry is a the bounding polygon. Can you confirm this?

I hope my question makes sense. Thank you very much in advance.

Have a nice weekend,
Thomas
thomas.e is offline   Reply With Quote
Old 13-09-2019, 02:47   #6
Registered User

Join Date: Sep 2019
Posts: 3
Re: Questions regarding DEPARE visualizaton

I'm sorry about the double post. I am having some issues with the forum in my browser.
thomas.e is offline   Reply With Quote
Reply


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
Some questions on NMEA with OpenCPN - regarding Temp/Hum/Pressure makki99 OpenCPN 13 06-09-2016 13:26
Clearance Questions regarding cruising around Spain. Dulcesuenos Europe & Mediterranean 10 18-04-2016 16:10
Questions regarding Seaclipper 20 AvocadoRunner Multihull Sailboats 0 03-09-2014 15:28
Two Questions Regarding Draft and Stability Elemein Monohull Sailboats 37 15-10-2010 11:06
I Have a Few Questions Regarding OpenCPN Skua OpenCPN 1 03-06-2010 22:24

Advertise Here


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


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.