1

I want to edit points size based on the scale and also I want to set up colors based on one attribute column (Quantities in ArcMap, 10 classes).

I already wrote SLD rules for colors, but I don't know how to insert maxscale and minscale for the same points.

For example my SLD looks like this:

<sld:Rule>
          <sld:Name>0,000001 - 0,363959</sld:Name>
          <sld:Title>0,000001 - 0,363959</sld:Title>
          <ogc:Filter>
            <ogc:PropertyIsBetween>
              <ogc:PropertyName>attribute</ogc:PropertyName>
              <ogc:LowerBoundary>
                <ogc:Literal>1E-06</ogc:Literal>
              </ogc:LowerBoundary>
              <ogc:UpperBoundary>
                <ogc:Literal>0.363959</ogc:Literal>
              </ogc:UpperBoundary>
            </ogc:PropertyIsBetween>
          </ogc:Filter>
          <sld:PointSymbolizer>
            <sld:Graphic>
              <sld:Mark>
                <sld:WellKnownName>circle</sld:WellKnownName>
                <sld:Fill>
                  <sld:CssParameter name="fill">#5ABA00</sld:CssParameter>
                  <sld:CssParameter name="fill-opacity">1.0</sld:CssParameter>
                </sld:Fill>
              </sld:Mark>
              <sld:Size>4</sld:Size>
              <sld:Rotation>0</sld:Rotation>
            </sld:Graphic>
          </sld:PointSymbolizer>
        </sld:Rule>
        <sld:Rule>
          <sld:Name>0,363960 - 1,414790</sld:Name>
          <sld:Title>0,363960 - 1,414790</sld:Title>
          <ogc:Filter>
            <ogc:PropertyIsBetween>
              <ogc:PropertyName>attribute</ogc:PropertyName>
              <ogc:LowerBoundary>
                <ogc:Literal>0.36396</ogc:Literal>
              </ogc:LowerBoundary>
              <ogc:UpperBoundary>
                <ogc:Literal>1.41479</ogc:Literal>
              </ogc:UpperBoundary>
            </ogc:PropertyIsBetween>
          </ogc:Filter>
          <sld:PointSymbolizer>
            <sld:Graphic>
              <sld:Mark>
                <sld:WellKnownName>circle</sld:WellKnownName>
                <sld:Fill>
                  <sld:CssParameter name="fill">#83CF00</sld:CssParameter>
                  <sld:CssParameter name="fill-opacity">1.0</sld:CssParameter>
                </sld:Fill>
              </sld:Mark>
              <sld:Size>4</sld:Size>
              <sld:Rotation>0</sld:Rotation>
            </sld:Graphic>
          </sld:PointSymbolizer>
        </sld:Rule>

Where and how do I insert max scale and min scale rule?

The max zoom out must be Australia.

1 Answer 1

1

When in doubt with SLD you should always read the spec or if you are in a hurry and what you want is pretty simple then check out the SLD Cookbook.

In this case the cookbook provides the answer at http://docs.geoserver.org/stable/en/user/styling/sld-cookbook/points.html#zoom-based-point

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.