WMS GetFeatureInfo response question/issue

Nick Floersch Nick at STONE-ENV.COM
Fri Jan 13 13:31:48 EST 2006


I am trying to use Queryable WMS with MapServer as my WMS server.
 
After some initial confusion, it would seem I have my basic toolset
working, because I can issue a query and get a response.
 
However, my response lacks useful feature data. This is what has
confounded me. From the tutorials/documentatation/e-mail lists I've
read, it seems like MapServer lacks any sort of way to control what
feature data is returned... you turn on DUMP TRUE and you just get
everything under the point you queried. I look at the shape file which
is the data source for my query layer, and the shape file DBF has
roughly 20 different attributes... strings, integers, and floats. Lots
of stuff. The layer is a polygon layer.
 
If the point I query does not hit a polygon, no data is returned (well,
the GML returned is an empty shell).
If I hit a point, I get the GML coordinates and that is it.
 
--- snip ---
<msGMLOutput>
<ParcelsBySystemTypeAndInstallDate_layer>
<ParcelsBySystemTypeAndInstallDate_feature>
<gml:boundedBy>
<gml:Box srsName="EPSG:26945">
<gml:coordinates>
6351230.073489,1837213.999341 6351887.175583,1837921.120908
</gml:coordinates>
</gml:Box>
</gml:boundedBy>
</ParcelsBySystemTypeAndInstallDate_feature>
</ParcelsBySystemTypeAndInstallDate_layer>
</msGMLOutput>
--- snip ---
(for example)
 
SO, that is my output. My MapFile looks like:
--- snip ---
[.. typical Map header stuff ..]
 WEB
  METADATA
   "wms_title" "Malibu-IWIMS-GIS"
   "wms_onlineresource"
"http://192.168.224.120/cgi-bin/mapserv?map=../public_html/GIS/maps/Mali
bu.map&"
   "wms_srs" "EPSG:26945"
   END
  LOG "/httpd/Malibu/logs/mslog"
   END
 
########################################################################
######
 PROJECTION
  "init=epsg:26945"
   END
[..More layers and stuff..]
 
########################################################################
######
 LAYER # THIS IS THE DYNAMICALLY SETUP LAYER
  NAME "ParcelsBySystemTypeAndInstallDate"
  STATUS ON
  DATA "TempShape"
  TYPE POLYGON
  TEMPLATE "Blank.html"
  HEADER "Blank.html"
  FOOTER "Blank.html"
  DUMP TRUE
  METADATA
   "wms_title"         "Parcels with Systems where System Type is
Conventional, shaded by Install Date"
   "wms_onlineresource"
"http://192.168.224.120/cgi-bin/mapserv?map=../public_html/GIS/maps/Mali
bu.map&"
   "wms_srs"        "EPSG:26945"
   END
  PROJECTION
   "init=epsg:26945"
    END
  CLASSITEM 'INSTALLDAT'
  CLASS
   NAME "No Classification"
   EXPRESSION ''
   STYLE
    COLOR 128 128 128
    OUTLINECOLOR 255 255 255
    ANTIALIAS true
    END
   END
  CLASS
   NAME 'Unspecified Date'
   EXPRESSION ''
   STYLE
    COLOR 100 100 100
    OUTLINECOLOR 255 255 255
    ANTIALIAS true
    END
   END
  CLASS
   NAME '2002-06-03 -> 1997-06-03'
   EXPRESSION (('[INSTALLDAT]' le '2002-06-03') and ('[INSTALLDAT]' gt
'1997-06-03'))
   STYLE
    COLOR 255 128 128
    OUTLINECOLOR 16 16 16
    ANTIALIAS true
    END
   END
  CLASS
   NAME '1997-06-03 -> 1992-06-03'
   EXPRESSION (('[INSTALLDAT]' le '1997-06-03') and ('[INSTALLDAT]' gt
'1992-06-03'))
   STYLE
    COLOR 128 255 128
    OUTLINECOLOR 16 16 16
    ANTIALIAS true
    END
   END
  CLASS
   NAME '1992-06-03 -> 1987-06-03'
   EXPRESSION (('[INSTALLDAT]' le '1992-06-03') and ('[INSTALLDAT]' gt
'1987-06-03'))
   STYLE
    COLOR 128 128 255
    OUTLINECOLOR 16 16 16
    ANTIALIAS true
    END
   END
  CLASS
   NAME '1987-06-03 -> 1982-06-03'
   EXPRESSION (('[INSTALLDAT]' le '1987-06-03') and ('[INSTALLDAT]' ge
'1979-01-01'))
   STYLE
    COLOR 96 255 0
    OUTLINECOLOR 16 16 16
    ANTIALIAS true
    END
   END
  END
