<?xml version="1.0" encoding="UTF-8"?>
<sld:UserStyle xmlns:sld="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml">
<sld:Name>Default Styler</sld:Name>
<sld:Title>Estilo Puntos de Alimentacion</sld:Title>
<sld:Abstract></sld:Abstract>
<sld:FeatureTypeStyle>
<sld:Name>name</sld:Name>
<sld:Title>title</sld:Title>
<sld:Abstract>abstract</sld:Abstract>
<sld:FeatureTypeName>Puntos alimentacion</sld:FeatureTypeName>
<sld:SemanticTypeIdentifier>generic:geometry</sld:SemanticTypeIdentifier>
<sld:Rule>
<sld:Name>name</sld:Name>
<sld:Title>title</sld:Title>
<sld:Abstract>Abstract</sld:Abstract>
<ogc:Filter>
<ogc:And>
<ogc:PropertyIsEqualTo>
<ogc:Literal>Alimentacion 1</ogc:Literal>
<ogc:PropertyName>tipo_alimentacion</ogc:PropertyName>
</ogc:PropertyIsEqualTo>
<ogc:null>
<ogc:PropertyName>modified</ogc:PropertyName>
<ogc:Literal>3</ogc:Literal>
</ogc:null>
</ogc:And>
</ogc:Filter>
<sld:PointSymbolizer>
<sld:Graphic>
<sld:Mark>
<sld:WellKnownName>square</sld:WellKnownName>
<sld:Fill>
<sld:CssParameter name="fill">
<ogc:Literal>#000099</ogc:Literal>
</sld:CssParameter>
<sld:CssParameter name="fill-opacity">
<ogc:Literal>1.0</ogc:Literal>
</sld:CssParameter>
</sld:Fill>
<sld:Stroke>
<sld:CssParameter name="stroke">
<ogc:Literal>#000000</ogc:Literal>
</sld:CssParameter>
<sld:CssParameter name="stroke-linecap">
<ogc:Literal>butt</ogc:Literal>
</sld:CssParameter>
<sld:CssParameter name="stroke-linejoin">
<ogc:Literal>miter</ogc:Literal>
</sld:CssParameter>
<sld:CssParameter name="stroke-opacity">
<ogc:Literal>1</ogc:Literal>
</sld:CssParameter>
<sld:CssParameter name="stroke-width">
<ogc:Literal>1</ogc:Literal>
</sld:CssParameter>
<sld:CssParameter name="stroke-dashoffset">
<ogc:Literal>0</ogc:Literal>
</sld:CssParameter>
</sld:Stroke>
</sld:Mark>
<sld:Opacity>
<ogc:Literal>1.0</ogc:Literal>
</sld:Opacity>
<sld:Size>
<ogc:Literal>8</ogc:Literal>
</sld:Size>
<sld:Rotation>
<ogc:Literal>0.0</ogc:Literal>
</sld:Rotation>
</sld:Graphic>
</sld:PointSymbolizer>
</sld:Rule>
</sld:FeatureTypeStyle>
</sld:UserStyle>
Thanks,
Antonio
2006/8/1, Cory Horner <[EMAIL PROTECTED]>:
Hi Antonio,
Could you attach your SLD?... i'll try to reproduce the issue and figure
out what the offending code is.
Thanks,
Cory.
----
Antonio Grassi wrote:
> Hello. I've a problem generating the XML of a SLD from instances of
> styles using the SLDTransformer. In some point in my code, I have
> something like this:
>
> SLDParser sldParser = new SLDParser(new StyleFactoryImpl());
> FilterFactory ff = new FilterFactoryImpl();
> FeatureTypeStyle fts;
> Style style;
> SLDTransformer sldTransformer = new SLDTransformer();
>
>
> CompareFilter f = ff.createCompareFilter(Filter.COMPARE_NOT_EQUALS);
> LiteralExpression val =
> ff.createLiteralExpression(DELETED_ATTRIBUTE); // DELETED_ATTRIBUTE
> and MODIFIED_ATTR are constants defined elsewhere
> f.addLeftValue(ff.createAttributeExpression(MODIFIED_ATTR));
> f.addRightValue (val);
>
>
> sldParser.setInput(url); // A predefined URL
> style = sldParser.readXML()[0];
>
> fts = style.getFeatureTypeStyles()[0];
> rule = fts.getRules()[0];
> rule.setFilter(f);
>
> sldTransformer.transform(style, fileWriter); // fileWriter created
> elsewhere
>
>
> Well, when I look into the generated XML, in the section corresponding
> to the added filter, i get
>
> <ogc:Filter>
> <ogc:null>
> <ogc:PropertyName>modified</ogc:PropertyName>
> <ogc:Literal>3</ogc:Literal>
> </ogc:null>
> </ogc:Filter>
>
> where, I think, <ogc:null> should be <ogc:PropertyIsEqualTo>
>
> When I parse the XML, an exception is thrown and I can't load the style.
>
> Has anyone ever had this problem before? I have no idea if it's
> something i'm making wrong or no. I'm using geotools 2.2RC3.
>
> Thanks very much,
> Antonio Grassi
------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________ Geotools-gt2-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
