Hello Thomas, Thanks for your answer,
It was sure the right answer. I did try it with unique, but forgot the srid. It works now for both query and wfs. Strange that WMS and just type=map requests will work without these unique and srid statements. Thanks! Gerben Tiemens -----Oorspronkelijk bericht----- Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Namens Tellett Verzonden: Thursday, October 16, 2008 4:00 PM Aan: [email protected] Onderwerp: Re: [MAPSERVER-USERS] Query using template and WFS errorred on POSTGIS Hi Gerben, not sure if this is the reason why but I noticed that under the layer block you set Data as ' DATA 'the_geom FROM pr2007' ', I think you need a "USING UNIQUE" clause in there to specify which column in the table can act as a unique identifier and maybe an srid clause as well to specify the projection of the postgis table. For instance USING UNIQUE ogc_fid USING SRID =32633. (Where ogc_fid is the unique identifier in my postgis table and 32633 is the EPSG code of the table data) Try appending these clauses to the 'Data' line in your layer block and see what happens. G. Tiemens wrote: > > Hello List, > > I want to try to get certain features-attribute information back from > my postgis database via Mapserver. > > I tried this in 2 ways: > Enabeling WFS in the mapfile and making a query layer. > > Both requests generate errors on the Postgis Database and i can't > discover what is going wrong. > > > > Both queries are also done with shapefile data, and that works fine. I > get features back (wfs) or the template (nquery) is filled in > correctly > > > Below the parts of my mapfile and templates. > > Mapfile: > LAYER NAME 'pr2007' TYPE POLYGON CONNECTIONTYPE postgis > CONNECTION 'host=127.0.0.1 user=***** dbname=*****' DATA 'the_geom > FROM pr2007' #DATA 'C:\Project\Downloads\OSM\Data\pr\pr2007' > PROCESSING "CLOSE_CONNECTION=DEFER" METADATA 'ows_title' > 'prov2007' "ows_abstract" "" "ows_keywordlist" "" > "gml_featureid" > "gid" ## REQUIRED "gml_include_items" "all" ## Optional (serves all > attributes for layer) "ows_srs" "EPSG:28992" # "queryable" > "true" > "wfs_geometry_element_name" "the_geom" "wfs_extent" "12500 380000 > 280000 550000" END #DUMP TRUE STATUS ON #DEFAULT #opacity > 100 PROJECTION "init=epsg:28992" END HEADER > "imapheader.html" > FOOTER "imapfooter.html" CLASS COLOR 0 0 0 TEMPLATE > "bodytemplate.html" END END > > > > > > -- View this message in context: http://www.nabble.com/Query-using-template-and-WFS-errorred-on-POSTGIS-tp20012197p20014232.html Sent from the Mapserver - User mailing list archive at Nabble.com. _______________________________________________ mapserver-users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/mapserver-users << Please read our E-mail Disclaimer at the Grontmij Corporate website >> _______________________________________________ mapserver-users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/mapserver-users