--- snip ---
Note that, I have tried adding TEMPLATE entries inside of each class,
and it has not changed the output result.
 
I am using Mapserver 4.6.1
 
So... how do I get my layer to return more attribute data than just
coordinates?
 
Here is a list of the attributes in the shapefile.
--- snip ---
$> dbfdump --info TempShape.dbf 
Filename:       TempShape.dbf
Version:        0x03 (ver. 3)
Num of records: 756
Header length:  865
Record length:  1362
Last change:    1995/7/26
Num fields:     26
Field info:
Num     Name            Type    Len     Decimal
1.      APN             C       20      0
2.      TRA             C       11      0
3.      EDITORNAME      C       35      0
4.      DISCHARGET      C       31      0
5.      USECODE         C       11      0
6.      UNIT            C       11      0
7.      UDATE           C       16      0
8.      PHASE           C       11      0
9.      MOVED           C       11      0
10.     PARCELIDST      C       255     0
11.     BLOCK           C       11      0
12.     PARCELID        N       11      0
13.     SYSTEMTYPE      C       255     0
14.     PCLTYPE         C       11      0
15.     INSTALLDAT      C       255     0
16.     SHAPE_AREA      N       19      0
17.     SUBDTYPE        C       11      0
18.     SHAPE_LEN       N       19      0
19.     PERIMETER       N       19      0
20.     AREA            N       19      0
21.     LOT             C       11      0
22.     AIN             C       11      0
23.     OID_            N       11      0
24.     TRACT           C       20      0
25.     OBJECTID        N       11      0
26.     SYSTEMID        C       255     0
--- snip ---
and here is a sample record:
--- snip ---
OGRFeature(TempShape):335
  APN (String) = 4452-011-033
  TRA (String) = (null)
  EDITORNAME (String) = (null)
  DISCHARGET (String) = Small Commercial
  USECODE (String) = (null)
  UNIT (String) = (null)
  UDATE (String) = 0
  PHASE (String) = (null)
  MOVED (String) = (null)
  PARCELIDST (String) = 4452011033
  BLOCK (String) = (null)
  PARCELID (Integer) = 204481
  SYSTEMTYPE (String) = Conventional
  PCLTYPE (String) = (null)
  INSTALLDAT (String) = (null)
  SHAPE_AREA (Integer) = 22868
  SUBDTYPE (String) = (null)
  SHAPE_LEN (Integer) = 596
  PERIMETER (Integer) = 596
  AREA (Integer) = 22868
  LOT (String) = (null)
  AIN (String) = 4452011033
  OID_ (Integer) = 1792
  TRACT (String) = (null)
  OBJECTID (Integer) = 900225
  SYSTEMID (String) = 205760
  POLYGON ((6354269.883 1835660.066,6354143.342 1835646.922,6354142.028
1835646.739,6354141.200 1835646.661,6354140.371 1835646.613,6354139.540
1835646.594,6354138.709 1835646.603,6354137.878 1835646.641,6354137.050
1835646.709,6354136.224 1835646.805,6354135.403 1835646.930,6354134.586
1835647.084,6354133.775 1835647.266,6354132.971 1835647.476,6354132.174
1835647.714,6354131.387 1835647.980,6354130.609 1835648.273,6354129.842
1835648.594,6354129.087 1835648.940,6354128.344 1835649.313,6354127.614
1835649.712,6354126.899 1835650.136,6354126.199 1835650.584,6354125.516
1835651.056,6354124.849 1835651.553,6354124.200 1835652.072,6354123.569
1835652.614,6354122.958 1835653.176,6354122.367 1835653.760,6354121.796
1835654.365,6354121.247 1835654.989,6354120.720 1835655.632,6354120.216
1835656.293,6354119.735 1835656.971,6354119.278 1835657.665,6354118.845
1835658.375,6354118.439 1835659.100,6354118.056 1835659.838,6354117.701
1835660.589,6354117.371 1835661.352,6354117.068 1835662.126,6354116.793
1835662.911,6354116.545 1835663.704,6354116.325 1835664.505,6354116.133
1835665.315,6354115.970 1835666.129,6354115.835 1835666.949,6354115.729
1835667.774,6354115.651 1835668.602,6354115.603 1835669.431,6354102.028
1835793.535,6354116.428 1835795.234,6354252.761 1835811.328,6354269.883
1835660.066))
--- snip ---
 
Thank you in advance for your reponse,
Nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20060113/5e51055e/attachment.html


More information about the mapserver-users mailing list