Re: imageserver implemented in servlet sometimes shows troubles

From: Don Dietrick <dietrick@bbn.com>
Date: Thu May 30 2002 - 11:35:54 EDT

Hi Martijn,

You should check to see if the problems still persist while creating
JPEGs. I think I've seen this behavior when you try to create a GIF
file and there are too many colors in the image being encoded.

OpenMap 4.5 has some new code in it where if there are too many colors,
a color reduction is performed.

Cheers,

Don

On Thursday, May 30, 2002, at 08:00 AM, MARTIJN VAN DER PAUW wrote:

> First thank to all developers who make the new update possible. I'm
> looking out for it..
> I don't know if it is a bug (known or not) but the imageserver class
> shows some problems.
> I've build a singleThread servlet that handles requests done by applets
> installed on client machines. The applet does
> a request to the servlet, the servlet processes the request and sends
> back a GIF image.
>
> The imageserver uses the ShapeLayer to create the maps. I've noticed
> something about this layer and a bug and it's
> also therefore that i send this mail.
>
> I must say, it happens now and then, mostly when the server gets a few
> requests after each other. Sometimes it
> seems no problems exist. It might have something to do with system
> resources, but i don't see any errrors in the
> message tracing of JBuilder6. When the error occurs, all other requests
> fail as well without errors created. So a idea
> of how to check if the imageServer is still running well might help a
> bit as well.
>
> Like now I am typing this mail, I can't get it down ;-)
>
>
> this is the function that creates the imagebytes:
>
> { CODE }
>
> public byte[] renderdata(float newlatfloat, float newlonfloat,float
> newzoomfloat)
> {
> //initialisatie benodigde tijdelijke variabelen
> byte bytes[]=null;
> //
>
> com.bbn.openmap.proj.Mercator m = new
> com.bbn.openmap.proj.Mercator(new
> com.bbn.openmap.LatLonPoint(newlatfloat,newlonfloat),newzoomfloat,returnimagewidth,
> returnimageheight);
> System.out.println("still busy rendering");
>
> try
> {
> ///////testIS.wait(1500);
> bytes = testIS.getMapImage(m);
> }
> catch(Exception ex) {System.out.println(ex.toString());}
>
> System.out.println("rendered");
>
> return bytes;
> }
>
> { END CODE }
>
>
> in the function that communicates with the client the following happens:
> { CODE }
>
> response.setContentType("image/gif");
> OutputStream out = response.getOutputStream();
> System.out.println("writing stream");
> out.write(this.renderdata(templat,templon,zoomfloat));
> System.out.println("written");
>
> { END CODE }
>
> the imageserver properties have about the following:
>
> #
> ddd=lll
> layers=loclayer1 marker_name2 layer1
>
> ## stedelijke bebouwing
> marker_name2.prettyname=steden
> marker_name2.class=com.bbn.openmap.layer.shape.ShapeLayer
> marker_name2.shapeFile=/data/nlmapswgs84/Ref_A_WGS84/nlbk_r01.shp
> # marker_name2.spatialIndex=<path to generated spatial index file
> (.ssx)>
> marker_name2.lineColor=ff000000
> marker_name2.fillColor=FA0A0A
> # plus any other properties used by the DrawingAttributes object.
> #marker_name2.pointImageURL=<URL for image to use for point objects>
> #marker_name2.enabled=true/false
>
> layer1.class=com.bbn.openmap.layer.shape.ShapeLayer
> layer1.prettyName=wereldkaart
> layer1.shapeFile=/data/openmapdata/shape/dcwpo-browse.shp
> layer1.lineColor=ff000000
> layer1.fillColor=06C797
> # Add other attributes as required by layer1...
>
>
>
> Martijn van der Pauw, internetontwikkelaar.
> Meteo Consult
> martijn@weer.nl
> tel: 0317 - 399800
> fax: 0317 - 423164
> http://www.weer.nl
>
> --
> [To unsubscribe to this list send an email to "majdart@bbn.com"
> with the following text in the BODY of the message "unsubscribe
> openmap-users"]
>
>

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Don Dietrick, BBN Technologies, dietrick@bbn.com
10 Moulton Street, Cambridge, MA 02138
617-873-3031 [fax]-2794
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

--
[To unsubscribe to this list send an email to "majdart@bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Thu May 30 11:36:09 2002

This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:33 EDT