Opened 14 years ago

Closed 14 years ago

#3320 closed defect (fixed)

dxf-reader: rotation angle of MText elements should be exposed in OGR Feature Styling

Reported by: neumann Owned by: warmerdam
Priority: normal Milestone: 1.7.0
Component: OGR_SF Version: svn-trunk
Severity: normal Keywords: dxf
Cc:

Description (last modified by warmerdam)

For an AcDbMText-Element the text rotation angle should be exposed in the the Styling string of the OGR-FeatureStyling.

It can be tested with the following three elements of the file fuaggeobau.dxf (Frank should have this file available).

Here is the output of ogrinfo:

OGRFeature(entities):3316
  Layer (String) = 01229
  SubClasses (String) = AcDbEntity:AcDbMText
  ExtendedEntity (String) = { AV_GA_Strassenver_TBL FID: 532  {         0 } }
  Linetype (String) = (null)
  EntityHandle (String) = 3BFC9
  Text (String) = Wilstrasse
  Style = LABEL(f:"Arial",t:"Wilstrasse",s:1.5g,p:5,c:#ffffff)
  POINT : 
OGRFeature(entities):3717
  Layer (String) = 01249
  SubClasses (String) = AcDbEntity:AcDbMText
  ExtendedEntity (String) = { AV_BB_Objektname_TBL FID: 31  {         0 } }
  Linetype (String) = (null)
  EntityHandle (String) = 3C15F
  Text (String) = Aabach
  Style = LABEL(f:"Arial",t:"Aabach",s:2g,p:5,c:#ffffff)
  POINT : 
OGRFeature(entities):3718
  Layer (String) = 01249
  SubClasses (String) = AcDbEntity:AcDbMText
  ExtendedEntity (String) = { AV_BB_Objektname_TBL FID: 33  {         0 } }
  Linetype (String) = (null)
  EntityHandle (String) = 3C160
  Text (String) = Aabach
  Style = LABEL(f:"Arial",t:"Aabach",s:2g,p:5,c:#ffffff)
  POINT : 

There should be an additional "a:" in the Style-string: Style = LABEL(f:"Arial",t:"Aabach",s:2g,p:5,c:#ffffff,a:48.7)

Change History (8)

comment:1 by warmerdam, 14 years ago

Component: defaultOGR_SF
Description: modified (diff)
Keywords: dxf added
Status: newassigned
Version: unspecifiedsvn-trunk

comment:2 by warmerdam, 14 years ago

The problem appears to be that while code 50 (angle of text in radians) in treated properly, the codes 11/21/31 (direction vector of text) is ignored. This element uses 11/21/31 for the text direction.

comment:3 by warmerdam, 14 years ago

Milestone: 1.7.0
Resolution: fixed
Status: assignedclosed

I believe this is fixed in trunk now (r18529 and 18528).

comment:4 by neumann, 14 years ago

Frank, I wonder if the angle values are by accident in radians instead of degrees? According to the OGR feature-style specification - shouldn't they be in degrees, counterclockwise?

I personally don't mind, but it seems to contradict the OGR feature style specification?

comment:5 by warmerdam, 14 years ago

Fix in trunk (r18541)

comment:6 by Even Rouault, 14 years ago

Resolution: fixed
Status: closedreopened

Frank, 2 tests in ogr_dxf.py report now failures and likely need being updated. I think this is due to the recent styling changes.

comment:7 by warmerdam, 14 years ago

The failures seem to be related to my change to the color table, not this ticket. Fixed (r18543).

comment:8 by warmerdam, 14 years ago

Resolution: fixed
Status: reopenedclosed
Note: See TracTickets for help on using tickets.