[Mapserver-users] getFeatureInfo on dynamic layer - emptyexception

Debbie Pagurek pagurekd at agr.gc.ca
Mon Nov 3 08:45:59 PST 2003


Aside from trying to do a getfeatureinfo request - are you able to even
just see the image of your dynamic layer when you set up your dynamic
layer within a mapfile like this?

I am asking because in order for me to see my dynamic layer of points
via a wms request from within a mapfile, I need to add some parameters
to the connection string.  Here's what my LAYER looks like in my mapfile


( by the way I haven't tested getfeatureinfo - I don't really
understand this part yet because it looks to me like you would need an
interface with a query tool on it and it is Mapserver that then forms a
query request and it would need to know how to generate a getfeatureinfo
request?)

Here is my LAYER and I can see the image of my dynamic layer points:
LAYER
  NAME "taxa"
  TYPE RASTER
  STATUS ON
  TEMPLATE VOID
  CONNECTION
"http://myhost/mapdata/itis/testscript.php?version=1.1.0&request=Getmap&layers=Cyanocitta%20cristata&format=image/png"
  CONNECTIONTYPE WMS
  PROJECTION
    "init=epsg:4326"
  END
  METADATA
    "wms_title" "test"
    "wms_srs" "EPSG:4326"
    "wms_abstract" "itis wms layer"
    "wms_extent" "-180 -90 180 90"
    "wms_opaque" "1"
    "wms_onlineresource"
"http://latlong24.gis.agr.gc.ca/mapdata/itis/testscript.php?version=1.1.0&request=Getmap&layers=Cyanocitta%20cristata"
    "wms_server_version" "1.1.0"
    "wms_name" "test"
  END
END

I can then see the dynamic layer in the browser when I send the URL:
http://latlong24.gis.agr.gc.ca/cgi-bin/mapserv_40?map=/usr/www/httpd/htdocs/mapdata/itis/test.map&Layers=taxa&mode=map

this is different from what you are trying to do with your URL, which
is trying sending a WMS getfeatureinfo request to your dynamic layer via
a wms layer included in a mapfile.
Are you able to send a getfeatureinfo request directly to your script
http://my.ip/kmvims/test4.php 
as in
http://my.ip/kmvims/test4.php?version=1.1.0&request=getfeatureinfo&query_layers=wms&x=251&y=329&INFO_FORMAT=text/plain??

Debbie



>>> "Frieso ter Haseborg" <ter-haseborg at sf-datentechnik.de> 11/03/03
11:23AM >>>
Hi Debbie,

thanks for your response.

>[...]
>I wonder if you have a problem because you have named your layer
>"wms" and maybe this is a reserved word.  Try naming your layer
>something else?
Looks like the layer-name is not cause of the problem, with a more
qualified term or simply any other "non-reserved-word"-name it doesn't
work either.

>[...]
>another thing I see is that you are requesting a WMS layer, but you
>have specified TYPE POLYGON in your mapfile Layer section.
>It should be TYPE RASTER.
Whoops! Sorry, these are remains of my desperate trials to isolate the
problem. I had the idea that perhaps getFeatureInfo-requests would
only
be executed on non-raster layers. But there's no difference in this
special problem when changing the layer-type: in both cases the php
simply isn't called at all.

TIA,
Frieso

