[Geoserver-devel] Test failure in kml icon service module (if you have perceptualdiff)

Hi,
the build is failing in IconRendererTest for those that have PerceptualDiff installed
(the failure is an image comparision one).

The reason it’s failing it’s due to change in the GeoTools rendering engine to increase
the quality of icons rendered in a map, http://jira.codehaus.org/browse/GEOT-4479,
which snaps the position of the icon to integer pixels to avoid the resampling
that otherwise occurs (java2d trying to respect the non integer position we gave it
to the letter), which makes the icons look fuzzy, and different in the output depending
on the location where they are painted.

Now, the way the icon renderer works, it seems it’s always going to make the image
be painted at an half a pixel (e.g., coordinates 21.5, 21.5), which of course ruins
somewhat the output… and something the change above tries to avoid, changing
the output (and making the icon not be exactly in the center of the output)

For the time being I’ve committed a work around, but can someone familiar with the
code have a look and see if the icon renderer can be fixed to make it paint the
icon at a integer location to start with, and keep the icon in the middle of the
generated image?

Cheers
Andrea

== Our support, Your Success! Visit http://opensdi.geo-solutions.it 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


You’re talking about https://github.com/geoserver/geoserver/blob/master/src/kml/src/test/java/org/geoserver/kml/icons/IconRendererTest.java ? Just from looking at the commit log I don’t see where/when the workaround is applied. I’d like to revert the workaround before investigating a fix so I’d appreciate it if you could point me in the right direction there.

···

On Fri, Jan 10, 2014 at 6:39 AM, Andrea Aime <andrea.aime@anonymised.com> wrote:

Hi,
the build is failing in IconRendererTest for those that have PerceptualDiff installed
(the failure is an image comparision one).

The reason it’s failing it’s due to change in the GeoTools rendering engine to increase
the quality of icons rendered in a map, http://jira.codehaus.org/browse/GEOT-4479,
which snaps the position of the icon to integer pixels to avoid the resampling
that otherwise occurs (java2d trying to respect the non integer position we gave it
to the letter), which makes the icons look fuzzy, and different in the output depending
on the location where they are painted.

Now, the way the icon renderer works, it seems it’s always going to make the image
be painted at an half a pixel (e.g., coordinates 21.5, 21.5), which of course ruins
somewhat the output… and something the change above tries to avoid, changing
the output (and making the icon not be exactly in the center of the output)

For the time being I’ve committed a work around, but can someone familiar with the
code have a look and see if the icon renderer can be fixed to make it paint the
icon at a integer location to start with, and keep the icon in the middle of the
generated image?

Cheers
Andrea

== Our support, Your Success! Visit http://opensdi.geo-solutions.it 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



CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk


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

David Winslow

Boundless - http://boundlessgeo.com/

On Fri, Jan 10, 2014 at 3:43 PM, David Winslow <dwinslow@anonymised.com>wrote:

You're talking about
https://github.com/geoserver/geoserver/blob/master/src/kml/src/test/java/org/geoserver/kml/icons/IconRendererTest.java? Just from looking at the commit log I don't see where/when the workaround
is applied. I'd like to revert the workaround before investigating a fix
so I'd appreciate it if you could point me in the right direction there.

Ah hem... forgot to push. It's in now, see @BeforeClass and @AfterClass

Cheers
Andrea

--
== Our support, Your Success! Visit http://opensdi.geo-solutions.it 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

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