[Geoserver-users] Icons in KML appear to be overlayed with a grey mask

Hi there listserv. I am using GeoServer to dish up data via KML. I
have defined a set of rules in the SLD to define features according to
their attributes, and style them according to an external graphic. The
relevant line of the SLD is below.

<sld:ExternalGraphic>
        <sld:OnlineResource xlink:type="simple"
xlink:href="http://www.who.int/tools/geoserver/www/icons/hospitals.png&quot;/&gt;
        <sld:Format>image/png</sld:Format>
     </sld:ExternalGraphic>

I then serve up this data via the following link..

http://www.who.int/tools/geoserver/wms/kml_reflect?layers=WHO:myanmar_health_facilities

The problem is that the present in the PNG file seems to be overlayed
with a grey mask RGB(170,170,170) according to Google Earth.

I am not sure where this is coming from. Is there something that I
need to adjust somewhere to prevent this from happening? I would like
to the color defined in the external graphic to appear exactly as it
has been defined.

Hope this is clear and thanks for any tips!

Best regards,
Jason

Jason,

The link you sent
http://www.who.int/tools/geoserver/wms/kml_reflect?layers=WHO:myanmar_health_facilities

creates placemarks with an image reference to a different png file, i.e.
<Icon>
    <href>http://www.who.int/tools/geoserver/www/icons/level5.png&lt;/href&gt;
</Icon>
which is a blue circle with a black outline and a black cross in the middle.

Did you send out the correct link?

- Tyler

jpickeri wrote:

Hi there listserv. I am using GeoServer to dish up data via KML. I
have defined a set of rules in the SLD to define features according to
their attributes, and style them according to an external graphic. The
relevant line of the SLD is below.

<sld:ExternalGraphic>
        <sld:OnlineResource xlink:type="simple"
xlink:href="http://www.who.int/tools/geoserver/www/icons/hospitals.png&quot;/&gt;
        <sld:Format>image/png</sld:Format>
     </sld:ExternalGraphic>

I then serve up this data via the following link..

http://www.who.int/tools/geoserver/wms/kml_reflect?layers=WHO:myanmar_health_facilities

The problem is that the present in the PNG file seems to be overlayed
with a grey mask RGB(170,170,170) according to Google Earth.

I am not sure where this is coming from. Is there something that I
need to adjust somewhere to prevent this from happening? I would like
to the color defined in the external graphic to appear exactly as it
has been defined.

Hope this is clear and thanks for any tips!

Best regards,
Jason

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
View this message in context: http://www.nabble.com/Icons-in-KML-appear-to-be-overlayed-with-a-grey-mask-tp17450657p17452169.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Hi Tyler. Yes, you are correct. The link is incorrect. My mistake.:slight_smile:
Here is the full SLD.

http://www.who.int/tools/geoserver/styles/GISGLOBAL.OMS.V_UNIT_H_style.sld

I just checked again, and it seems like the icon itself is not
correct. Perhaps this is not a problem with Geoserver after all, but
with my graphics software that I have used to export the PNG?

Thanks and best regards,
Jason

On 5/25/08, Tyler Erickson <tyler.erickson@anonymised.com> wrote:

Jason,

The link you sent
http://www.who.int/tools/geoserver/wms/kml_reflect?layers=WHO:myanmar_health_facilities

creates placemarks with an image reference to a different png file, i.e.
<Icon>
   <href>http://www.who.int/tools/geoserver/www/icons/level5.png&lt;/href&gt;
</Icon>
which is a blue circle with a black outline and a black cross in the middle.

Did you send out the correct link?

- Tyler

jpickeri wrote:
>
> Hi there listserv. I am using GeoServer to dish up data via KML. I
> have defined a set of rules in the SLD to define features according to
> their attributes, and style them according to an external graphic. The
> relevant line of the SLD is below.
>
> <sld:ExternalGraphic>
> <sld:OnlineResource xlink:type="simple"
> xlink:href="http://www.who.int/tools/geoserver/www/icons/hospitals.png&quot;/&gt;
> <sld:Format>image/png</sld:Format>
> </sld:ExternalGraphic>
>
> I then serve up this data via the following link..
>
> http://www.who.int/tools/geoserver/wms/kml_reflect?layers=WHO:myanmar_health_facilities
>
> The problem is that the present in the PNG file seems to be overlayed
> with a grey mask RGB(170,170,170) according to Google Earth.
>
> I am not sure where this is coming from. Is there something that I
> need to adjust somewhere to prevent this from happening? I would like
> to the color defined in the external graphic to appear exactly as it
> has been defined.
>
> Hope this is clear and thanks for any tips!
>
> Best regards,
> Jason
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Geoserver-users mailing list
> Geoserver-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
>

--
View this message in context: http://www.nabble.com/Icons-in-KML-appear-to-be-overlayed-with-a-grey-mask-tp17450657p17452169.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Jason,

I opened your hospital.png file in GIMP, and it looks fine to me (i.e. it
has a transparent background).

I also manually created a few GE placemarks that refer to the
http://www.who.int/tools/geoserver/www/icons/hospitals.png image. These
seem to display correctly in GoogleEarth (see attached image), without any
grey background.

http://www.nabble.com/file/p17453382/hospital_placemark.jpg

- Tyler

jpickeri wrote:

Hi Tyler. Yes, you are correct. The link is incorrect. My mistake.:slight_smile:
Here is the full SLD.

