[Geoserver-users] GeoServer Single Image Graphic Label Issues

I have GS 2.6.0. I have an SLD where I am trying to label bunch of weather
conditions throughout 700 cities. I like how GS does not allow labels to
conflict, but things are not working well. When I first open my OpenLayers 3
Map, the graphic label (icons) show nicely:

<http://osgeo-org.1560.x6.nabble.com/file/n5195263/mapIcons.png&gt;

You can see all the black dots that don't have the graphic label.
When I zoom in one level, the graphics are still there.
When I zoom in one more level, and all subsequent levels, all the graphic
labels disappear:

<http://osgeo-org.1560.x6.nabble.com/file/n5195263/mapNoIcons.png&gt;

I am using OpenLayers 3.0 and requesting a single image like this:

    var openWeatherMap = new ol.layer.Image({
      visible: false,
      refresh: true,
      extent: mapExtent,
      source: new ol.source.ImageWMS({
        'crossOrigin':'anonymous',
        url: 'https://myserver.com/geoserver-2.6.0/myworkspace/wms’,
        params: {'LAYERS': 'feed_open_weather_map'},
        serverType: 'geoserver'
      })
    });

I've tried a million combinations of OL3 and SLD options. Some work better
than other, but I can't ever get the graphic labels to appear beyond the
zoom I mentioned.
My SLD looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<sld:StyledLayerDescriptor version="1.0.0"
  xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd"
  xmlns="http://www.opengis.net/sld&quot;
  xmlns:ogc="http://www.opengis.net/ogc&quot;
  xmlns:xlink="http://www.w3.org/1999/xlink&quot;
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
  xmlns:sld="http://www.opengis.net/sld&quot;&gt;
  <sld:UserLayer>
    <sld:LayerFeatureConstraints>
      <sld:FeatureTypeConstraint/>
    </sld:LayerFeatureConstraints>
    <sld:UserStyle>
      <sld:Name>OWM Icons</sld:Name>
      <sld:FeatureTypeStyle>
        <sld:Rule>
          <sld:Name>OWM Icons</sld:Name>
          <sld:Title>OWM Icons</sld:Title>
          <ogc:Filter>
            <ogc:PropertyIsEqualTo>
              <ogc:PropertyName>active_internal</ogc:PropertyName>
              <ogc:Literal>true</ogc:Literal>
            </ogc:PropertyIsEqualTo>
          </ogc:Filter>
    <PointSymbolizer>
      <Graphic>
        <Mark>
          <WellKnownName>circle</WellKnownName>
          <Fill>
            <CssParameter name="fill">#000000</CssParameter>
          </Fill>
        </Mark>
        <Opacity>
        0.1
        </Opacity>
        <Size>1</Size>
      </Graphic>
    </PointSymbolizer>
       <TextSymbolizer>
         <Label>
           
         </Label>
         <LabelPlacement>
           <PointPlacement>
             <AnchorPoint>
               <AnchorPointX>0.5</AnchorPointX>
               <AnchorPointY>0.5</AnchorPointY>
             </AnchorPoint>
             <Displacement>
               <DisplacementX>0</DisplacementX>
               <DisplacementY>0</DisplacementY>
             </Displacement>
           </PointPlacement>
         </LabelPlacement>
         <Fill>
           <CssParameter name="fill">#000000</CssParameter>
         </Fill>
            <sld:Graphic>
              <sld:ExternalGraphic>
                <sld:OnlineResource xlink:type="simple"
                                   
xlink:href="http://openweathermap.org/img/w/$\{icon\}\.png&quot;/&gt;
                <sld:Format>image/png</sld:Format>
              </sld:ExternalGraphic>
              <sld:Size>50</sld:Size>
            </sld:Graphic>
       </TextSymbolizer>
        </sld:Rule>
      </sld:FeatureTypeStyle>
    </sld:UserStyle>
  </sld:UserLayer>
</sld:StyledLayerDescriptor>

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/GeoServer-Single-Image-Graphic-Label-Issues-tp5195263.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

I just double checked the log files and they look clean. Could this have
something to do with installing native JAI?

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/GeoServer-Single-Image-Graphic-Label-Issues-tp5195263p5195645.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Hi,
is your map tiled? It seems to be your icon is pretty large, and if it crosses the tile borders,
it simply won’t be displayed as there is no guarantee the other half of it will be painted
in the nearby tile because of conflict resolution.

If you don’t care about conflict resolution, you can turn it off and allow partial labels (a
feature appeared in 2.6.x I believe):
http://docs.geoserver.org/latest/en/user/styling/sld-reference/labeling.html#conflictresolution

http://docs.geoserver.org/latest/en/user/styling/sld-reference/labeling.html#partials

Cheers
Andrea

···

On Tue, Mar 24, 2015 at 10:30 PM, maw269 <maw269@anonymised.com> wrote:

I have GS 2.6.0. I have an SLD where I am trying to label bunch of weather
conditions throughout 700 cities. I like how GS does not allow labels to
conflict, but things are not working well. When I first open my OpenLayers 3
Map, the graphic label (icons) show nicely:

<http://osgeo-org.1560.x6.nabble.com/file/n5195263/mapIcons.png>

You can see all the black dots that don’t have the graphic label.
When I zoom in one level, the graphics are still there.
When I zoom in one more level, and all subsequent levels, all the graphic
labels disappear:

<http://osgeo-org.1560.x6.nabble.com/file/n5195263/mapNoIcons.png>

I am using OpenLayers 3.0 and requesting a single image like this:

var openWeatherMap = new ol.layer.Image({
visible: false,
refresh: true,
extent: mapExtent,
source: new ol.source.ImageWMS({
‘crossOrigin’:‘anonymous’,
url: ‘https://myserver.com/geoserver-2.6.0/myworkspace/wms’,
params: {‘LAYERS’: ‘feed_open_weather_map’},
serverType: ‘geoserver’
})
});

I’ve tried a million combinations of OL3 and SLD options. Some work better
than other, but I can’t ever get the graphic labels to appear beyond the
zoom I mentioned.
My SLD looks like this:

<?xml version="1.0" encoding="UTF-8"?>

<sld:StyledLayerDescriptor version=“1.0.0”
xsi:schemaLocation=“http://www.opengis.net/sld StyledLayerDescriptor.xsd”
xmlns=“http://www.opengis.net/sld
xmlns:ogc=“http://www.opengis.net/ogc
xmlns:xlink=“http://www.w3.org/1999/xlink
xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance
xmlns:sld=“http://www.opengis.net/sld”>
sld:UserLayer
sld:LayerFeatureConstraints
sld:FeatureTypeConstraint/
</sld:LayerFeatureConstraints>
sld:UserStyle
sld:NameOWM Icons</sld:Name>
sld:FeatureTypeStyle
sld:Rule
sld:NameOWM Icons</sld:Name>
sld:TitleOWM Icons</sld:Title>
ogc:Filter
ogc:PropertyIsEqualTo
ogc:PropertyNameactive_internal</ogc:PropertyName>
ogc:Literaltrue</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>



circle

#000000



0.1

1



0.5 0.5 0 0 #000000 <sld:OnlineResource xlink:type="simple"

xlink:href=“http://openweathermap.org/img/w/${icon}.png”/>
sld:Formatimage/png</sld:Format>
</sld:ExternalGraphic>
sld:Size50</sld:Size>
</sld:Graphic>

</sld:Rule>
</sld:FeatureTypeStyle>
</sld:UserStyle>
</sld:UserLayer>
</sld:StyledLayerDescriptor>


View this message in context: http://osgeo-org.1560.x6.nabble.com/GeoServer-Single-Image-Graphic-Label-Issues-tp5195263.html
Sent from the GeoServer - User mailing list archive at Nabble.com.


Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/


Geoserver-users mailing list
Geoserver-users@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

==

GeoServer Professional Services from the experts! Visit
http://goo.gl/NWWaa2 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 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.


Hi Andrea,

My request is not tiled. My request url looks like this:

https://myserver.com/geoserver-2.6.0/myworkspace/wms?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image%2Fpng&TRANSPARENT=true&LAYERS=feed_open_weather_map&CRS=EPSG%3A3857&STYLES=&WIDTH=2880&HEIGHT=1005&BBOX=-12019026.271586256%2C102352.06492121238%2C16158719.83546112%2C9935211.383526284

I am trying to implement your little trick described here
http://geoserver-users.narkive.com/NaG5KZ4m/disperse-markers-in-geoserver-openlayers
<http://geoserver-users.narkive.com/NaG5KZ4m/disperse-markers-in-geoserver-openlayers&gt;
to disperse the weather graphics throughout the map so I do care about
conflict resolution.

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/GeoServer-Single-Image-Graphic-Label-Issues-tp5195263p5195693.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

On Thu, Mar 26, 2015 at 9:00 PM, maw269 <maw269@anonymised.com> wrote:

Hi Andrea,

My request is not tiled. My request url looks like this:

https://myserver.com/geoserver-2.6.0/myworkspace/wms?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image%2Fpng&TRANSPARENT=true&LAYERS=feed_open_weather_map&CRS=EPSG%3A3857&STYLES=&WIDTH=2880&HEIGHT=1005&BBOX=-12019026.271586256%2C102352.06492121238%2C16158719.83546112%2C9935211.383526284

Ok... in this case I have no idea of what's going on, please open a ticket
adding enough data, style, and the request for reference,
in order to reproduce on a developer's machine

Cheers
Andrea

--

GeoServer Professional Services from the experts! Visit
http://goo.gl/NWWaa2 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 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.

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

I will open a ticket. Thanks for your time!

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/GeoServer-Single-Image-Graphic-Label-Issues-tp5195263p5195761.html
Sent from the GeoServer - User mailing list archive at Nabble.com.