>-----Original Message-----
>From: Debbie Pagurek [mailto:pagurekd at agr.gc.ca] 
>Sent: Monday, November 03, 2003 4:41 PM
>To: Frieso ter Haseborg
>Cc: mapserver-users at lists.gis.umn.edu 
>Subject: RE: [Mapserver-users] getFeatureInfo on dynamic layer -
>emptyexception
>
>
>Hi Frieso,
>I will look into this a bit more carefully in a bit, but right off
the
>bat I wonder if you have a problem because you have named your layer
>"wms" and maybe this is a reserved word.  Try naming your layer
>something else?
>
>Debbie
>
>>>> "Frieso ter Haseborg" <ter-haseborg at sf-datentechnik.de> 11/03/03
>06:25AM >>>
>Hi Debbie,
>
>from the PHP/MapScript for dynamic layer creation you shared with us
I
>learned, that you're doing getFeatureInfos against a php-created
layer.
>
>
>Does the error description below sound similar to anything you ran
>against during your development? Or are there any
>configuration-differences in the mapfile compared to your approach?
>
>Since there was low feedback from the list on this , I hope you could
>give me a hint.
>
>TIA,
>Frieso
>
>>-----Original Message-----
>>From: Frieso ter Haseborg 
>>Sent: Tuesday, October 28, 2003 9:52 AM
>>To: mapserver-users at lists.gis.umn.edu 
>>Subject: [Mapserver-users] getFeatureInfo on dynamic layer - empty
>>exception
>>
>>
>>Hi,
>>
>>I ran into a problem doing a getFeatureInfo-request on a dynamic
>layer.
>>I've got a PHP/Mapscript-component to build dynamic layers, this
>works
>>well on getMap-requests. Trying to do a getFeatureInfo-request I get
>>some strange results:
>>
>>When performin a request with a url like this:
>>
>>http://my.ip/cgi-bin/mapserv.exe?map=../htdocs/ims.map&version= 
>>1.1.0&req
>>uest=getFeatureInfo&query_layers=wms&x=251&y=329&INFO_FORMAT=te
>>xt/plain&
>>BBOX=2574700,5752000,2589700,5767000
>>
>>I get an xml-doc with an empty exception statement:
>>
>><?xml version='1.0' encoding="ISO-8859-1" standalone="no" ?>
>><!DOCTYPE ServiceExceptionReport SYSTEM
>>"http://www.digitalearth.gov/wmt/xml/exception_1_1_0.dtd">
>><ServiceExceptionReport version="1.1.0">
>><ServiceException>
>></ServiceException>
>></ServiceExceptionReport>
>>
>>This is the corresponding part of the mapfile:
>>
>>LAYER
>>   NAME "wms"
>>   TEMPLATE test.html
>>   STATUS ON
>>   TYPE POLYGON
>>   CONNECTION "http://my.ip/kmvims/test4.php"
>>   CONNECTIONTYPE WMS
>>   TOLERANCE 3
>>   METADATA
>>     "wms_srs"             "EPSG:26915 EPSG:42101 EPSG:4269
EPSG:4326
>>EPSG:42304"
>>     "wms_name"            "wms"
>>     "wms_title"				"test"
>>     "wms_server_version"  "1.1.0"
>>     "wms_formatlist"     
>"image/gif,image/png,image/jpeg,image/wbmp"
>>     "wms_format"          "image/gif"
>>     "WMS_FEATURE_INFO_MIME_TYPE"    "text/html"
>>
>>   END
>>   OFFSITE 255 255 255
>>END
>>
>>system-configuration: Win2k; Apache 2.0.47; MS 4.0; PHP 4.3.2, 
>>MapScript
>>rev 1.177
>>
>>The getFeatureInfo-request works fine on my shape-layers but no
>success
>>on the dynamic layer. And what's oddest, the php in my dynamic layer
>>seems not to be executed at all. When doing a getFeatureInfo-request
>I
>>do just a echo "test"; and log the get-Parameters into a logfile.
But
>>the log stays untouched, whereas the log works fine on the
>>getMap-request. Any ideas? 
>>
>>Any hint would be appreciated.
>>
>>TIA,
>> 
>>Frieso ter Haseborg
>>- Software Development - 
>> 
>>--
>>
>>-------------------------------------------------- 
>>S&F Datentechnik GmbH&Co.KG 
>>Reimersstr. 41b 
>>26789 Leer, Germany
>>
>>
>>
>>_______________________________________________
>>Mapserver-users mailing list
>>Mapserver-users at lists.gis.umn.edu 
>>http://lists.gis.umn.edu/mailman/listinfo/mapserver-users 
>>
>>
>
>_______________________________________________
>Mapserver-users mailing list
>Mapserver-users at lists.gis.umn.edu 
>http://lists.gis.umn.edu/mailman/listinfo/mapserver-users 
>
>



More information about the MapServer-users mailing list