[Portugal] mudar tamanho dos labels no geoserver

Pedro Costa pedrocostaarma sapo.pt
Quarta-Feira, 23 de Novembro de 2011 - 09:48:46 EST


Pedro, tentei o que me mandaste como segue em baixo mas devolve-me este 
erro:

The prefix "ogc" for element "ogc:PropertyName" is not bound.



<TextSymbolizer>
<Label>
<ogc:PropertyName>CODI</ogc:PropertyName>
</Label>
<Font>
<CssParameter name="font-family">Bitstream Vera Sans</CssParameter>
<CssParameter name="font-size">
<ogc:Literal>6</ogc:Literal>
</CssParameter>
<CssParameter name="font-style">Normal</CssParameter>
<CssParameter name="font-weight">Normal</CssParameter>
</Font>
<LabelPlacement>
<PointPlacement>
<AnchorPoint>
<AnchorPointX>0.5</AnchorPointX>
<AnchorPointY>0.5</AnchorPointY>
</AnchorPoint>
</PointPlacement>
</LabelPlacement>
<Halo>
<Radius>
<ogc:Literal>1</ogc:Literal>
</Radius>
<Fill>
<CssParameter name="fill">#FFFFFF</CssParameter>
<CssParameter name="fill-opacity">0.85</CssParameter>
</Fill>
</Halo>
<Fill>
<CssParameter name="fill">
<ogc:PropertyName>#FFFF00</ogc:PropertyName>
</CssParameter>
</Fill>
<VendorOption name="spaceAround">-1</VendorOption>
</TextSymbolizer>




















