<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Joaquim,</p>
<p>The GeoPackage format only supports one geometry field per layer.
and the QGIS OGR provider doesn't know currently how to handle
several geometry fields per layer too</p>
<p>To do what you want, you need to explictly select the desired
geometry field name with:<br>
</p>
<p>ogr2ogr out.gpkg world-administrative-boundaries.parquet -sql
"select geo_shape, * from \"world-administrative-boundaries\""</p>
<p>Actually if you outputted to a format that supports several
geometry fields per layer (let's say PostGIS), the above wouldn't
work. You would need to exclude the geometry fields from the
wildcard * selection with:<br>
</p>
<p>ogr2ogr out.gpkg world-administrative-boundaries.parquet -sql
"select geo_shape, * exclude (geo_point_2D, geo_shape) from
\"world-administrative-boundaries\""<br>
<br>
</p>
<p>Even<br>
</p>
<div class="moz-cite-prefix">Le 19/07/2024 à 16:58, Joaquim Manuel
Freire Luís via gdal-dev a écrit :<br>
</div>
<blockquote type="cite"
cite="mid:GVXPR04MB99263661C7DD2D2CB056C316A6AD2@GVXPR04MB9926.eurprd04.prod.outlook.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:Aptos;}p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Aptos",sans-serif;
mso-ligatures:standardcontextual;}a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#467886;
text-decoration:underline;}span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Aptos",sans-serif;
color:windowtext;}.MsoChpDefault
{mso-style-type:export-only;
font-size:11.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"><span lang="PT">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="PT"><o:p> </o:p></span></p>
<p class="MsoNormal">I finally managed to build a working GDAL
with the arrow/parquet driver and I’m now trying to convert
this file<o:p></o:p></p>
<p class="MsoNormal">(<a
href="https://public.opendatasoft.com/api/explore/v2.1/catalog/datasets/world-administrative-boundaries/exports/parquet?lang=en&timezone=Europe%2FLondon"
moz-do-not-send="true">https://public.opendatasoft.com/api/explore/v2.1/catalog/datasets/world-administrative-boundaries/exports/parquet?lang=en&timezone=Europe%2FLondon</a>)<o:p></o:p></p>
<p class="MsoNormal">but can only extract the “Point”, not the
“Multi polygon”<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">ogrinfo
world-administrative-boundaries.parquet<o:p></o:p></p>
<p class="MsoNormal">INFO: Open of
`world-administrative-boundaries.parquet'<o:p></o:p></p>
<p class="MsoNormal"> using driver `Parquet' successful.<o:p></o:p></p>
<p class="MsoNormal">1: world-administrative-boundaries (Point,
Multi Polygon)<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">This gets only the points<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">ogr2ogr lixo.gpkg
world-administrative-boundaries.parquet<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">The same happens if I open the file in
QGis. Points only, no polygons.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">But if I do an ogrinfo -al, it prints all
data in file.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">ogrinfo -al
world-administrative-boundaries.parquet<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">….<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">OGRFeature(world-administrative-boundaries):255<o:p></o:p></p>
<p class="MsoNormal"> iso3 (String) = GIB<o:p></o:p></p>
<p class="MsoNormal"> status (String) = UK Non-Self-Governing
Territory<o:p></o:p></p>
<p class="MsoNormal"> color_code (String) = GBR<o:p></o:p></p>
<p class="MsoNormal"> name (String) = Gibraltar<o:p></o:p></p>
<p class="MsoNormal">…<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">So, how can we select in ogr2ogr to extract
the polygons?<o:p></o:p></p>
<p class="MsoNormal"><o:p></o:p></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>