[Mapserver-users] OGR - How to use STYLEITEM "AUTO" with DGN

Schepel, Menno menno.schepel at tao.es
Mon Apr 19 11:28:35 EDT 2004


Dear all,

Is there anyone that can give me some more input how to use the OGR
STYLEITEM "AUTO" option with DGN files. I studied the HOWTO documents on the
MS homepages but I cannot work out how get my symbol file to work with the
styles that are returned by OGR. I can request the information that is
included in the file with OGRINFO but it is not clear to me how implement
this infomation in a symbol file.

This is (a part) of the OGRINFO


OGRFeature(elements):763
  Type (Integer) = 16
  Level (Integer) = 34
  GraphicGroup (Integer) = 0
  ColorIndex (Integer) = 0
  Weight (Integer) = 0
  Style (Integer) = 0
  EntityNum (Integer) = (null)
  MSLink (Integer) = (null)
  Text (String) = (null)
  Style = PEN(id:"ogr-pen-0",c:#ffffff)
  LINESTRING (421286.127 4591590.409,421286.128 4591590.405,421286.128
4591590.4
01,421286.130 4591590.397,421286.131 4591590.393,421286.133
4591590.389,421286.1
36 4591590.386,421286.138 4591590.383,421286.141 4591590.380,421286.144
4591590.
377)

I would like to visualize the DGN using the AUTOSTYLE. I can visualize using
the default options within MapServ like this:

  LAYER
    STATUS ON
    GROUP DGN
    CONNECTIONTYPE OGR
    CONNECTION "C:\inetpub\wwwroot\vinya\data\xarxa_i07.dgn"
    NAME "Sorea"
    TYPE line
    METADATA
      WMS_TITLE "Sorea DGN"
      WMS_SRS "EPSG:23031"
    END
    PROJECTION
      "init=epsg:23031"
    END
    CLASS
	COLOR 0 0 0
    END
    DUMP TRUE
  END

But, as expected, all lines turn up in black and it is not possible (or very
time consuming to define all classes separately) to use annotation, line
colors etc.

I am using MS 4.0 on windows IIS

Menno Schepel, consultor GIS
-------------------------------------------------
TAO - grupo gedas
Desarrollo Public Sector
Passeig de Gràcia
88 Pral, 08008 Barcelona
España/Spain
T: +34 - 93 496 1111 ext. 245
M: +34 - 609 831 859
F: +34 - 93 487 36 46
E: Menno.Schepel at tao.es
I: http://www.tao.es
 --------------------------------------------------






More information about the mapserver-users mailing list