On Mon, Jul 18, 2011 at 11:09 AM, Gis Mage <[email protected]> wrote: > Hi, list! > I have a point layer which comes from postgis table. > My task is to filter out some features in SLD, for them not to be shown at > smaller scales. > So I make a second <Rule> with a scale denominator and a <ogc:Filter> to > determine if id is odd or even. > <Rule> > <ogc:Filter> > <ogc:Function name="equalTo"> > <!--ogc:Function name="...." what's the function for this?> > <ogc:PropertyName>myid</ogc:PropertyName> > <ogc:Literal>2</ogc:Literal> > <!--/ogc:Function--> > <ogc:Literal>0</ogc:Literal> > </ogc:Function> > </ogc:Filter> > <PointSymbolizer> > But I can't figure out what function to use for that. > To my guess the closest one is name=floor, or some kind of a formula with > <ogc:Div>, or maybe <PropertyIsLike> with some proper parameters. > Can anyone please help me out with that? > Can I use a "fid" property in this formula or I have to make another field > with id's?
Hmmm... I honestly can't think of a way to filter only odd features, with a regular programming language one would use the remainer of the division, but that's a function we don't have. Not hard to add one if you can program in java and have some familiarity with Geotools, if you look in the archives I think I gave some directions on how to do that a few days ago. Cheers Andrea -- ------------------------------------------------------- Ing. Andrea Aime GeoSolutions S.A.S. Tech lead Via Poggio alle Viti 1187 55054 Massarosa (LU) Italy phone: +39 0584 962313 fax: +39 0584 962313 http://www.geo-solutions.it http://geo-solutions.blogspot.com/ http://www.youtube.com/user/GeoSolutionsIT http://www.linkedin.com/in/andreaaime http://twitter.com/geowolf ------------------------------------------------------- ------------------------------------------------------------------------------ AppSumo Presents a FREE Video for the SourceForge Community by Eric Ries, the creator of the Lean Startup Methodology on "Lean Startup Secrets Revealed." This video shows you how to validate your ideas, optimize your ideas and identify your business strategy. http://p.sf.net/sfu/appsumosfdev2dev _______________________________________________ Geoserver-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geoserver-users
