[gdal-dev] unable to export Mapinfo text geom- style always symbol

Rahkonen Jukka jukka.rahkonen at maanmittauslaitos.fi
Mon Aug 1 23:08:59 PDT 2022


Hi,

I can reproduce the issue with ogr2ogr and this csv file “ogr_styletest.csv”:

wkt,OGR_STYLE
"POINT (1 3)","LABEL(t:""TT"",a: 0,c:#0000ff)"

Check what we have:
ogrinfo ogr_styletest.csv -al
OGRFeature(ogr_styletest):1
  wkt (String) = POINT (1 3)
  OGR_STYLE (String) = LABEL(t:"TT",a: 0,c:#0000ff)
  Style = LABEL(t:"TT",a: 0,c:#0000ff)
  POINT (1 3)

Convert into MapInfo MIF:
ogr2ogr -f "MapInfo File" ogr_styletest.mif ogr_styletest.csv

What we have now:
ogrinfo ogr_styletest.mif -al
OGRFeature(ogr_styletest):1
  wkt (String) = POINT (1 3)
  OGR_STYLE (String) = LABEL(t:"TT",a: 0,c:#0000ff)
  Style = SYMBOL(a:0,c:#000000,s:12pt,id:"mapinfo-sym-35,ogr-sym-9")
  POINT (1 3)

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).

-Jukka Rahkonen-



Lähettäjä: gdal-dev <gdal-dev-bounces at lists.osgeo.org> Puolesta prashanti seri
Lähetetty: maanantai 1. elokuuta 2022 8.02
Vastaanottaja: gdal-dev at lists.osgeo.org
Aihe: [gdal-dev] unable to export Mapinfo text geom- style always symbol


Team,
We are exporting a "TextPointGeometry" type feature using GDAL MapInfo driver. Below is the pseudo code -

Driver mapInfoFileDriver = Ogr.GetDriverByName("MapInfo File");
...
Feature mapInfoFeature = CreateFeature(featureData[i].Geometry, mapInfolayer, featureData[i].SpatialRef);

mapInfoFeature.SetStyleString($"LABEL(t:\"TT\",a: 0,c:#0000ff)");



Result checked with ogrinfo, observed that style is always SYMBOL, see below -



Style = SYMBOL(a:0,c:#000000,s:12pt,id:"mapinfo-sym-35,ogr-sym-10")



Are we missing anything or any limitations?

Regards,
Prashanti
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20220802/802a1df0/attachment-0001.htm>


More information about the gdal-dev mailing list