Ciao Cedric,
please, read below....
On 9/6/07, Cédric Briançon <cedric.briancon@anonymised.com> wrote:
Martin Desruisseaux a écrit :
> Thanks a lot for all the explanation.
>
> Simone Giannecchini a écrit :
>
>> Moreover, which output format are you using?
>>
>
> PNG, but again I need confirmation from Cedric.
>
>
Yes the format requested is image/png.
However I have a question about the class
org.vfny.geoserver.wms.responses.GetMapResponse.
In a recent commit on Geoserver trunk, the produceMap() method that is
called around line 370 has lost the parameter variable map (a
WMSMapContext variable).
So in the code, we can see :
this.delegate.produceMap();
If I do a WMS request with the png format for output, I get a Null
Pointer Exception on DefaultRasterMapProducer at a line that I can see :
final int width = mapContext.getMapWidth();
This is pretty strange, if you check at the top of the method we are
setting the mapcontext explicitly on the delegate:
this.delegate.setMapContext(map);
// enable on the fly meta tiling if request looks like a tiled one
if (MetatileMapProducer.isRequestTiled(request, delegate)) {
if (LOGGER.isLoggable(Level.FINER)) {
LOGGER
.finer("Tiled request detected, activating on the fly meta tiler");
}
this.delegate = new MetatileMapProducer(request,
(RasterMapProducer) delegate);
this.delegate.setMapContext(map);
}
so it should never happen to get a null pointer exception. As aaime
said, such an error should have been caught by the test-cases or by
our own test pretty quickly.
Maybe some local changes got mixed up after the update.
Anyway, co
Consequently I can thinl that the parameter mapContext is null. I've
tried to add this line to the GetMapResponse class, in the method execute():
delegate.setMapContext(map);
This line is just before the call of the produceMap() method. I do not
get a null pointer exception, because the map context is set before. But
I get an inverted color image...
I don't have a clear idea about this inverted color image. Can you
please give more detail about what you are doing? If you want you can
find me on GTalk today at anytime. Just use my email as my id and I'll
help you out.
This WMSMapContext parameter is set with some values, but doesn't seem
to be used in the end (or I've missed something). I can assume that here
is a problem with some unused code lines.
Regards,
Cédric B.
Ciao,
Simone.
PS
Sorry about the reformat, but I forgot that jalopy reformatting was turned off!
> Our source image is indexed 16 bits, which is not supported by the PNG format (I
> think it supports only 24/32 bits [A]RGB or indexed 8 bits). We will need to
> check which transformation chain is performed exactly (maybe [indexed 16 bits]
> --> [24 bits RGB] --> [indexed 8 bits]). We will put some debug code tomorrow.
>
> Regards,
>
> Martin
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems? Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> Geoserver-devel mailing list
> Geoserver-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-devel
>
>
--
-------------------------------------------------------
Eng. Simone Giannecchini
President /CEO GeoSolutions S.A.S.
Via Carignoni 51
55041 Camaiore (LU)
Italy
phone: +39 0584983027
fax: +39 0584983027
mob: +39 333 8128928
http://www.geo-solutions.it
-------------------------------------------------------