[Geoserver-users] Sld Point Size based on zoom level

Hi All,

I am trying to create a Style that resize the Points according to Zoom level.
The problem is that the circle size isn´t changing, what i am doing wrong?

Ps: I don´t want to use the MaxScaleDenominator because i don’t want to re-write each rule just for changing the scaleDenominator.

My featureStyle is the following:

Geometry [Point]

rule1

Red Circle Simple Point circle #FF0000 wms_scale_denominator 3000000 2 1

Thanks.

Hi Danilo,

we are using a python script to generate SLDs that fit those needs
(generating a big sld using many rules of course). If you find abetter
way let me know.

Marco

Am 16.10.2014 um 21:26 schrieb Danilo da Silveira Figueira:

Hi All,

I am trying to create a Style that resize the Points according to Zoom
level.
The problem is that the circle size isn´t changing, what i am doing wrong?

Ps: I don´t want to use the MaxScaleDenominator because i don't want
to re-write each rule just for changing the scaleDenominator.

My featureStyle is the following:
<FeatureTypeStyle>
        <Name>Geometry [Point]</Name>
        <Rule>
          <Name>rule1</Name>
          <Title>Red Circle</Title>
          <Abstract>Simple Point</Abstract>
            <PointSymbolizer>
              <Graphic>
                <Mark>
                  <WellKnownName>circle</WellKnownName>
                  <Fill>
                    <CssParameter name="fill">#FF0000</CssParameter>
                  </Fill>
                </Mark>
              <Size>
                <ogc:Function name="if_then_else">
                  <ogc:Function name="lessEqualThan">
                     <ogc:Function name="env">
                      <ogc:Literal>wms_scale_denominator</ogc:Literal>
                    </ogc:Function>
                    <ogc:Literal>3000000</ogc:Literal>
                  </ogc:Function>
                  <ogc:Literal>2</ogc:Literal>
                  <ogc:Literal>1</ogc:Literal>
                </ogc:Function>
              </Size>
            </Graphic>
          </PointSymbolizer>
        </Rule>
      </FeatureTypeStyle>

Thanks.

------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
Best Open Source Mac Front-Ends 2024

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

Thanks Russell!

"
The result was very interesting, exactly what i was searching for! =)

I suspect you need to set the units of measure so the point is always for example, 10 meters across.

Something like

https://wiki.state.ma.us/confluence/display/massgis/GeoServer±+SLD±+Units+of+Measure
"

···

2014-10-16 17:59 GMT-03:00 Danilo da Silveira Figueira <danilomalzao@anonymised.com>:

2014-10-16 17:58 GMT-03:00 Danilo da Silveira Figueira <danilomalzao@anonymised.com>:

Thanks Russell!

The result was very interesting, exactly what i was searching for! =)

2014-10-16 16:41 GMT-03:00 Russell Hore (Amazon) <amazon.uk@anonymised.com>:

I suspect you need to set the units of measure so the point is always for example, 10 meters across.

Something like

https://wiki.state.ma.us/confluence/display/massgis/GeoServer±+SLD±+Units+of+Measure

uom="http://www.opengeospatial.org/se/units/metre

Russ

On 16 Oct 2014, at 20:26, Danilo da Silveira Figueira <danilomalzao@anonymised.com> wrote:

Hi All,

I am trying to create a Style that resize the Points according to Zoom level.
The problem is that the circle size isn´t changing, what i am doing wrong?

Ps: I don´t want to use the MaxScaleDenominator because i don’t want to re-write each rule just for changing the scaleDenominator.

My featureStyle is the following:

Geometry [Point]

rule1

Red Circle Simple Point circle #FF0000 wms_scale_denominator 3000000 2 1

Thanks.


Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Just completing the answer,

To use the ‘wms_scale_denominator’ parameter you have to use the parseDouble function, because for some reason i guess that the result of wms_scale_dominator is interpreted as string.

So the below style will work: ( The color of the points will change when the zoom level is above 7 )

circle wms_scale_denominator 8735660 #008080 #00FF00 2
···

2014-10-16 18:06 GMT-03:00 Russell Hore (Amazon) <amazon.uk@anonymised.com>:

Sorry, I posted this direct, now to theist.

I suspect you need to set the units of measure so the point is always for example, 10 meters across.

Something like

https://wiki.state.ma.us/confluence/display/massgis/GeoServer±+SLD±+Units+of+Measure

uom="http://www.opengeospatial.org/se/units/metre

Russ

On 16 Oct 2014, at 20:26, Danilo da Silveira Figueira <danilomalzao@anonymised.com> wrote:

Hi All,

I am trying to create a Style that resize the Points according to Zoom level.
The problem is that the circle size isn´t changing, what i am doing wrong?

Ps: I don´t want to use the MaxScaleDenominator because i don’t want to re-write each rule just for changing the scaleDenominator.

My featureStyle is the following:

Geometry [Point]

rule1

Red Circle Simple Point circle #FF0000 wms_scale_denominator 3000000 2 1

Thanks.


Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users