<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Andrew,</p>
<p>the GMLAS driver will fetch it as a string:</p>
<p>$ ogrinfo GMLAS:input.gml -oo remove_unused_layers=yes -al -q<br>
Warning 1: Unhandled type: gMonthDay<br>
Warning 1: Unhandled type: gMonthDay<br>
<br>
Layer name: departedfeature<br>
OGRFeature(departedfeature):1<br>
ogr_pkid (String) =
FDD58DEB0E04A917AB5BAEA4DFA65C70_DepartedFeature_1<br>
fid (String) = osgb1000000849991256<br>
osgb_boundedby_box_srsname (String) = osgb:BNG<br>
osgb_boundedby_box_coordinates_decimal (String) = .<br>
osgb_boundedby_box_coordinates_cs (String) = ,<br>
osgb_boundedby_box_coordinates_ts (String) = <br>
osgb_boundedby_box_coordinates (String) = 254337.630,617076.680
254337.630,617076.680<br>
theme (StringList) = (1:Roads Tracks And Paths)<br>
reasonfordeparture (String) = Deleted<br>
deletiondate (Date) = 2022/09/26</p>
<p>Even<br>
</p>
<p><br>
</p>
<div class="moz-cite-prefix">Le 22/12/2022 à 14:48, Andrew Terry a
écrit :<br>
</div>
<blockquote type="cite"
cite="mid:AM6PR01MB4946C63FDE0379FDA9E01B48A1E89@AM6PR01MB4946.eurprd01.prod.exchangelabs.com">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<style>@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}span.EmailStyle20
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}div.WordSection1
{page:WordSection1;}</style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal">Hi Jukka,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks for responding and apologies for not
including enough context.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I’m converting GML into a SQL file form
during testing using a command like:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">ogr2ogr --config GML_GFS_TEMPLATE test.gfs
--config PG_USE_COPY YES -skipfailures -lco spatial_index=NONE
-lco create_table=off -lco schema=test -lco create_schema=off
-f PGDump output.sql input.gml<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">An example GML with one feature would be:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><?xml version='1.0' encoding='UTF-8'
standalone='yes'?><o:p></o:p></p>
<p class="MsoNormal"><osgb:FeatureCollection
xmlns:osgb='<a class="moz-txt-link-freetext" href="http://www.ordnancesurvey.co.uk/xml/namespaces/osgb">http://www.ordnancesurvey.co.uk/xml/namespaces/osgb</a>'
xmlns:xsi='<a class="moz-txt-link-freetext" href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance</a>'
xmlns:xs='<a class="moz-txt-link-freetext" href="http://www.w3.org/2001/XMLSchema">http://www.w3.org/2001/XMLSchema</a>'
xmlns:gml='<a class="moz-txt-link-freetext" href="http://www.opengis.net/gml">http://www.opengis.net/gml</a>'
xmlns:xlink='<a class="moz-txt-link-freetext" href="http://www.w3.org/1999/xlink">http://www.w3.org/1999/xlink</a>'
xsi:schemaLocation='<a class="moz-txt-link-freetext" href="http://www.ordnancesurvey.co.uk/xml/namespaces/osgb">http://www.ordnancesurvey.co.uk/xml/namespaces/osgb</a>
<a
href="http://www.ordnancesurvey.co.uk/xml/schema/v9/OSDNFFeatures.xsd"
moz-do-not-send="true" class="moz-txt-link-freetext">
http://www.ordnancesurvey.co.uk/xml/schema/v9/OSDNFFeatures.xsd</a>'
fid='LOCAL_ID_0'><o:p></o:p></p>
<p class="MsoNormal"><gml:description>Ordnance Survey, (c)
Crown Copyright. All rights reserved,
2022-10-27</gml:description><o:p></o:p></p>
<p class="MsoNormal"><gml:boundedBy><o:p></o:p></p>
<p class="MsoNormal"><gml:null>unknown</gml:null><o:p></o:p></p>
<p class="MsoNormal"></gml:boundedBy><o:p></o:p></p>
<p class="MsoNormal"><osgb:queryTime>2022-10-27T00:10:00</osgb:queryTime><o:p></o:p></p>
<p class="MsoNormal"><osgb:queryChangeSinceDate>2022-09-15</osgb:queryChangeSinceDate>
<o:p></o:p></p>
<p class="MsoNormal"><osgb:departedMember><o:p></o:p></p>
<p class="MsoNormal"><osgb:DepartedFeature
fid='osgb1000000849991256'><o:p></o:p></p>
<p class="MsoNormal"><osgb:boundedBy><o:p></o:p></p>
<p class="MsoNormal"><gml:Box srsName='osgb:BNG'><o:p></o:p></p>
<p class="MsoNormal"><gml:coordinates>254337.630,617076.680
254337.630,617076.680</gml:coordinates><o:p></o:p></p>
<p class="MsoNormal"></gml:Box><o:p></o:p></p>
<p class="MsoNormal"></osgb:boundedBy><o:p></o:p></p>
<p class="MsoNormal"><osgb:theme>Roads Tracks And
Paths</osgb:theme><o:p></o:p></p>
<p class="MsoNormal"><osgb:reasonForDeparture>Deleted</osgb:reasonForDeparture><o:p></o:p></p>
<p class="MsoNormal"><osgb:deletionDate>2022-09-26</osgb:deletionDate><o:p></o:p></p>
<p class="MsoNormal"></osgb:DepartedFeature><o:p></o:p></p>
<p class="MsoNormal"></osgb:departedMember><o:p></o:p></p>
<p class="MsoNormal"></osgb:FeatureCollection><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">It defines an item’s unique fid and some
basic attributes along with the “Box” as a bounding box /
envelope indication of its location.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Ultimately, the purpose is to form an
indication of a feature to be deleted – in this case a point
but not always.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">ogr2ogr will load the data but doesn’t
understand the geometry type – and I note a bounding box
doesn’t seem to be mentioned under types in the documentation<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">A positive result would be any way to
retain the content of gml:coordinates as a geometry or even as
text which I could then handle within postgres as something I
could turn into a geometry. My assumption has been that I
would need to modify the gfs created by org2ogr to try and
explicitly pull this element out<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Andy<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div style="border:none;border-top:solid #E1E1E1
1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span
style="mso-fareast-language:EN-GB" lang="EN-US">From:</span></b><span
style="mso-fareast-language:EN-GB" lang="EN-US">
Rahkonen Jukka
<a class="moz-txt-link-rfc2396E" href="mailto:jukka.rahkonen@maanmittauslaitos.fi"><jukka.rahkonen@maanmittauslaitos.fi></a>
<br>
<b>Sent:</b> 22 December 2022 13:20<br>
<b>To:</b> Andrew Terry
<a class="moz-txt-link-rfc2396E" href="mailto:andrew.terry@centremaps.co.uk"><andrew.terry@centremaps.co.uk></a>;
<a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
<b>Subject:</b> Re: ogr gml Box handling<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span lang="FI">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="FI"> <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Sorry but I do not
understand at all what you want to do. Would you, if you
read your question?</span><span lang="FI"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Do you have some GML
data that has a bounding box for each feature and you would
like to convert the bbox into something? Would that be a
second geometry for the attribute if the target format
supports multiple geometries? Or an attribute that contains
the bbox expressed as WKT of GeoJSON? Please give complete
GML test data sample and an example about what would be the
ideal result.</span><span lang="FI"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> </span><span lang="FI"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">In your example the
bounding box seems to be a point so probably the data
contains also just one point but probably you want to deal
with more generic data.</span><span lang="FI"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> </span><span lang="FI"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">-Jukka Rahkonen-</span><span
lang="FI"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> </span><span lang="FI"><o:p></o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1
1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span
style="mso-fareast-language:FI" lang="FI">Lähettäjä:</span></b><span
style="mso-fareast-language:FI" lang="FI"> gdal-dev <<a
href="mailto:gdal-dev-bounces@lists.osgeo.org"
moz-do-not-send="true" class="moz-txt-link-freetext">gdal-dev-bounces@lists.osgeo.org</a>>
<b>Puolesta </b>Andrew Terry<br>
<b>Lähetetty:</b> torstai 22. joulukuuta 2022 15.08<br>
<b>Vastaanottaja:</b> <a
href="mailto:gdal-dev@lists.osgeo.org"
moz-do-not-send="true" class="moz-txt-link-freetext">gdal-dev@lists.osgeo.org</a><br>
<b>Aihe:</b> [gdal-dev] ogr gml Box handling</span><span
lang="FI"><o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><span lang="FI"> <o:p></o:p></span></p>
<p class="MsoNormal">Hi,<span lang="FI"><o:p></o:p></span></p>
<p class="MsoNormal"> <span lang="FI"><o:p></o:p></span></p>
<p class="MsoNormal">Trying to pull in the bounding box /
envelope “Box” when loading gml with ogr2ogr<span lang="FI"><o:p></o:p></span></p>
<p class="MsoNormal"> <span lang="FI"><o:p></o:p></span></p>
<p class="MsoNormal"><osgb:boundedBy><span lang="FI"><o:p></o:p></span></p>
<p class="MsoNormal"><gml:Box srsName='osgb:BNG'><span
lang="FI"><o:p></o:p></span></p>
<p class="MsoNormal"><gml:coordinates>257023.700,620210.000
257023.700,620210.000</gml:coordinates><span lang="FI"><o:p></o:p></span></p>
<p class="MsoNormal"></gml:Box><span lang="FI"><o:p></o:p></span></p>
<p class="MsoNormal"></osgb:boundedBy><span lang="FI"><o:p></o:p></span></p>
<p class="MsoNormal"> <span lang="FI"><o:p></o:p></span></p>
<p class="MsoNormal">I’ve tried
<GeometryElementPath>boundedBy</GeometryElementPath>
in my gfs file.<span lang="FI"><o:p></o:p></span></p>
<p class="MsoNormal"> <span lang="FI"><o:p></o:p></span></p>
<p class="MsoNormal">I’ve also tried seeing if I can pull
through as a string using:<span lang="FI"><o:p></o:p></span></p>
<p class="MsoNormal"> <span lang="FI"><o:p></o:p></span></p>
<p class="MsoNormal"> <PropertyDefn><span lang="FI"><o:p></o:p></span></p>
<p class="MsoNormal"> <Name>bbox</Name><span
lang="FI"><o:p></o:p></span></p>
<p class="MsoNormal">
<ElementPath>boundedBy|Box|coordinates</ElementPath><span
lang="FI"><o:p></o:p></span></p>
<p class="MsoNormal"> <Type>String</Type><span
lang="FI"><o:p></o:p></span></p>
<p class="MsoNormal"> </PropertyDefn><span lang="FI"><o:p></o:p></span></p>
<p class="MsoNormal"> <span lang="FI"><o:p></o:p></span></p>
<p class="MsoNormal">Any tips – if it’s even possible?<span
lang="FI"><o:p></o:p></span></p>
<p class="MsoNormal"> <span lang="FI"><o:p></o:p></span></p>
<p class="MsoNormal">Thanks<span lang="FI"><o:p></o:p></span></p>
<p class="MsoNormal"> <span lang="FI"><o:p></o:p></span></p>
<p class="MsoNormal">Andy<span lang="FI"><o:p></o:p></span></p>
</div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
gdal-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/gdal-dev">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
<a class="moz-txt-link-freetext" href="http://www.spatialys.com">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
</body>
</html>