Ticket #305 (new defect)

Opened 5 years ago

Last modified 7 months ago

MAPINFO : 'GetStyleString' returns dot delimited id list

Reported by: dev@geoimage.fr Assigned to: dmorissette
Priority: high Milestone:
Component: OGR_SF Version: unspecified
Severity: normal Keywords:
Cc: mloskot

Description (Last modified by mloskot)

The style string returned by 'GetStyleString' for Mapinfo files
contains pens, brushes and symbols ids separated by dots instead
of commas.
For example :
       PEN(id:"mapinfo-pen-14.ogr-pen-6")
should be
       PEN(id:"mapinfo-pen-14,ogr-pen-6")

The error is located in mitab_feature.cpp in GetPenStyleString, 
GetBrushStyleString and GetSymbolStyleString.

mitab_feature.cpp

const char *ITABFeaturePen::GetPenStyleString()
{
...

    if (strlen(szPattern) != 0)
      pszStyle =CPLSPrintf("PEN(w:%dpx,c:#%6.6x,id:\"mapinfo-pen-%d."
                           "ogr-pen-%d\",p:\"%spx\")",
                           GetPenWidthPixel(),
                           m_sPenDef.rgbColor,GetPenPattern(),nOGRStyle,
                           szPattern);
    else
      pszStyle =CPLSPrintf("PEN(w:%dpx,c:#%6.6x,id:\"mapinfo-pen-%d.ogr-pen-%
d\")",
                           GetPenWidthPixel(),
                           m_sPenDef.rgbColor,GetPenPattern(),nOGRStyle);
...
}

const char *ITABFeatureBrush::GetBrushStyleString()
{
...

    pszStyle =CPLSPrintf("BRUSH(fc:#%6.6x,bc:#%6.6x,id:\"mapinfo-brush-%d.ogr-
brush-%d\")",
                         m_sBrushDef.rgbFGColor,
                         m_sBrushDef.rgbBGColor,
                         m_sBrushDef.nFillPattern,nOGRStyle);
     
...
}

const char *ITABFeatureSymbol::GetSymbolStyleString(double dfAngle)
{
...

    pszStyle=CPLSPrintf("SYMBOL(a:%d,c:#%6.6x,s:%dpt,id:\"mapinfo-sym-%d.ogr-
sym-%d\")",
                        nAngle,
                        m_sSymbolDef.rgbColor,
                        m_sSymbolDef.nPointSize,
                        m_sSymbolDef.nSymbolNo,
                        nOGRStyle);

...
}

Change History

12/22/07 04:03:26 changed by mloskot

  • cc set to mloskot.
  • description changed.