[GIS] Point size based on the scale and point color based on the attribute in SLD

sld

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>

So, where to insert max scale and min scale rule? How to insert it? What value to set up (max zoom out must be Australia).

It is pretty emercency, and thank you so much.

Best Answer

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