[Geoserver-users] SLD Rule for Country Borders

Hello Everyone.

I have a layer with countrys information.
I have a simple SLD (at the end) for it that fills the polygon and draw the
surrondings.
All is fine and the result is as espected.

Now, i want to change the SLD for the surroundings of the polygon (stroke),
only gets drawed if it has another polygon adjacent to it.
In short, i only want to draw the countrys borders and not all of it.

i have a property with the country name. I cant distinguish by that, but i
dont know how.
Intercect, touches.. i havent been hable to make this to work.
I dont know how to make a condition that states something like:
my current coutryNameProperty is FR. if i have a polygon next to me with
coutryNameProperty diferent than mine, then draw the border.

Any help will be greatly apreciated.

Regards

<?xml version="1.0" encoding="ISO-8859-1"?>
<StyledLayerDescriptor version="1.0.0"
xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd"
xmlns="http://www.opengis.net/sld&quot; xmlns:ogc="http://www.opengis.net/ogc&quot;
xmlns:xlink="http://www.w3.org/1999/xlink&quot;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;&gt;
  <NamedLayer>
    <Name>countryLayer</Name>
    <UserStyle>
      <Title>countryLayer</Title>
      <Abstract>countryLayer</Abstract>
      <FeatureTypeStyle>
        <Rule>
          <Name>countryLayer</Name>
          
      <ogc:Filter>
        <ogc:PropertyIsGreaterThan>
          <ogc:PropertyName>isLand</ogc:PropertyName>
          <ogc:Literal>0</ogc:Literal>
        </ogc:PropertyIsGreaterThan>
      </ogc:Filter>
      
      <PolygonSymbolizer>
        <Fill>
          <CssParameter name="fill">#F4F4F4</CssParameter>
        </Fill>
        <Stroke>
          <CssParameter name="stroke">#666666</CssParameter>
          <CssParameter name="stroke-width">0.1</CssParameter>
        </Stroke>
          </PolygonSymbolizer>
        </Rule>
      </FeatureTypeStyle>
    </UserStyle>
  </NamedLayer>
</StyledLayerDescriptor>

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/SLD-Rule-for-Country-Borders-tp5107997.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

If you look at the natural earth dataset they have provided separate data files to meet this condition:-

In general these kind of checks are expensive and should be precomputed.

···

Jody Garnett

On Fri, Mar 7, 2014 at 6:16 AM, Filipe <filipesilva1@anonymised.com> wrote:

Hello Everyone.

I have a layer with countrys information.
I have a simple SLD (at the end) for it that fills the polygon and draw the
surrondings.
All is fine and the result is as espected.

Now, i want to change the SLD for the surroundings of the polygon (stroke),
only gets drawed if it has another polygon adjacent to it.
In short, i only want to draw the countrys borders and not all of it.

i have a property with the country name. I cant distinguish by that, but i
dont know how.
Intercect, touches… i havent been hable to make this to work.
I dont know how to make a condition that states something like:
my current coutryNameProperty is FR. if i have a polygon next to me with
coutryNameProperty diferent than mine, then draw the border.

Any help will be greatly apreciated.

Regards

<?xml version="1.0" encoding="ISO-8859-1"?>



countryLayer

countryLayer countryLayer countryLayer

ogc:Filter
ogc:PropertyIsGreaterThan
ogc:PropertyNameisLand</ogc:PropertyName>
ogc:Literal0</ogc:Literal>
</ogc:PropertyIsGreaterThan>
</ogc:Filter>

#F4F4F4 #666666 0.1


View this message in context: http://osgeo-org.1560.x6.nabble.com/SLD-Rule-for-Country-Borders-tp5107997.html
Sent from the GeoServer - User mailing list archive at Nabble.com.


Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works.
Faster operations. Version large binaries. Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk


Geoserver-users mailing list
Geoserver-users@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users