Can't I make a class in a WFS layer?
Myunghwa Hwang
mhwang4 at UIUC.EDU
Thu Aug 24 15:19:49 PDT 2006
Hello, list!
I have a WFS server and another WFS client, which are both using
MapServer.
In WFS client, I made a layer using data from WFS server.
I need all attribute items, but wanna add a class based on one of the
item.
So, I included one class in the WFS layer, but mapserver cgi showed
the following error:
msDrawMap(): Image handling error. Failed to draw layer named
'ohlung_wfs'.
msOGRLayerInitItemInfo(): OGR error. Invalid Field name: LWM68
My question is why mapserver cannot find field name.
Except wfs_filter, isn't there any method which enables class
defining using attribute from wfs server?
Another question is the same situation when I used gml file using ogr
connection.
I made another layer, which was based on gml from wfs server.
In this case, mapserver also couldn't recognize field name.
When I use gml source data, can't I make classes based on attributes?
If you guys have some tips, please share them with me.
Bye ..
P.S:
My layer definition is the following:
LAYER # ohio county map from sal-dev
NAME ohlung_wfs
CONNECTIONTYPE WFS
CONNECTION "http://sal-dev.sal.uiuc.edu/cgi-bin/mapserv?map=%
2FLibrary%2FWebServer%2FDocuments%2Fpywebspace%
2Fpywebspace_wfs_server.map"
TYPE POLYGON
STATUS DEFAULT
METADATA
"wfs_typename" "ohlung_ogr"
"wfs_version" "1.0.0"
"wfs_request_method" "GET"
"wfs_connectiontimeout" "60"
END # end of ohlung_wfs metadata
PROJECTION
"init=epsg:26917"
END # end of ohlung_wfs projection
CLASS
NAME 'Ohio_county_wfs'
STYLE
COLOR 200 255 0
OUTLINECOLOR 120 120 120
END # end of style
END # end of ohlung_wfs base class
CLASS
NAME 'LMW68 >= 1 %'
EXPRESSION ([LWM68] >= 1)
STYLE
COLOR 255 0 0
OUTLINECOLOR 0 0 0
END # end of style
END # end of class
END # end of ohlung_wfs layer
LAYER # ohio county map from gml, which came from sal-dev
NAME ohlung_gml
CONNECTIONTYPE OGR
CONNECTION "oh_tmp2.gml"
#DATA "SELECT * FROM oh_tmp.gml a LEFT JOIN '/Users/mhwang4/
Sites/PyWebSpace/out_data/
SM_SR_LMW68_ohlung_Queen.dbf'.SM_SR_LMW68_ohlung_Queen b ON
a.RECORD_ID = b.RECORD_ID"
STATUS OFF
TYPE POLYGON
#JOIN
# NAME 'ohgmljoin'
# TABLE "/Users/mhwang4/Sites/PyWebSpace/out_data/
SM_SR_LMW68_ohlung_Queen.dbf"
# FROM "RECORD_ID"
# TO "RECORD_ID"
# TYPE SINGLE
#END # end of join
PROJECTION
"init=epsg:26917"
END # end of ohlung_gml layer projection
#CLASS
# NAME 'Ohio_county_gml'
# STYLE
# COLOR 0 0 255
# OUTLINECOLOR 0 0 0
# END # end of ohlung_gml base class style
#END # end of ohlung_gml base class
CLASS
NAME 'SR >= 0.005 %'
EXPRESSION ([SR] >= 0.005)
STYLE
COLOR 255 0 0
OUTLINECOLOR 0 0 0
END # end of ohlung_gml test class style
END # end of ohlung_gml test class
#METADATA
# "wms_title" "ohiolung_smoothed"
#END
#DUMP TRUE
END
# End of smoothing_result layer definitions
------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20060824/af2904bd/attachment.htm>
More information about the MapServer-users
mailing list