<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style>body { line-height: 1.5; }blockquote { margin-top: 0px; margin-bottom: 0px; margin-left: 0.5em; }p { margin-top: 0px; margin-bottom: 0px; }body { font-size: 10.5pt; font-family: 'Microsoft YaHei UI'; color: rgb(0, 0, 0); line-height: 1.5; }body { font-size: 10.5pt; font-family: 'Microsoft YaHei UI'; color: rgb(0, 0, 0); line-height: 1.5; }</style>
</head>
<body>
<div><span></span>
<p style="margin: 0px; padding: 0px; border: 0px; font-variant-ligatures: normal; font-stretch: inherit; line-height: inherit; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; font-size: 15px; vertical-align: baseline; box-sizing: inherit; clear: both; color: rgb(36, 39, 41); orphans: 2; widows: 2; background-color: rgba(248, 248, 248, 0.6);">
I need to export label to dxf from postgresql by ogr2ogr command, label information is text field in PG, but it is always unsuccessful, I always lose the text label information.</p>
<blockquote style="margin: 0px 0px 0px 0.5em; padding: 10px; border-width: 0px; border-top-style: initial; border-right-style: initial; border-bottom-style: initial; border-left-style: solid; border-top-color: initial; border-right-color: initial; border-bottom-color: initial; border-left-color: transparent; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; font-variant-ligatures: normal; font-stretch: inherit; line-height: inherit; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; font-size: 15px; vertical-align: baseline; quotes: none; box-sizing: inherit; color: rgb(36, 39, 41); orphans: 2; widows: 2; background-color: rgb(238, 238, 238);">
<h2 style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: 400; font-stretch: inherit; line-height: 1.3; font-family: inherit; font-size: 19px; vertical-align: baseline; box-sizing: inherit; word-wrap: break-word;">
Those commands are here:</h2>
<blockquote style="margin: 0px 0px 0px 0.5em; padding: 10px; border-width: 0px; border-top-style: initial; border-right-style: initial; border-bottom-style: initial; border-left-style: solid; border-top-color: initial; border-right-color: initial; border-bottom-color: initial; border-left-color: transparent; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; quotes: none; box-sizing: inherit;">
<p style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; clear: both;">
ogr2ogr -f "DXF" "demo.dxf" "PG:host=localhost user=postgres dbname=demo pas sword=xxxx port=5432" -sql "SELECT geom, 'LABEL(f:\'Times New Roman\',s:12pt,t:\'' || text || '\')' AS OGR_STYLE FROM demo"</p>
<p style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; clear: both;">
ogr2ogr -select 'text' -f "DXF" "demo.dxf" "PG:host=localhost user=postgres dbname=demo pas sword=xxxx port=5432" "demo"</p>
</blockquote>
</blockquote>
</div>
<div><br>
</div>
<div><span style="color: rgb(36, 39, 41); font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; font-size: 15px; font-variant-ligatures: normal; orphans: 2; widows: 2; background-color: rgba(248, 248, 248, 0.6);">PG Fields are here:</span></div>
<div><span style="color: rgb(36, 39, 41); font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; font-size: 15px; font-variant-ligatures: normal; orphans: 2; widows: 2; background-color: rgba(248, 248, 248, 0.6);"> </span><a href="https://i.stack.imgur.com/0g5h6.png" rel="nofollow noreferrer" style="margin: 0px; padding: 0px; border: 0px; font-variant-ligatures: normal; font-stretch: inherit; line-height: inherit; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; font-size: 15px; vertical-align: baseline; box-sizing: inherit; color: rgb(53, 141, 170); text-decoration: none; cursor: pointer; orphans: 2; widows: 2; background-color: rgba(248, 248, 248, 0.6);"><img src="https://i.stack.imgur.com/0g5h6.png" alt="PG Fields And Values" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; max-width: 100%;"></a></div>
<div><br>
</div>
<div><span style="color: rgb(36, 39, 41); font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; font-size: 15px; font-variant-ligatures: normal; orphans: 2; widows: 2; background-color: rgba(248, 248, 248, 0.6);">What is wrong with those commands? Any
Help? Thanks</span></div>
<hr style="width: 210px; height: 1px;" color="#b5c4df" size="1" align="left">
<div><span>
<div style="MARGIN: 10px; FONT-FAMILY: verdana; FONT-SIZE: 10pt">
<div>giserliang@hotmail.com</div>
</div>
</span></div>
</body>
</html>