<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hi,</p>
<p>as as follow-up, the mentioned below capacity is now in GDAL
master per <a class="moz-txt-link-freetext" href="https://github.com/OSGeo/gdal/pull/3638">https://github.com/OSGeo/gdal/pull/3638</a><br>
</p>
<p>This is implemented curretly for FileGeodatabase (reading-only,
could be extended on the write side in the FileGDB) and GeoPackage
(read/write).</p>
<p>I guess this could be extended to PostgreSQL too by storing the
enums in an auxiliary table linked through a foreign key.</p>
<p>Even<br>
</p>
<div class="moz-cite-prefix">Le 15/04/2020 à 11:05, Andrea Aime a
écrit :<br>
</div>
<blockquote type="cite"
cite="mid:CA+nxMTtX5rpUdS+BSV7Ethwd4Vk0y9R6pDoauw5eGLRoZwrRxA@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">Hi,
<div>I'm trying to dump a large PostGIS database into a
GeoPackage. In the original database some columns</div>
<div>are strings, but could be more efficiently represented as
enums, as they have a small set of values.</div>
<div><br>
</div>
<div>GeoPackage has a native notion of enums, check the spec and
search for "table 27" for an example:</div>
<div><a href="http://www.geopackage.org/spec/"
moz-do-not-send="true">http://www.geopackage.org/spec/</a><br>
</div>
<div><br>
</div>
<div>However I cannot find mention of them in the GPKG driver
documentation:</div>
<div><a href="https://gdal.org/drivers/vector/gpkg.html"
moz-do-not-send="true">https://gdal.org/drivers/vector/gpkg.html</a><br>
</div>
<div>I quickly grepped into the geopackage sources for "enum",
could not find it in the geopackage sources.</div>
<div><br>
</div>
<div>Also looked at the "mapFieldType" ogr2ogr parameter and at
OGR SQL, did not find anything there either.</div>
<div><br>
</div>
<div>So I'm wondering, is there direct support for enum fields?
Any way to map a string column to enum during</div>
<div>a ogr2ogr call?</div>
<div><br>
</div>
<div><span style="white-space:pre-wrap;font-family:Arial">Best Regards,</span><br>
</div>
<div>
<div dir="ltr" class="gmail_signature"
data-smartmail="gmail_signature">
<div dir="ltr">
<div>
<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">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr"><span>
<p dir="ltr"
style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><font
face="Arial"><span style="white-space:pre-wrap">Andrea Aime</span><span style="font-size:14.6667px;white-space:pre-wrap">
==
GeoServer Professional Services from the experts! Visit <a href="http://goo.gl/it488V" target="_blank" moz-do-not-send="true">http://goo.gl/it488V</a> for more information.
==
Ing. Andrea Aime
@geowolf
Technical Lead
GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549
<a href="http://www.geo-solutions.it" target="_blank" moz-do-not-send="true">http://www.geo-solutions.it</a>
<a href="http://twitter.com/geosolutions_it" target="_blank" moz-do-not-send="true">http://twitter.com/geosolutions_it</a>
-------------------------------------------------------
<i>Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia.
This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail.</i>
</span></font></p>
</span></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></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>