On Mon, Aug 6, 2012 at 6:59 PM, Al Vigil <[email protected]> wrote:
> I am a new to Geoserver, just getting acquainted with the program. I am
> trying to create a style that combines scale and a property, but am having a
> little bit of trouble. The idea is to display points with a graphic that
> depends on the type (restaurant, hotel, gas station, Airport, etc.) and
> scale (Airports display in small-scale maps, but not restaurants, for
> instance. All points are in a single shp file. I am successful if I try one
> of the other condition by itself, but have not found a way of combining the
> two. The <And> element does not seem to work form combinining the two
> conditions. If anybody out there has solved this problem, please help me
> out.

Something like:

<Rule>
        <Filter>
          <PropertyIsBetween>
            <PropertyName>PERSONS</PropertyName>
            <LowerBoundary>
              <Literal>2000000</Literal>
            </LowerBoundary>
            <UpperBoundary>
              <Literal>4000000</Literal>
            </UpperBoundary>
          </PropertyIsBetween>
        </Filter>
        <MinScaleDenominator>32000</MinScaleDenominator>
       <MaxScaleDenominator>64000</MaxScaleDenominator>
     ...
</Rule>

Should do the trick. They don't need to be and-ed, just list them side by
side following the SLD schema order.

You should really just have a look at the SLD specification:
http://portal.opengeospatial.org/files/?artifact_id=1188

Or if you are proficient with XML schema, see the schema here:
http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd

Cheers
Andrea

-- 
==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for
more information.
==

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax:   +39 0584 962313
mob:   +39  339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to