Opened 22 years ago

Closed 22 years ago

#74 closed defect (fixed)

OGR - Unable to display text labels from DGN

Reported by: dmorissette Owned by: dmorissette
Priority: high Milestone:
Component: OGR Support Version: 3.5
Severity: normal Keywords:
Cc: ulrich.mueller@…

Description

> Müller Ulrich wrote:
> 
> > - We have not succeeded to display the labels of the DGN with MapServer. Do
> > you have a hint, how to do that?


> Frank Warmerdam wrote:
> >
> > Having looked into it a bit, I see I took a pretty sloppy approach to
> > binding DGN into OGR.  One side effect is that label text is not
> > available as a distinct attribute ... it is buried in the _gv_ogrfs
> > field.  While this field is interpreted by my OpenEV application it doesn't
> > work with MapServer.
> >
> 


Daniel Morissette wrote:
> 
> Someone else reported that issue before as well.  There are 2 possible
> solutions to it:
> 
> 1- Implement GetStyleString() in the DGN driver in OGR to return the
> value of attribute "_gv_ogrfs" ... that would fix the DGN driver for all
> apps that use OGR Feature Styles... only MapServer and OpenEV make use
> of OGR Styles until now AFAIK
> 
> 2- Implement STYLEITEM "<field_name>" in MapServer's OGR link... that's
> on my long-term list and would allow you to do STYLEITEM "_gv_ogrfs".
> Right now, only STYLEITEM AUTO is supported which means use the value
> returned by OGR's GetStyleString() method.
>

Change History (5)

comment:1 by ulrich.mueller@…, 22 years ago

Cc: ulrich.mueller@… added

comment:2 by fwarmerdam, 22 years ago

Daniel, 

I have modified the OGR DGN driver to return the LABEL definition properly 
as the style string.  However, the other graphical characteristics of DGN 
are not returned properly for lines, areas, etc.  In general the DGN style
support is very weak as bound into OGR. 

Note that the LABEL definition returned by OGR for DGN does not include
any size parameter.  This could be added but sizing is a bit tricky in DGN
and would be measured in ground coordinates, not points.  Is this supported by
MapServers handling of style strings?

FYI, I have also changed OpenEV to read the style string and treat it as
_gv_ogrfs within OpenEV.  I now get style info for mapinfo files!  However,
since I don't support PEN, or BRUSH tools in OpenEV it doesn't do much good.


comment:3 by dmorissette, 22 years ago

I'm not sure what would happen if size is not set... you may end up with 0-size 
text in MapServer (or an error relative to that)... not sure.

Note that size set in ground coordinates is supported... that's also what 
MapInfo returns.  The "g" unit suffix is used for that and ORG does the 
conversion automagically.   e.g. LABEL(t:"blah",s:223g,a:45) means a "blah" 
label at 45 degrees and with a height of 223 ground units.    

comment:4 by fwarmerdam, 22 years ago

I have modified the ogrdgnlayer.cpp to also set the text size in the LABEL. 

comment:5 by fwarmerdam, 22 years ago

Resolution: fixed
Status: newclosed
The angle is now also set for DGN text.  I am closing this since DGN labels
now work pretty well. 

Note: See TracTickets for help on using tickets.