[mapserver-users] Defining Field Types in WFS

Burgholzer, Robert (DEQ) Robert.Burgholzer at deq.virginia.gov
Fri Jul 12 07:44:32 PDT 2013


We are having trouble with our WFS service, trying to define data field types as Numeric.  Our mapserver version is 5.6.3.  Currently, our field types all come out as String when viewed in ArcGIS, and when we try to set the field to a Real type, using the syntax shown in Ex 1 the service breaks, Ex 2 shows the working layer, and Ex 3 shows the full, working layer definition.

Any help would be most appreciated,
r.b.


Ex 1 - BREAKS the Service:

   METADATA
      "wfs_title"    "Water Supply Plan System Information Test" ## REQUIRED
      "wfs_srs"           "EPSG:4326" ## REQUIRED
      "gml_featureid" "system_nid" ## REQUIRED
      "gml_include_items" "all"  ## Optional (serves all attributes for layer)
      "wfs_enable_request" "*"
     "wfs_version" "1.0.0"
      "gml_current_mgy_type" "Real"
   END


Ex 2 - WORKS but gives all type String

   METADATA
      "wfs_title"    "Water Supply Plan System Information Test" ## REQUIRED
      "wfs_srs"           "EPSG:4326" ## REQUIRED
      "gml_featureid" "system_nid" ## REQUIRED
      "gml_include_items" "all"  ## Optional (serves all attributes for layer)
      "wfs_enable_request" "*"
     "wfs_version" "1.0.0"
   END

Ex 3 - FULL Layer definitions:

LAYER
   NAME wsp_system_info_test
   METADATA
      "wfs_title"    "Water Supply Plan System Information Test" ## REQUIRED
      "wfs_srs"           "EPSG:4326" ## REQUIRED
      "gml_featureid" "system_nid" ## REQUIRED
      "gml_include_items" "all"  ## Optional (serves all attributes for layer)
      "wfs_enable_request" "*"
     "wfs_version" "1.0.0"
      "gml_current_mgy_type" "Real"
   END
   #GROUP vwuds_max
   CONNECTIONTYPE postgis
   CONNECTION "host=deq3.bse.vt.edu user=wsp_ro password=314159 dbname=drupal715"
   TYPE POINT
   STATUS DEFAULT
  DUMP TRUE
   DEBUG ON
   DATA "the_geom FROM (select * from wsp_system_locations ) AS foo USING UNIQUE system_nid"
   #FILTER "leapyear <> true"
   TEMPLATE drought.html
   #MINSCALE 1000
   #MAXSCALE 50000
   CLASS
      SYMBOL 'circle'
      SIZE 11
      NAME "precip_nml"
      COLOR 245 245 245
      BACKGROUNDCOLOR 245 245 245
      OUTLINECOLOR 0 0 0
   END
   TOLERANCE 10
   PROJECTION
   # EPSG SRID = 4326
     "init=epsg:4326"
   END
END

Robert  Burgholzer
Surface Water Modeler
Virginia DEQ Office of Surface and Ground Water Supply
804-869-3066

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20130712/d9168fa1/attachment.htm>


More information about the MapServer-users mailing list