<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hi Eric,</p>
<p>As Martin said, Vincent Mora created a plugin layer in QGIS 2.x
to render OpenGL layer. This plugin layer was designed to render a
mesh layer as it was not available yet in QGIS. So only this kind
of layer has been developped, but you should be able to use the
OpenGlLayer class to create other kind of layer. Since last year,
I inherited projects that depend of that plugin layer and migrated
the meshlayer on QGIS 3.x . I juste pushed the recent update on
the gitlab.com repository (Oslandia left the github.com one) :
<a class="moz-txt-link-freetext" href="https://gitlab.com/Oslandia/qgis/meshlayer">https://gitlab.com/Oslandia/qgis/meshlayer</a></p>
<p>The latest update is necessary to use the meshlayer on QGIS >=
3.14 .</p>
<p>Regards</p>
<p>Sébastien<br>
</p>
<div class="moz-cite-prefix">On 03/03/2021 17:48, Eric Younkin -
NOAA Federal wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAFe6qKhT0kcDxboadaCNSg-iOm14ViDVrcMGtvh8eh40rORo2w@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">Hi Martin,
<div><br>
</div>
<div>Thanks for the quick reply. This is for NOAA nautical
chart symbology, following the s57/s52 spec. You can see the
symbology in the online viewer <a
href="https://www.nauticalcharts.noaa.gov/ENCOnline/enconline.html"
moz-do-not-send="true">here</a>. It is basically a very
complex spec that we generated for display in a wxPython
widget a long time ago using GDAL 1.x commands. S57 is
already an existing OGR driver, although I do not know what
exactly that driver does. I do know that it does not somehow
generate the symbology of the data for you to then render.</div>
<div><br>
</div>
<div>The vector data would be a combination of area/line/point
features, and I don't think it would be a fit for the Mesh
layer.</div>
<div><br>
</div>
<div>We'd like to make this symbology available in QGIS, so that
users can drag in a s57 file and view the chart. You can use
one of our WMS services, but having the file support would be
useful. Ideally in a plugin layer, so that I can also use it
in our other apps that use PYQGIS <font color="#000000">QgsMapCanvas
widgets.</font></div>
<div><font color="#000000"><br>
</font></div>
<div><font color="#000000">Thanks,<br>
Eric</font></div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Wed, Mar 3, 2021 at 11:00
AM Martin Dobias <<a href="mailto:wonder.sk@gmail.com"
moz-do-not-send="true">wonder.sk@gmail.com</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div dir="ltr">
<div>Hi Eric</div>
<div><br>
</div>
</div>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Wed, Mar 3, 2021 at
3:48 PM Eric Younkin - NOAA Federal <<a
href="mailto:eric.g.younkin@noaa.gov" target="_blank"
moz-do-not-send="true">eric.g.younkin@noaa.gov</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div>Looking for some advice. We have a need to use
OpenGL to draw the symbology associated with some
vector data. All of our code uses OpenGL 1.x. I
was thinking we could use the QOpenGLWidget and the
QgsPluginLayer to add our OpenGL rendered symbology
to a QgsMapCanvas as a new layer. </div>
<div><br>
</div>
<div>Is this possible? Is there an example anyone
knows of that is kind of similar to this idea? Or
is there a better way to approach this problem?</div>
</div>
</blockquote>
<div><br>
</div>
Could you please provide some more details regarding the
symbology you would like to get rendered? A screenshot
would help a lot...</div>
<div class="gmail_quote"><br>
</div>
<div class="gmail_quote">If you plan to use mesh-based
weather data, maybe what you are trying to do is already
possible with the mesh layer in QGIS out of the box (e.g.
display of arrows, streamlines, trace animation), or there
is only small amount of extra work do be done in QGIS core
to achieve that.<br>
</div>
<div class="gmail_quote"><br>
</div>
<div class="gmail_quote">As for OpenGL approach (it looks
like you already have some existing code you would like to
adapt to QGIS)... are you looking just at 2D rendering or
3D rendering as well? I know some time ago for QGIS 2.x
Vincent Mora has created a plugin layer that used OpenGL
to render to offscreen image and then draw it in map
canvas [1] which involved some hacks. With QOpenGLWidget
approach I would be quite cautious as it may not work
well, or have some strange issues on different platforms.
For example, I _think_ the QOpenGLWidget can't be
semi-transparent (but I may be wrong), so mixing its
content with the rest of the map could be quite tricky...</div>
<div class="gmail_quote"><br>
</div>
<div class="gmail_quote">Regards</div>
<div class="gmail_quote">Martin</div>
<div class="gmail_quote"><br>
</div>
<div class="gmail_quote">[1] <a
href="https://github.com/Oslandia/meshlayer"
target="_blank" moz-do-not-send="true">https://github.com/Oslandia/meshlayer</a></div>
</div>
</blockquote>
</div>
<br clear="all">
<div><br>
</div>
-- <br>
<div dir="ltr" class="gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr"><span><font color="#0000ff">Eric
Younkin<br>
Physical Scientist<br>
</font></span></div>
<div dir="ltr"><span><font color="#0000ff">NOAA
OCS, </font></span><span
style="color:rgb(0,0,255);font-size:12.8px">Hydrographic
Systems and Technology Branch</span></div>
<div dir="ltr"><span><font color="#0000ff">1315
East-West Highway</font></span></div>
<div dir="ltr"><span><font color="#0000ff">N/CS11,
Room 6604<br>
Silver Spring, MD 20910</font></span></div>
<div><span><font color="#0000ff">Office: </font></span><span style="font-family:arial,sans,sans-serif;font-size:13px;white-space:pre-wrap"><font color="#0000ff">240-847-8208</font></span></div>
<div dir="ltr"><span><font color="#0000ff">
Cell: 828-331-8197</font><br>
</span></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
QGIS-Developer mailing list
<a class="moz-txt-link-abbreviated" href="mailto:QGIS-Developer@lists.osgeo.org">QGIS-Developer@lists.osgeo.org</a>
List info: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-developer">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a>
Unsubscribe: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-developer">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
Sébastien Peillet
Ingénieur développement
Oslandia
01.88.33.76.86
<a class="moz-txt-link-abbreviated" href="mailto:sebastien.peillet@oslandia.com">sebastien.peillet@oslandia.com</a></pre>
</body>
</html>