Hallo list,

I don't believe this will get you the desired effect. You'll get the lines but you'll also get the line end caps.
Yes, this was the problem


>>thanks, but unfortunately the rendering of bridges are not configured there.

OK, but you would do bridges similar to tunnels. So look at the tunnels and adjust your styling to match what you want.

-Steve W
You are right! I did so and got the solution:

SYMBOL
   NAME bridge
   TYPE SIMPLE
END


STYLE
 WIDTH 29
 SYMBOL "bridge"
 OUTLINEWIDTH 1
 OUTLINECOLOR "#24277A"
END
 STYLE
 WIDTH 27
 COLOR 255 195 69
END

The trick was SYMBOL SIMPLE, which is not really documented on the official docu (http://mapserver.org/mapfile/symbol.html):

TYPE [vector|ellipse|pixmap|truetype|simple|cartoline|hatch]

        * vector: a simple drawing is used to define the shape of the
          symbol.
        * ellipse: radius values in the x and y directions define an
          ellipse.
        * pixmap: a user supplied GIF image will be used as the symbol.
        * truetype: TrueType font to use as defined in the FONTSET.
        * cartoline: allows for different designs of line ends
          (mitered, rounded, beveled). More information can be found
          in the /Cartographic Symbols document/
          
<http://mapserver.org/mapfile/symbology/construction.html#sym-construction>.
        * hatch: produces hatched lines throughout the shape.


Thanks!

Tom




Stephen Woodbridge wrote:
This is just from memory (haven't tried it, but something like this should work wit agg on 5.6

bridge gets a solid black outline
tunnel gets a dashed black outline
others get a normal rendition

Try playing with this

LAYER
  CLASS  # if its a bridge draw it here
    EXPRESSION ("[bridge]" == "yes")
    STYLE
      COLOR "#888888"
      WIDTH 11
      OUTLINECOLOR "#000000"
      OUTLINEWIDTH 3
    END
    STYLE
      COLOR "#DDDDDD"
      WIDTH 9
    END
  END
  CLASS # else if it is a tunnel draw it here
    EXPRESSION ("[tunnel]" == "yes")
    STYLE
      COLOR "#000000"
      SYMBOL "dash"
      WIDTH 17
    END
    STYLE
      COLOR "#888888"
      WIDTH 11
    END
    STYLE
      COLOR "#DDDDDD"
      WIDTH 9
    END
  END  CLASS # otherwise draw it here
    STYLE
    STYLE
      COLOR "#888888"
      WIDTH 11
    END
    STYLE
      COLOR "#DDDDDD"
      WIDTH 9
    END
  END
END


-Steve W
 http://imaptools.com/

Lime, Steve D (DNR) wrote:
Good idea. The width of the bridge would have to be larger than the road so it sticks out a bit at well…

*From:* [email protected] [mailto:[email protected]] *On Behalf Of *Christy Nieman
*Sent:* Wednesday, February 03, 2010 12:13 PM
*To:* [email protected]
*Subject:* Re: [mapserver-users] Rendering bridges

Hi,

If you draw it in two layers, one with the colour and width you want for the bridges, and the other with the road line to go on top, you will essentially cover up the end caps. The bridges layer would have to come first in the mapfile, followed by the road line layer.

Christy
--
Christy Nieman
GIS Technician
DM Solutions Group, Inc.
Email: [email protected] <mailto:[email protected]>
Web: http://dmsolutions.ca
Web: http://research.dmsolutions.ca

On 02/03/2010 12:52 PM, Lime, Steve D (DNR) wrote:

I don't believe this will get you the desired effect. You'll get the lines but you'll also get the line end caps. That's the real trick, turning those off. I'm not sure that you can.

Steve

-----Original Message-----

From: Fawcett, David (MPCA)
Sent: Wednesday, February 03, 2010 10:13 AM

To: Lime, Steve D (DNR); tommasodb; [email protected] <mailto:[email protected]>

Subject: RE: [mapserver-users] Rendering bridges

The feature that he is referencing is just a line segment with an additional attribute of 'bridge=yes'.
    * bridge: yes

    * highway: trunk

    * layer: 1

    * name: Manchester Road

    * ref: A56

If you just wanted to use the road data and not create an additional bridges data set, you would likely need to split up the road features so that the segment that is a bridge is an individual feature. I haven't worked with any shapefile extracts from OSM, so the data may already be like this. Assuming that you have a line shapefile that has a column called 'bridge', you could set up two classes in your roads layer. The first one would have an expression like ('[bridge] = 'yes') and the second class wouldn't have an expression so it would catch the rest of the lines. In the first class, you would stack two lines, the bottom one being the color of your bridge and wider than the roads line that will go on top of it.

David.

-----Original Message-----

From: [email protected] <mailto:[email protected]> [mailto:[email protected]] On Behalf Of Lime, Steve D (DNR)

Sent: Wednesday, February 03, 2010 9:50 AM

To: tommasodb; [email protected] <mailto:[email protected]>

Subject: RE: [mapserver-users] Rendering bridges

What feature type are bridges represented with in OpenStreetMap?

-----Original Message-----

From: [email protected] <mailto:[email protected]> [mailto:[email protected]] On Behalf Of tommasodb

Sent: Wednesday, February 03, 2010 6:08 AM

To: [email protected] <mailto:[email protected]>

Subject: [mapserver-users] Rendering bridges

Hallo list,

how can I render road bridges, like in mapnik?

(Example:
http://www.openstreetmap.org/?lat=53.398022&lon=-2.352222&zoom=18&layers=null <http://www.openstreetmap.org/?lat=53.398022&lon=-2.352222&zoom=18&layers=null>)

Which symbol can I use?

Greets,

Tom

___
_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to