MapServer / MapServer-import

3 stars 2 forks source link

OGR - Unable to display text labels from DGN #74

Closed tbonfort closed 12 years ago

tbonfort commented 12 years ago

Reporter: dmorissette Date: 2001/11/09 - 17:05

> 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.
>
tbonfort commented 12 years ago

Author: fwarmerdam Date: 2001/11/09 - 18:24

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.
tbonfort commented 12 years ago

Author: dmorissette Date: 2001/11/09 - 18:43

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.    
tbonfort commented 12 years ago

Author: fwarmerdam Date: 2001/11/09 - 19:18

I have modified the ogrdgnlayer.cpp to also set the text size in the LABEL. 
tbonfort commented 12 years ago

Author: fwarmerdam Date: 2002/01/18 - 19:46

The angle is now also set for DGN text.  I am closing this since DGN labels
now work pretty well.