<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div>Hi,</div>
<div><br>
</div>
<div>I'm sorry, I didn't have any time to work on integrating s57
data to geoserver through ogr during several months but I got time
to work on it last month.</div>
<div><br>
</div>
<div>The main issue : objects may be composed of multiple primitives
(isolated node or edge) with geometric attributes like posacc or
quapos but ogr makes a aggregation of geometries and ignore those
geometric attributes.</div>
<div><br>
</div>
<div>We succeed to manage this issue by this process :</div>
<div>1) extract all classes to shapefile with all relations between
objects and primitives</div>
<div><br>
</div>
<div>ogr2ogr </div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>-oo
"RETURN_PRIMITIVES=ON" </div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>-oo
"RETURN_LINKAGES=ON"</div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>-oo
"LNAM_REFS=ON" <span class="gmail-Apple-tab-span" style="white-space:pre"> </span></div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>-nlt
"MULTILINESTRING"</div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>-where
"OGR_GEOMETRY='LINESTRING' or OGR_GEOMETRY='MULTILINESTRING'" </div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>-fieldTypeToString
IntegerList </div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>cell-class-line.shp </div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>cell.000 </div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>class</div>
<div><br>
</div>
<div><br>
</div>
<div>2) extract all primitives to shapefile with a s57-reader
modification which return posacc and quapos values</div>
<div><br>
</div>
<div>ogr2ogr </div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>-oo
"RETURN_PRIMITIVES=ON" </div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>-oo
"RETURN_LINKAGES=ON" </div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>-oo
"LNAM_REFS=ON" </div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>-nlt
"MULTIPOINT" </div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>-skipfailures
</div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>cell-isolatednode-point.shp </div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>cell.000 </div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>IsolatedNode</div>
<div><br>
</div>
<div>To get posacc and quapos attributes, the S57Reader::ReadVector
function was modified, can I propose the modification to the
community on github ?</div>
<div><br>
</div>
<div><br>
</div>
<div>3) integrate all shapefiles in a PostgreSQL/PostGIS database
and work on it to construct all objects-subgeometries with
'name_rcnm' and 'name_rcid' to obtain a database compatible with
geoserver.</div>
<div><br>
</div>
<div><br>
</div>
<div>During my tests, I found some differences between
s57attributes.csv, s57objectclasses.csv and the s57 reference (on
<a href="http://www.s-57.com">www.s-57.com</a> for example), I
will propose the update on github. <br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>Moreover, I was confronted with the TEMP_BUFFER_SIZE of
ogrfeature when converting IntegerList to String because some
objects have many subgeometries and the result is truncated
(finishing by '...)') and not exploitable. The limit is 80
characters, I tried to increase to 254 (max string length in shp)
but it's not enough in some cases : for now, I just log the
complete Integerlist in stderr and I handle all errors... I tried
the splitlistfield option but it's not very easy to exploit...<br>
<br>
<br>
Regards <br>
<br>
<br>
David<br>
</div>
<br>
<div class="moz-cite-prefix">Le 07/12/2016 à 22:00, Mike a écrit :<br>
</div>
<blockquote
cite="mid:CAKTSvBixE6VF3ix5gNzXvL3AiZtork2KGLJNByRQxnnTe9b4Qw@mail.gmail.com"
type="cite">
<div dir="auto">David, did you ever figure this one out? I've run
into the same situation, where I need the spatial attributes.
<div dir="auto"><br>
</div>
<div dir="auto">-Mike</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Aug 12, 2016 1:32 AM, "David
Ferdoille" <<a moz-do-not-send="true"
href="mailto:david.ferdoille@gmail.com">david.ferdoille@gmail.com</a>>
wrote:<br type="attribution">
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<p class="MsoNormal">Hello,</p>
<p class="MsoNormal"><br>
</p>
<p class="MsoNormal">Thanks for the responses,</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"><span lang="EN-US">After a
long afternoon of tests :</span></p>
<p class="MsoNormal"><span lang="EN-US">I try to
access a WRECKS object, compose by an only point, with
a QUAPOS specific value
of 5, and an POSACC of 500.0 (find it using CARIS Easy
View)</span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<p class="MsoNormal"><span lang="EN-US">1-</span></p>
<p class="MsoNormal"><span lang="EN-US">In ogrinfo
-oo "RETURN_PRIMITIVES=ON" -oo "RETURN_LINKAGES=ON"
-oo
"LNAM_REFS=ON" file.000 WRECKS, I found the object,
but no QUAPOS or
POSACC (logical because the 2 attributes are not
directly linked to the object,
but to the geometry).</span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<p class="MsoNormal"><span lang="EN-US">2-</span></p>
<p class="MsoNormal"><span lang="EN-US">In ogrinfo
-oo "RETURN_PRIMITIVES=ON" -oo "RETURN_LINKAGES=ON"
-oo
"LNAM_REFS=ON" file.000 IsolatedNode, I found the node
representing
the object but also no QUAPOS or POSACC.</span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<p class="MsoNormal"><span lang="EN-US">3-</span></p>
<p class="MsoNormal"><span lang="EN-US">In ogrinfo
-oo "RETURN_PRIMITIVES=ON" -oo "RETURN_LINKAGES=ON"
-oo
"LNAM_REFS=ON" file.000 M_QUAL, I found an only
object, spatially
containing my wreck object, but POSACC is null.</span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<p class="MsoNormal"><span lang="EN-US">4- </span></p>
<p class="MsoNormal"><span lang="EN-US">In ogrinfo
-oo "RETURN_PRIMITIVES=ON" -oo "RETURN_LINKAGES=ON"
-oo "LNAM_REFS=ON"
file.000 M_QUAL, I found 20 objects, but QUAPOS is
null for all of them.</span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<p class="MsoNormal"><span lang="EN-US">5-</span></p>
<p class="MsoNormal"><span lang="EN-US">No M_ACCY
table is present in my dataset.</span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<p class="MsoNormal"><span lang="EN-US">According
to me, the good way to get these attributes, is the
second one (2-), but even
if I try a lot of things, I didn’t manage to :</span></p>
<p style="margin-left:20.25pt"><span lang="EN-US">-<span
style="font-stretch:normal;font-size:7pt;font-family:"Times
New Roman"">
</span></span><span lang="EN-US">Trying
all the S57 option with –oo</span></p>
<p style="margin-left:20.25pt"><span lang="EN-US">-<span
style="font-stretch:normal;font-size:7pt;font-family:"Times
New Roman"">
</span></span><span lang="EN-US">Trying
to change the CSV types and attributes catalog used by
GDAL</span></p>
<p style="margin-left:20.25pt"><span lang="EN-US">-<span
style="font-stretch:normal;font-size:7pt;font-family:"Times
New Roman"">
</span></span><span lang="EN-US">Etc…</span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<p class="MsoNormal"><span lang="EN-US">Does
someone know if it is possible to get these attribute
through GDAL/OGR ?</span></p>
<p class="MsoNormal"><span lang="EN-US">If not, is
there another way to get this attributes (python GDAL
scripts ? another command
line software ?)</span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<p class="MsoNormal"><span lang="EN-US">Thanks
again for your help !</span></p>
<p class="MsoNormal"><span lang="EN-US"><br>
</span></p>
<p class="MsoNormal"><span lang="EN-US">Regards</span></p>
<p class="MsoNormal"><span lang="EN-US"><br>
</span></p>
<p class="MsoNormal"><span lang="EN-US">David</span></p>
<div class="gmail_extra"><br>
<div class="gmail_quote">2016-07-29 11:31 GMT+02:00
teddy guerin <span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:teddyguerin@yahoo.fr" target="_blank">teddyguerin@yahoo.fr</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div
style="color:#000;background-color:#fff;font-family:times
new roman,new york,times,serif;font-size:16px">
<div>Hi,</div>
<div dir="ltr">Up for my previous answer.<br>
</div>
<div>I was wrong for lines and area values
POSACC, QUAPOS are on edges and not on "real
object".</div>
<div><br>
</div>
<div>Regards</div>
<div>Ted<br>
</div>
<div><br>
<br>
</div>
<div style="display:block">
<div style="font-family:times new roman,new
york,times,serif;font-size:16px">
<div
style="font-family:HelveticaNeue,Helvetica
Neue,Helvetica,Arial,Lucida
Grande,sans-serif;font-size:16px">
<div dir="ltr"> <font face="Arial"
size="2">
<hr size="1"> <b><span
style="font-weight:bold">De :</span></b>
David Ferdoille <<a
moz-do-not-send="true"
href="mailto:david.ferdoille@gmail.com"
target="_blank">david.ferdoille@gmail.com</a>><br>
<b><span style="font-weight:bold">À :</span></b>
<a moz-do-not-send="true"
href="mailto:gdal-dev@lists.osgeo.org"
target="_blank">gdal-dev@lists.osgeo.org</a>
<br>
<b><span style="font-weight:bold">Envoyé
le :</span></b> Mercredi 27
juillet 2016 15h12<br>
<b><span style="font-weight:bold">Objet :</span></b>
[gdal-dev] OGR - S57 - geometry
extraction issue<br>
</font> </div>
<div>
<div>
<div class="m_-4628791254060752311h5"><br>
<div>
<div dir="ltr">
<div style="font-size:12.8px">Hello
all,</div>
<div style="font-size:12.8px"><br>
</div>
<div style="font-size:12.8px">We
are trying to render S57 files
as ENC through Geoserver.</div>
<div style="font-size:12.8px"><br>
</div>
<div style="font-size:12.8px">We
convert S57 to shapefiles
thanks to ogr2ogr : 1
shapefile for 1 class (ex :
COALNE) and 1 geometry type
(LINE) : </div>
<div style="font-size:12.8px">ogrinfo
-oo "RETURN_PRIMITIVES=ON" -oo
"RETURN_LINKAGES=ON" -oo
"LNAM_REFS=ON" CELLLL.000
COALNE </div>
<div style="font-size:12.8px">ogr2ogr
-skipfailures -where
"OGR_GEOMETRY='POINT' or
OGR_GEOMETRY='MULTIPOINT'"
SOUNDG_points.shp CELLLL.000
SOUNDG </div>
<div style="font-size:12.8px"><br>
</div>
<div style="font-size:12.8px">We
use gdal-2.1.0 with the
S57_CSV environnement variable
(S57_CSV=/usr/local/share/gdal<wbr>/
with s57*.csv files).</div>
<div style="font-size:12.8px"><br>
</div>
<div style="font-size:12.8px"><br>
</div>
<div style="font-size:12.8px">We
noticed that objects (of
COALNE class for example) have
multiple geometries and each
sub-geometry have attributes
like POSACC and QUAPOS which
are important for S52
representation. </div>
<div style="font-size:12.8px">We've
succeeded to extract
primitives (Edge, isolated
points, connected points,
...), but it looks very
complex to operate.</div>
<div style="font-size:12.8px"><br>
</div>
<div style="font-size:12.8px"><br>
</div>
<div style="font-size:12.8px">We
have some problems to extract
geometries from s57 objects :</div>
<div style="font-size:12.8px">-
we noticed that, for an
object, all sub-geometries are
aggregated to one geometry</div>
<div style="font-size:12.8px">-
we didn't succeed to extract
geometry attributes like
POSACC and QUAPOS</div>
<div style="font-size:12.8px"><br>
</div>
<div style="font-size:12.8px"><br>
</div>
<div style="font-size:12.8px">1)
Is there a way to not
aggregate sub-geometries of an
object and get this list of
sub-geometries ?</div>
<div style="font-size:12.8px">2)
Is there a way to extract
geometry attributes like
POSACC and QUAPOS ?</div>
<div style="font-size:12.8px">3)
If not, are these features
planned ?</div>
<div style="font-size:12.8px"><br>
</div>
<div style="font-size:12.8px"><br>
</div>
<div style="font-size:12.8px">Thanks
for your help !</div>
<div style="font-size:12.8px"><br>
</div>
<div style="font-size:12.8px"><br>
</div>
<div style="font-size:12.8px">David</div>
</div>
</div>
<br>
</div>
</div>
<span>______________________________<wbr>_________________<br>
gdal-dev mailing list<br>
<a moz-do-not-send="true"
href="mailto:gdal-dev@lists.osgeo.org"
target="_blank">gdal-dev@lists.osgeo.org</a><br>
<a moz-do-not-send="true"
href="http://lists.osgeo.org/mailman/listinfo/gdal-dev"
target="_blank">http://lists.osgeo.org/mailman<wbr>/listinfo/gdal-dev</a><br>
<br>
</span></div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br>
<br>
</div>
</div>
<br>
______________________________<wbr>_________________<br>
gdal-dev mailing list<br>
<a moz-do-not-send="true"
href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
<a moz-do-not-send="true"
href="http://lists.osgeo.org/mailman/listinfo/gdal-dev"
rel="noreferrer" target="_blank">http://lists.osgeo.org/<wbr>mailman/listinfo/gdal-dev</a><br>
</blockquote>
</div>
</div>
</blockquote>
<br>
<br /> <table style="border-top: 1px solid #D3D4DE;">
<tr>
<td style="width: 55px; padding-top: 18px;"><a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient" target="_blank"><img src="https://ipmcdn.avast.com/images/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif" width="46" height="29" style="width: 46px; height: 29px;" /></a></td>
<td style="width: 470px; padding-top: 17px; color: #41424e; font-size: 13px; font-family: Arial, Helvetica, sans-serif; line-height: 18px;">Garanti sans virus. <a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient" target="_blank" style="color: #4453ea;">www.avast.com</a> </td>
</tr>
</table>
</body>
</html>