<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@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;}
@font-face
{font-family:"Segoe UI";
panose-1:2 11 5 2 4 2 4 2 2 3;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.Shkpostityyli19
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 2.0cm 70.85pt 2.0cm;}
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]-->
</head>
<body lang="FI" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">I can reproduce the issue with ogr2ogr and this csv file “ogr_styletest.csv”:<br>
<br>
wkt,OGR_STYLE<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">"POINT (1 3)","LABEL(t:""TT"",a: 0,c:#0000ff)"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">Check what we have:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">ogrinfo ogr_styletest.csv -al<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">OGRFeature(ogr_styletest):1<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"> wkt (String) = POINT (1 3)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"> OGR_STYLE (String) = LABEL(t:"TT",a: 0,c:#0000ff)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"> Style = LABEL(t:"TT",a: 0,c:#0000ff)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"> POINT (1 3)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">Convert into MapInfo MIF:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">ogr2ogr -f "MapInfo File" ogr_styletest.mif ogr_styletest.csv<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">What we have now:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">ogrinfo ogr_styletest.mif -al<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">OGRFeature(ogr_styletest):1<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"> wkt (String) = POINT (1 3)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"> OGR_STYLE (String) = LABEL(t:"TT",a: 0,c:#0000ff)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"> Style = SYMBOL(a:0,c:#000000,s:12pt,id:"mapinfo-sym-35,ogr-sym-9")<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"> POINT (1 3)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">The LABEL style is changed into SYMBOL. Label is kept as label if ogr2ogr is set to write out for example OpenJUMP JML format (-f JML).<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">-Jukka Rahkonen-<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b>Lähettäjä:</b> gdal-dev <gdal-dev-bounces@lists.osgeo.org>
<b>Puolesta </b>prashanti seri<br>
<b>Lähetetty:</b> maanantai 1. elokuuta 2022 8.02<br>
<b>Vastaanottaja:</b> gdal-dev@lists.osgeo.org<br>
<b>Aihe:</b> [gdal-dev] unable to export Mapinfo text geom- style always symbol<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p style="margin:0cm"><span style="font-size:10.5pt;font-family:"Segoe UI",sans-serif;color:#242424">Team,<br>
We are exporting a "TextPointGeometry" type feature using GDAL MapInfo driver. Below is the pseudo code -<o:p></o:p></span></p>
<p style="margin:0cm;box-sizing:border-box"><span style="font-size:10.5pt;font-family:"Segoe UI",sans-serif;color:#242424">Driver mapInfoFileDriver = Ogr.GetDriverByName("MapInfo File");<br>
...<br>
Feature mapInfoFeature = CreateFeature(featureData[i].Geometry, mapInfolayer, featureData[i].SpatialRef);<o:p></o:p></span></p>
<p style="margin:0cm;box-sizing:border-box"><span style="font-size:10.5pt;font-family:"Segoe UI",sans-serif;color:#242424">mapInfoFeature.SetStyleString($"LABEL(t:\"TT\",a: 0,c:#0000ff)");<o:p></o:p></span></p>
<p style="margin:0cm;box-sizing:border-box"><span style="font-size:10.5pt;font-family:"Segoe UI",sans-serif;color:#242424"><o:p> </o:p></span></p>
<p style="margin:0cm;box-sizing:border-box"><span style="font-size:10.5pt;font-family:"Segoe UI",sans-serif;color:#242424">Result checked with ogrinfo, observed that style is always SYMBOL, see below -<o:p></o:p></span></p>
<p style="margin:0cm;box-sizing:border-box"><span style="font-size:10.5pt;font-family:"Segoe UI",sans-serif;color:#242424"><o:p> </o:p></span></p>
<p style="margin:0cm;box-sizing:border-box"><span style="font-size:10.5pt;font-family:"Segoe UI",sans-serif;color:#242424">Style = SYMBOL(a:0,c:#000000,s:12pt,id:"mapinfo-sym-35,ogr-sym-10")<o:p></o:p></span></p>
<p style="margin:0cm;box-sizing:border-box"><span style="font-size:10.5pt;font-family:"Segoe UI",sans-serif;color:#242424"><o:p> </o:p></span></p>
<p style="margin:0cm;box-sizing:border-box"><span style="font-size:10.5pt;font-family:"Segoe UI",sans-serif;color:#242424">Are we missing anything or any limitations?<o:p></o:p></span></p>
<p style="margin:0cm;box-sizing:border-box"><span style="font-size:10.5pt;font-family:"Segoe UI",sans-serif;color:#242424"><br>
Regards,<br>
Prashanti<o:p></o:p></span></p>
</div>
</div>
</body>
</html>