Interesting. I've found that "Line with Border" works just fine if you use
two LineSymbolisers within the same rule. Using separate <FeatureTypeStyle>
seems over-kill, as that way you also need to set up two rules, two sets of
filters, etc.

If the same layer is overlapping itself, doing it within the same rule
seems optimal. I.e.:

      <se:FeatureTypeStyle>
        <se:Rule>
          <se:MinScaleDenominator>35001</se:MinScaleDenominator>
          <se:MaxScaleDenominator>75000</se:MaxScaleDenominator>
          <se:LineSymbolizer>
            <se:Stroke>
              <se:SvgParameter name="stroke">#000000</se:SvgParameter>
              <se:SvgParameter name="stroke-width">2</se:SvgParameter>
              <se:SvgParameter name="stroke-linejoin">mitre</se:SvgParameter
>
              <se:SvgParameter name="stroke-linecap">butt</se:SvgParameter>
              <se:SvgParameter name="stroke-opacity">0.5</se:SvgParameter>
            </se:Stroke>
          </se:LineSymbolizer>
          <se:LineSymbolizer>
            <se:Stroke>
              <se:SvgParameter name="stroke">#FFB3C1</se:SvgParameter>
              <se:SvgParameter name="stroke-width">1.75</se:SvgParameter>
              <se:SvgParameter name="stroke-linejoin">mitre</se:SvgParameter
>
              <se:SvgParameter name="stroke-linecap">square</se:SvgParameter
>
              <se:SvgParameter name="stroke-opacity">1</se:SvgParameter>
            </se:Stroke>
          </se:LineSymbolizer>
        </se:Rule>
      </se:FeatureTypeStyle>

But of course if using separate layers then separate FeatureTypeStyle works
best.

Cheers.


On 2 July 2013 18:59, Martin Davis <[email protected]> wrote:

> This is documented here:
>
>
> http://docs.geoserver.org/stable/en/user/styling/sld-reference/styles.html#featuretypestyle
>
> and there's an example of a use case ("Cased Roads") here:
>
>
> http://docs.geoserver.org/stable/en/user/styling/sld-cookbook/lines.html#line-with-border
>
>
>
> On Tue, Jul 2, 2013 at 5:29 AM, Jonathan Moules <
> [email protected]> wrote:
>
>> Hi Edward,
>> Awesome, that did it. I didn't know you could have multiple
>> FeatureTypeStyles. Another little tidbit of knowledge.
>>
>> Many thanks!
>>
>> Jonathan
>>
>>
>> On 2 July 2013 13:09, Edward Mac Gillavry <[email protected]>wrote:
>>
>>> Hi Jonathan,
>>>
>>> The approach to achieve the effect you are after is to create multiple
>>> <FeatureTypeStyle> elements, each with different <ogc:Filter> properties.
>>> This forces GeoServer to do another pass of the table and select another
>>> class of roads to be rendered. Here's a rough structure:
>>>
>>> <FeatureTypeStyle>
>>> <ogc:Filter>
>>> Other roads (casing)
>>> </ogc:Filter>
>>> <FeatureTypeStyle>
>>> <FeatureTypeStyle>
>>> <ogc:Filter>
>>> B-roads (casing)
>>> </ogc:Filter>
>>> </FeatureTypeStyle>
>>> <FeatureTypeStyle>
>>> <ogc:Filter>
>>> A-roads (casing)
>>> </ogc:Filter>
>>> </FeatureTypeStyle>
>>> <FeatureTypeStyle>
>>> <ogc:Filter>
>>> Other roads (fill)
>>> </ogc:Filter>
>>> <FeatureTypeStyle>
>>> <FeatureTypeStyle>
>>> <ogc:Filter>
>>> B-roads (fill)
>>> </ogc:Filter>
>>> </FeatureTypeStyle>
>>> <FeatureTypeStyle>
>>> <ogc:Filter>
>>> A-roads (fill)
>>> </ogc:Filter>
>>> </FeatureTypeStyle>
>>> <FeatureTypeStyle>
>>> <ogc:Filter>
>>> Motorways (casing)
>>> </ogc:Filter>
>>> </FeatureTypeStyle>
>>> <FeatureTypeStyle>
>>> <ogc:Filter>
>>> Motorways (fill)
>>> </ogc:Filter>
>>> </FeatureTypeStyle>
>>>
>>> Notice the different approach for the Motorways. This forces the
>>> Motorways to be rendered last, thus on top of all other roads for them to
>>> become genuine freeways (without crossing other roads). If you have some
>>> attribute to indicate a road to be in a tunnel or on a bridge, you can add
>>> more <FeatureTypeStyle> tags with more specific <ogc:Filter>s to the SLD.
>>>
>>> HTH
>>>
>>> Edward
>>> ------------------------------
>>> From: [email protected]
>>> Date: Tue, 2 Jul 2013 12:29:49 +0100
>>> To: [email protected]
>>> Subject: [Geoserver-users] Layer render order within a layer
>>>
>>>
>>> Hi List,
>>>   I have a single dataset of road lines that are of different
>>> classifications and so need to be rendered differently. Because they're all
>>> in the same dataset they're using the same SLD.
>>> My problem is, that I want to determine which roads are on top of which
>>> other roads. As you can see in the attached, I want the red road on top of
>>> the white ones.
>>> How do I accomplish this within a single layer/SLD?
>>> I've tried changing the ordering of the items within the SLD but this
>>> has no effect.
>>>
>>> Or am I going to have to simply use different SLD's?
>>>
>>> Thanks,
>>> Jonathan
>>>
>>> This transmission is intended for the named addressee(s) only and may
>>> contain sensitive or protectively marked material up to RESTRICTED and
>>> should be handled accordingly. Unless you are the named addressee (or
>>> authorised to receive it for the addressee) you may not copy or use it, or
>>> disclose it to anyone else. If you have received this transmission in error
>>> please notify the sender immediately. All email traffic sent to or from us,
>>> including without limitation all GCSX traffic, may be subject to recording
>>> and/or monitoring in accordance with relevant legislation.
>>> ------------------------------------------------------------------------------
>>> This SF.net email is sponsored by Windows: Build for Windows Store.
>>> http://p.sf.net/sfu/windows-dev2dev
>>> _______________________________________________ Geoserver-users mailing
>>> list [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>>>
>>
>>
>> This transmission is intended for the named addressee(s) only and may
>> contain sensitive or protectively marked material up to RESTRICTED and
>> should be handled accordingly. Unless you are the named addressee (or
>> authorised to receive it for the addressee) you may not copy or use it, or
>> disclose it to anyone else. If you have received this transmission in error
>> please notify the sender immediately. All email traffic sent to or from us,
>> including without limitation all GCSX traffic, may be subject to recording
>> and/or monitoring in accordance with relevant legislation.
>>
>>
>> ------------------------------------------------------------------------------
>> This SF.net email is sponsored by Windows:
>>
>> Build for Windows Store.
>>
>> http://p.sf.net/sfu/windows-dev2dev
>> _______________________________________________
>> Geoserver-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>>
>>
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Windows:
>
> Build for Windows Store.
>
> http://p.sf.net/sfu/windows-dev2dev
> _______________________________________________
> Geoserver-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
>

-- 
This transmission is intended for the named addressee(s) only and may 
contain sensitive or protectively marked material up to RESTRICTED and 
should be handled accordingly. Unless you are the named addressee (or 
authorised to receive it for the addressee) you may not copy or use it, or 
disclose it to anyone else. If you have received this transmission in error 
please notify the sender immediately. All email traffic sent to or from us, 
including without limitation all GCSX traffic, may be subject to recording 
and/or monitoring in accordance with relevant legislation.
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to