[Mapserver-users] help with http://slkapps2.env.gov.bc.ca:80/servlet/com.esri.wms.esrimap wms server and php mapscript questions

Stephen Clark stephen.clark at focus.ca
Wed Nov 12 16:54:43 PST 2003


Tyler,

My app will retrieve wms images up to  and including 1000x1000. Above that I
get an error of which is posted far below.

I can now get the wms layers to generate to pdf correctly.

thanks
Stephen


----- Original Message ----- 
From: "Tyler Mitchell" <TMitchell at lignum.com>
To: "Stephen Clark" <stephen.clark at focus.ca>
Sent: Wednesday, November 12, 2003 3:06 PM
Subject: Re: [Mapserver-users] help with
http://slkapps2.env.gov.bc.ca:80/servlet/com.esri.wms.esrimap wms server and
php mapscript questions


>
>
>
>
>
> Now I'm reading your earlier message :)  I haven't used mapscript at all.
> Does your app get the image if you aren't outputting to pdf?
>
> "Stephen Clark" <stephen.clark at focus.ca> wrote on 11/12/2003 01:50:32 PM:
>
> > Tyler,
> >
> > I am trying to produce some sample pdf files using this wms server as a
> > raster backdrop.
> >
> > Currently I can not get the raster layer to be retrieved from this
server
> > for use as a transparent png file.
> >
> > Have you had any luck with generating pdf files using php mapscript and
> > using this wms server?
> >
> >
> >
> > Stephen
> >
> >
> > ----- Original Message -----
> > From: "Tyler Mitchell" <TMitchell at lignum.com>
> > To: "Stephen Clark" <stephen.clark at focus.ca>
> > Sent: Wednesday, November 12, 2003 8:58 AM
> > Subject: Re: [Mapserver-users] help with
> > http://slkapps2.env.gov.bc.ca:80/servlet/com.esri.wms.esrimap wms server
> and
> > php mapscript questions
> >
> >
> > >
> > >
> > >
> > >
> > >
> > > I don't know if this is an issue for you, but I repeatedly crapped out
> > this
> > > WMS connection when requesting larger images (I think >2048x2048).  It
> > > appeared to me to be a timeout issue, but really wasn't - it was the
> WMS
> > > server telling me to take a hike.  Unfortunately these limitations are
> not
> > > advertised by the WMS server.
> > >
> > > I'm interested in what you are using the service for and what kind of
> > > response times you are getting.
> > >
> > > Tyler
> > >
> > > mapserver-users-admin at lists.gis.umn.edu wrote on 11/12/2003 09:04:19
> AM:
> > >
> > > > Hi all,
> > > >
> > > > I have been trying to render the raster that is returned from this
> > > > wms server to a PDF file.
> > > >
> > > > Here is my layer:
> > > >
> > > > ### WMS BC GOV -- Trim Orthophotomosaic --
> > > > LAYER
> > > >   NAME trimphoto
> > > >   TYPE RASTER
> > > >   STATUS ON
> > > >   CONNECTIONTYPE WMS
> > > >    CONNECTION "http://slkapps2.env.gov.bc.ca:80/servlet/com.esri.
> > > > wms.Esrimap?WMTVER=1.0.0&ServiceName=wms26910&LAYERS=TRIM%
> > > > 20Orthomosaic&FORMAT=PNG&TRANSPARENT=TRUE"
> > > >   METADATA
> > > >     WMS_SRS "EPSG:26910"
> > > >     WMS_TITLE "TRIM photo"
> > > >     "wms_connectiontimeout" "60"
> > > >
> > > >   END
> > > > END
> > > >
> > > >
> > > > In my php mapscript file I use the following code to render the WMS
> > > > layer as an image to then add to my PDF file.
> > > >
> > > > // set all layers to off
> > > > for ($counter = 0; $counter < $number_of_layers_in_mapfile ;
> $counter++)
> > > > {
> > > >  $layer = $map->getLayer($counter);
> > > >  $layer->set(status, 0);
> > > > }
> > > >
> > > >
> > > > // set only the selected layers to be on
> > > > for ($counter = 0; $counter < $size_of_listarray; $counter++)
> > > > {
> > > >  // get layer
> > > >  $layer = $map->getLayerbyName($listarray[$counter]);
> > > >  $layer->set(status, 1);
> > > > }
> > > >
> > > >
> > > > // render the image to png
> > > > print "rendering image ... <br>\n";
> > > > $image=$map->draw();
> > > > print "finished rendering image ... <br>\n";
> > > > $image_url=$image->saveWebImage();
> > > >
> > > >
> > > > Errors from my pdf generator function:
> > > >
> > > > rendering image ...
> > > >
> > > > Warning: [MapServer Error]: msDrawMap(): Failed to draw layer named
> > > > 'trimphoto'. in C:\Program Files\Apache
> > > > Group\Apache2\htdocs\nebcdemo-11_make_quick_pdf02.php on line 180
> > > >
> > > > Warning: [MapServer Error]: msDrawRaster(): Unrecognized or
> > > > unsupported image format in C:\Program Files\Apache
> > > > Group\Apache2\htdocs\nebcdemo-11_make_quick_pdf02.php on line 180
> > > >
> > > > Warning: [MapServer Error]: drawEPP(): EPPL7 support is not
> available.
> > in
> > >
> > > > C:\Program Files\Apache
> > > Group\Apache2\htdocs\nebcdemo-11_make_quick_pdf02.php
> > > > on line 180
> > > > finished rendering image ...
> > > >
> > > > Fatal error: Call to a member function on a non-object in C:\Program
> > > > Files\Apache Group\Apache2\htdocs\nebcdemo-11_make_quick_pdf02.php
on
> > > line 182
> > > >
> > > >
> > > >
> > > > Questions:
> > > >
> > > > 1. If the time required to get the PNG image from the wms server is
> > > > fairly long, will that create the error I posted.
> > > >
> > > > 2. Is there another set of functions to process WMS layers and add
> > > > them to the resulting PNG file?
> > > >
> > > >
> > > > thanks for you time
> > > > Stephen
> > >
> > >
> >
>
>




More information about the MapServer-users mailing list