http://www.who.int/tools/geoserver/styles/GISGLOBAL.OMS.V_UNIT_H_style.sld

I just checked again, and it seems like the icon itself is not
correct. Perhaps this is not a problem with Geoserver after all, but
with my graphics software that I have used to export the PNG?

Thanks and best regards
Jason

--
View this message in context: http://www.nabble.com/Icons-in-KML-appear-to-be-overlayed-with-a-grey-mask-tp17450657p17453382.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Hi Tyler,

This is perplexing. I have another layer, produced in essentially the
same way with a similar SLD
(http://www.who.int/tools/geoserver/styles/mm_bridges_style.sld )
which refers to the layer
http://www.who.int/tools/geoserver/wms/kml_reflect?layers=WHO:mm_bridges.

I created the icon in Inkscape, and the exported png
(http://www.who.int/tools/geoserver/www/icons/intact_bridge.png) There
should be two completely white features RGB(255,255,255) a green
background RGB(0,150,0) and a black circle around the edges. The other
icons for this layer are described in the SLD.

I have uploaded a screen shot from Google Earth (4.3.7204.0836 beta)
to http://www.who.int/tools/geoserver/www/icons/screenshot.png. I
added a white polygon similar to your screen shot for reference and
colored it white.

According to my copy of GIMP, this screenshot shows that the colors of
the icons are no longer the same. The pixels that should be white are
not RGB (170,170,170) and the green is now RGB(0,100,0).

??

Is this something specific to my system then perhaps?

Thanks and best regards,
Jason

On 5/25/08, Tyler Erickson <tyler.erickson@anonymised.com> wrote:

Jason,

I opened your hospital.png file in GIMP, and it looks fine to me (i.e. it
has a transparent background).

I also manually created a few GE placemarks that refer to the
http://www.who.int/tools/geoserver/www/icons/hospitals.png image. These
seem to display correctly in GoogleEarth (see attached image), without any
grey background.

http://www.nabble.com/file/p17453382/hospital_placemark.jpg

- Tyler

jpickeri wrote:
>
> Hi Tyler. Yes, you are correct. The link is incorrect. My mistake.:slight_smile:
> Here is the full SLD.
>
> http://www.who.int/tools/geoserver/styles/GISGLOBAL.OMS.V_UNIT_H_style.sld
>
> I just checked again, and it seems like the icon itself is not
> correct. Perhaps this is not a problem with Geoserver after all, but
> with my graphics software that I have used to export the PNG?
>
> Thanks and best regards
> Jason
>
>

--
View this message in context: http://www.nabble.com/Icons-in-KML-appear-to-be-overlayed-with-a-grey-mask-tp17450657p17453382.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Jason,

It doesn't seem specific to your system. I can duplicate the issue on my
copy of Google Earth (4.2).

The color change seems to be caused by the <color> element in the KML
returned from GeoServer. If you comment out the <color> element, the colors
are as you expect.

<kml>
   <Document>
      <name>WHO:mm_bridges</name>
      <Style id="GeoServerStylemm_bridges.1">
         <IconStyle>
            <Icon/>
         </IconStyle>
         <IconStyle>
            <color>ffaaaaaa</color>
            <colorMode>normal</colorMode>
            <Icon>
              
<href>http://www.who.int/tools/geoserver/www/icons/intact_bridge.png&lt;/href&gt;
            </Icon>
         </IconStyle>
      </Style>

Your SLD looks reasonable, so I don't know what is causing the <color>
element for the icon to be created. This may be a bug in how GeoServer
processes the <ExternalGraphic> portion of your SLD...

- Tyler

--
View this message in context: http://www.nabble.com/Icons-in-KML-appear-to-be-overlayed-with-a-grey-mask-tp17450657p17458538.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Hi Tyler,

OK, well, at least it is reproducable. :slight_smile:

Shall I log a JIRA issue for this? It seems like a bug to me as well.

Regards,
Jason

On 5/25/08, Tyler Erickson <tyler.erickson@anonymised.com> wrote:

Jason,

It doesn't seem specific to your system. I can duplicate the issue on my
copy of Google Earth (4.2).

The color change seems to be caused by the <color> element in the KML
returned from GeoServer. If you comment out the <color> element, the colors
are as you expect.

<kml>
  <Document>
     <name>WHO:mm_bridges</name>
     <Style id="GeoServerStylemm_bridges.1">
        <IconStyle>
           <Icon/>
        </IconStyle>
        <IconStyle>
           <color>ffaaaaaa</color>
           <colorMode>normal</colorMode>
           <Icon>

<href>http://www.who.int/tools/geoserver/www/icons/intact_bridge.png&lt;/href&gt;
           </Icon>
        </IconStyle>
     </Style>

Your SLD looks reasonable, so I don't know what is causing the <color>
element for the icon to be created. This may be a bug in how GeoServer
processes the <ExternalGraphic> portion of your SLD...

- Tyler

--
View this message in context: http://www.nabble.com/Icons-in-KML-appear-to-be-overlayed-with-a-grey-mask-tp17450657p17458538.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Jason Pickering ha scritto:

Hi Tyler,

OK, well, at least it is reproducable. :slight_smile:

Shall I log a JIRA issue for this? It seems like a bug to me as well.

Please do, along with a sample sld and graphic to reproduce the issue :slight_smile:
Cheers
Andrea