Hi Annalisa,
weird, I've tried the style on a 2.9.x (2.7.x is not supported anymore) and
I get this validation error:

line 7: cvc-complex-type.2.4.a: Invalid content was found starting with
element 'se:Title'. One of '{"http://www.opengis.net/se":Description, "
http://www.opengis.net/sld":IsDefault,
"http://www.opengis.net/se":FeatureTypeStyle,
"http://www.opengis.net/se":CoverageStyle,
"http://www.opengis.net/se":OnlineResource}'
is expected.

This modified style appears to validate and work instead:

<?xml version="1.0" encoding="UTF-8"?>
<StyledLayerDescriptor xmlns="http://www.opengis.net/sld"; xmlns:ogc="
http://www.opengis.net/ogc"; xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"; version="1.1.0" xmlns:xlink="
http://www.w3.org/1999/xlink"; xsi:schemaLocation="http://www.opengis.net/sld
http://schemas.opengis.net/sld/1.1.0/StyledLayerDescriptor.xsd"; xmlns:se="
http://www.opengis.net/se";>
  <NamedLayer>
    <se:Name>srb_nero</se:Name>
    <UserStyle>
      <se:FeatureTypeStyle>
        <se:Rule>
          <se:Name>Single symbol</se:Name>
          <se:PointSymbolizer>
            <se:Graphic>
              <se:ExternalGraphic>
                <se:OnlineResource xlink:type="simple" xlink:href="
http://geomap.arpa.veneto.it/static/img/ico/antenna-with-signal-transmission.png
"/>
                <se:Format>image/png</se:Format>
              </se:ExternalGraphic>
              <se:Size>15</se:Size>
            </se:Graphic>
          </se:PointSymbolizer>
        </se:Rule>
      </se:FeatureTypeStyle>
    </UserStyle>
  </NamedLayer>
</StyledLayerDescriptor>

See this getmap:

http://demo.geo-solutions.it/geoserver/sf/wms?service=WMS&version=1.1.0&request=GetMap&layers=sf:archsites&styles=srb_nero&bbox=589851.4376666048,4914490.882968263,608346.4603107043,4926501.8980334345&width=768&height=498&srs=EPSG:26713&format=application/openlayers

The original symbol is really large compared to the target one, the scaled
down version does not look so good... better use SVGs or a pre-scaled-down
symbol that you can use at its native size instead (we could try with a
different interpolation, but it's hard/impossible to make everybody happy,
we used to have a different one and people complained the output looked
foggy...)... thinking out loud, could be a place for people to add a vendor
option to tell us which rescaling algorithm to use.

Cheers
Andrea



On Mon, Jul 18, 2016 at 12:46 PM, Annalisa Schiavon <
annalisa.schia...@gmail.com> wrote:

> Hi all, sorry for the late reply.
> I attach the full log after having applied the PNG symbol.
> The full sld file is:
>
> *Name*
> srb_nero
>
> <?xml version="1.0" encoding="UTF-8"?>
> <StyledLayerDescriptor xmlns="http://www.opengis.net/sld"; xmlns:ogc="
> http://www.opengis.net/ogc"; xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance"; version="1.1.0" xmlns:xlink="
> http://www.w3.org/1999/xlink"; units="mm" xsi:schemaLocation="
> http://www.opengis.net/sld
> http://schemas.opengis.net/sld/1.1.0/StyledLayerDescriptor.xsd"; xmlns:se="
> http://www.opengis.net/se";>
>   <NamedLayer>
>     <se:Name>srb_nero</se:Name>
>     <UserStyle>
>       <se:Name>srb_nero</se:Name>
>       <se:Title>srb_nero</se:Title>
>       <se:FeatureTypeStyle>
>         <se:Rule>
>           <se:Name>Single symbol</se:Name>
>           <se:PointSymbolizer>
>             <se:Graphic>
>               <se:ExternalGraphic>
>                 <se:OnlineResource xlink:type="simple" xlink:href="
> http://geomap.arpa.veneto.it/static/img/ico/antenna-with-signal-transmission.png
> "/>
>                 <se:Format>image/png</se:Format>
>               </se:ExternalGraphic>
>               <se:Size>15</se:Size>
>             </se:Graphic>
>           </se:PointSymbolizer>
>         </se:Rule>
>       </se:FeatureTypeStyle>
>     </UserStyle>
>   </NamedLayer>
> </StyledLayerDescriptor>
>
> On the Style Editor page, with this style select, if I choose "validate"
> button, it's ok and if I choose "Preview legend" button, I correctly view
> the symbol.
>
> Thank you so much
>
> Annalisa
>
> 2016-07-11 21:15 GMT+02:00 Andrea Aime <andrea.a...@geo-solutions.it>:
>
>> Ciao Annalisa,
>> the exception is not familiar to me, could you check the GeoServer logs
>> and find the full
>> stack trace for that issue?
>>
>> Hi all.
>> I've tried to create a sld style using an external graphic:
>> ...
>> <se:Rule>
>>           <se:Name>Single symbol</se:Name>
>>           <se:PointSymbolizer>
>>             <se:Graphic>
>>               <se:ExternalGraphic>
>>                 <se:OnlineResource xlink:type="simple"
>> xlink:href="file:///var/www/geonode/static/img/ico/poi_tower_communications.svg"/>
>>                 <se:Format>image/svg+xml</se:Format>
>>               </se:ExternalGraphic>
>>               <se:Size>15</se:Size>
>>             </se:Graphic>
>>           </se:PointSymbolizer>
>>         </se:Rule>
>> ...
>> and than:
>> ...
>> <se:Rule>
>>           <se:Name>Single symbol</se:Name>
>>           <se:PointSymbolizer>
>>             <se:Graphic>
>>               <se:ExternalGraphic>
>>                 <se:OnlineResource xlink:type="simple" xlink:href="
>> http://geomap.arpa.veneto.it/static/img/ico/antenna-with-signal-transmission.png
>> "/>
>>                 <se:Format>image/png</se:Format>
>>               </se:ExternalGraphic>
>>               <se:Size>15</se:Size>
>>             </se:Graphic>
>>           </se:PointSymbolizer>
>>         </se:Rule>
>> ....
>>
>> In both cases, into style editor the preview works fine, but the layer
>> preview of geoserver returns an error:
>>
>> java.io.IOException: java.lang.RuntimeException: Parsing failed for
>> UserStyle: java.lang.ClassCastException: java.util.HashMap cannot be cast
>> to org.opengis.util.International
>>
>> Geoserver ver.: 2.7.4  (with Geonode project, ver. 2.4)
>>
>> It is the first time I try to use external graphics. Any ideas to resolve
>> error?
>>
>> Thanks
>>
>>
>> ------------------------------------------------------------------------------
>> Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
>> Francisco, CA to explore cutting-edge tech and listen to tech luminaries
>> present their vision of the future. This family event has something for
>> everyone, including kids. Get more information and register today.
>> http://sdm.link/attshape
>> _______________________________________________
>> Geoserver-users mailing list
>> Geoserver-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>>
>>
>


-- 
==
GeoServer Professional Services from the experts! Visit
http://goo.gl/it488V for more information.
==

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054  Massarosa (LU)
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39  339 8844549

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

*AVVERTENZE AI SENSI DEL D.Lgs. 196/2003*

Le informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
loro utilizzo è consentito esclusivamente al destinatario del messaggio,
per le finalità indicate nel messaggio stesso. Qualora riceviate questo
messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
darcene notizia via e-mail e di procedere alla distruzione del messaggio
stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
utilizzarlo per finalità diverse, costituisce comportamento contrario ai
principi dettati dal D.Lgs. 196/2003.



The information in this message and/or attachments, is intended solely for
the attention and use of the named addressee(s) and may be confidential or
proprietary in nature or covered by the provisions of privacy act
(Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
Code).Any use not in accord with its purpose, any disclosure, reproduction,
copying, distribution, or either dissemination, either whole or partial, is
strictly forbidden except previous formal approval of the named
addressee(s). If you are not the intended recipient, please contact
immediately the sender by telephone, fax or e-mail and delete the
information in this message that has been received in error. The sender
does not give any warranty or accept liability as the content, accuracy or
completeness of sent messages and accepts no responsibility  for changes
made after they were sent or for other risks which arise as a result of
e-mail transmission, viruses, etc.

-------------------------------------------------------
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to