On 23-11-2011 13:59, Pedro Mendes wrote:
> Sugiro que isoles as situações: despista primeiro o TxtSymbolizer e 
> depois o PointSymbolizer.
> Não é costume ver estas FeatureTypeName, SemanticTypeIdentifier 
> e SemanticTypeIdentifier em exemplos de SLD no Geoserver. Sei que não 
> são obrigatórias. Exeperimenta retira-las.
>
> Segue um exemplo de userstyle com um textsymbolizer que funciona:
>
> <TextSymbolizer>
> <Label>
> <ogc:PropertyName>UM_ATRIBUTO_DA_FEATURE</ogc:PropertyName>
> </Label>
> <Font>
> <CssParameter name="font-family">Bitstream Vera Sans</CssParameter>
> <CssParameter name="font-size">
> <ogc:Literal>6</ogc:Literal>
> </CssParameter>
> <CssParameter name="font-style">Normal</CssParameter>
> <CssParameter name="font-weight">Normal</CssParameter>
> </Font>
> <LabelPlacement>
> <PointPlacement>
> <AnchorPoint>
> <AnchorPointX>0.5</AnchorPointX>
> <AnchorPointY>0.5</AnchorPointY>
> </AnchorPoint>
> </PointPlacement>
> </LabelPlacement>
> <Halo>
> <Radius>
> <ogc:Literal>1</ogc:Literal>
> </Radius>
> <Fill>
> <CssParameter name="fill">#FFFFFF</CssParameter>
> <CssParameter name="fill-opacity">0.85</CssParameter>
> </Fill>
> </Halo>
> <Fill>
> <CssParameter name="fill">
> <ogc:PropertyName>COLOR</ogc:PropertyName>
> </CssParameter>
> </Fill>
> <VendorOption name="spaceAround">-1</VendorOption>
> </TextSymbolizer>
>
>
> 2011/11/23 Pedro Costa <pedrocostaarma  sapo.pt 
> <mailto:pedrocostaarma  sapo.pt>>
>
>     Não funcionou. ATé porque também tentei alterar o tamanho da mark
>     que também tem <ogc:Literal> e não muda nada...
>
>
>     MAis sugestões?
>
>     Obrigado
>
>
>
>
>
>
>
>
>     On 23-11-2011 12:25, Pedro Mendes wrote:
>>     Experimenta colocar tudo o que for valores númericos dentro de um
>>     elemento <ogc:Literal>. Como tens feito para a Rotation e outros.
>>
>>     2011/11/23 Pedro Costa <pedrocostaarma  sapo.pt
>>     <mailto:pedrocostaarma  sapo.pt>>
>>
>>
>>
>>         Então aqui vai:
>>
>>
>>         ml version="1.0" encoding="UTF-8"?>
>>         <sld:StyledLayerDescriptor xmlns="http://www.opengis.net/sld"
>>         <http://www.opengis.net/sld>
>>         xmlns:sld="http://www.opengis.net/sld"
>>         <http://www.opengis.net/sld>
>>         xmlns:ogc="http://www.opengis.net/ogc"
>>         <http://www.opengis.net/ogc>
>>         xmlns:gml="http://www.opengis.net/gml"
>>         <http://www.opengis.net/gml> version="1.0.0">
>>         <sld:UserLayer>
>>         <sld:LayerFeatureConstraints>
>>         <sld:FeatureTypeConstraint/>
>>         </sld:LayerFeatureConstraints>
>>         <sld:UserStyle>
>>         <sld:Name>Default Styler</sld:Name>
>>         <sld:Title/>
>>         <sld:IsDefault>1</sld:IsDefault>
>>         <sld:FeatureTypeStyle>
>>         <sld:Name>simple</sld:Name>
>>         <sld:FeatureTypeName>Feature</sld:FeatureTypeName>
>>         <sld:SemanticTypeIdentifier>generic:geometry</sld:SemanticTypeIdentifier>
>>         <sld:SemanticTypeIdentifier>simple</sld:SemanticTypeIdentifier>
>>         <sld:Rule>
>>         <sld:PointSymbolizer>
>>         <sld:Graphic>
>>         <sld:Mark>
>>         <sld:Fill>
>>         <sld:CssParameter name="fill">#FFFF00</sld:CssParameter>
>>         </sld:Fill>
>>         </sld:Mark>
>>         <sld:Size>
>>         <ogc:Literal>6.0</ogc:Literal>
>>         </sld:Size>
>>         </sld:Graphic>
>>         </sld:PointSymbolizer>
>>         <sld:TextSymbolizer>
>>         <sld:Label>
>>         <ogc:PropertyName>codi</ogc:PropertyName>
>>         </sld:Label>
>>         <sld:Font>
>>         <sld:CssParameter name="font-family">Arial</sld:CssParameter>
>>
>>         <sld:CssParameter name="font-size">10</sld:CssParameter>
>>         <sld:CssParameter name="font-style">normal</sld:CssParameter>
>>         <sld:CssParameter name="font-weight">bold</sld:CssParameter>
>>         </sld:Font>
>>         <sld:LabelPlacement>
>>         <sld:PointPlacement>
>>         <sld:AnchorPoint>
>>         <sld:AnchorPointX>
>>         <ogc:Literal>0.0</ogc:Literal>
>>         </sld:AnchorPointX>
>>         <sld:AnchorPointY>
>>         <ogc:Literal>0.0</ogc:Literal>
>>         </sld:AnchorPointY>
>>         </sld:AnchorPoint>
>>         <sld:Rotation>
>>         <ogc:Literal>0.0</ogc:Literal>
>>         </sld:Rotation>
>>         </sld:PointPlacement>
>>         </sld:LabelPlacement>
>>         <sld:Fill>
>>         <sld:CssParameter name="fill">#000000</sld:CssParameter>
>>         </sld:Fill>
>>         <sld:VendorOption name="spaceAround">2</sld:VendorOption>
>>         </sld:TextSymbolizer>
>>         </sld:Rule>
>>         </sld:FeatureTypeStyle>
>>         </sld:UserStyle>
>>         </sld:UserLayer>
>>         </sld:StyledLayerDescriptor>
>>
>>
>>         Nota: Fiz o sld com o udig.
>>         OS: Ubuntu (geobox)
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>         On 23-11-2011 12:05, Pedro Mendes wrote:
>>>         Olá Pedro,
>>>
>>>         Coloca aqui o SLD inteiro, para ser mais facil avaliar o que
>>>         poderá estar mal.
>>>
>>>         Mendes.
>>>
>>>         2011/11/23 Pedro Costa <pedrocostaarma  sapo.pt
>>>         <mailto:pedrocostaarma  sapo.pt>>
>>>
>>>             Pessoal,
>>>
>>>             POdem ajudar no seguinte, eu tenho uns layers com uns
>>>             estilos no geoserver mas não consigo mudar o tamanho dos
>>>             labels, já fui no sld edior e mudei para metade do
>>>             tamanho e continua igual.
>>>
>>>             Original
>>>
>>>             <sld:CssParameter name="font-size">10</sld:CssParameter>
>>>
>>>
>>>             Mudei para
>>>
>>>             <sld:CssParameter name="font-size">5</sld:CssParameter>
>>>
>>>             ALguém sabe qual é o problema?
>>>
>>>             Obrigado
>>>             _______________________________________________
>>>             Portugal mailing list
>>>             Portugal  lists.osgeo.org <mailto:Portugal  lists.osgeo.org>
>>>             http://lists.osgeo.org/mailman/listinfo/portugal
>>>
>>>
>>>
>>>
>>>         _______________________________________________
>>>         Portugal mailing list
>>>         Portugal  lists.osgeo.org  <mailto:Portugal  lists.osgeo.org>
>>>         http://lists.osgeo.org/mailman/listinfo/portugal
>>
>>
>>         _______________________________________________
>>         Portugal mailing list
>>         Portugal  lists.osgeo.org <mailto:Portugal  lists.osgeo.org>
>>         http://lists.osgeo.org/mailman/listinfo/portugal
>>
>>
>>
>>
>>     _______________________________________________
>>     Portugal mailing list
>>     Portugal  lists.osgeo.org  <mailto:Portugal  lists.osgeo.org>
>>     http://lists.osgeo.org/mailman/listinfo/portugal
>
>
>     _______________________________________________
>     Portugal mailing list
>     Portugal  lists.osgeo.org <mailto:Portugal  lists.osgeo.org>
>     http://lists.osgeo.org/mailman/listinfo/portugal
>
>
>
>
> _______________________________________________
> Portugal mailing list
> Portugal  lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/portugal

-------------- próxima parte ----------
Um anexo em HTML foi limpo...
URL: http://lists.osgeo.org/pipermail/portugal/attachments/20111123/208c9026/attachment-0001.html


Mais informações acerca da lista Portugal