WFS on 4.4.1 works and not on 4.6.0

Simpson asimpson at I-55.COM
Thu Nov 3 08:33:34 PST 2005


Is there any reason WFS getfeatures and describefeaturetype works fine in
4.4.1, but in 4.6.0 no features are returned from getfeatures, and the
describefeaturetype only describes the geometry.  The getcapabilities seems
to work ok.

I can see MS making the SQL calls in the PostGIS DB (4.6.0 is much different
than 4.4.1), and it looks as if its getting the four geometries ok ( I run
the SQL it issued and get the four rows back )

The only place I see it getting attribute data it issues:

DECLARE mycursor2 BINARY CURSOR FOR SELECT
name::text,description::text,an_int::text,comments::text,asbinary(force_coll
ection(force_2d(the_geom)),'NDR') from xxxx WHERE name = 0

There isn't a row with name = 0 in the table, so it will not get any rows,
but maybe all its after is data types?

The 4.4.1 version gets the geometry and oid, then loops through each oid
getting attribute, geom data:

DECLARE mycursor2 BINARY CURSOR FOR SELECT
name::text,description::text,an_int::text,comments::text,asbinary(force_coll
ection(force_2d(the_geom)),'NDR') from xxxx WHERE OID = 13350367

In case its useful, an almost identical map file works correctly, the table
has different columns and the SRID is 4326 not 32615.

Thanks for any suggestions,
Drew.

 ===========================================================================
========

MapServer version 4.4.1 OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP SUPPORTS=PROJ
SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT
SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT INPUT=TIFF INPUT=EPPL7 INPUT=POSTGIS
INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE DEBUG=MSDEBUG

MapServer version 4.6.0 OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=SVG
SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT
SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=THREADS INPUT=TIFF
INPUT=EPPL7 INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE DEBUG=MSDEBUG

 ===========================================================================
=========

#
# Start of map file
#
NAME DEMO
STATUS ON
SIZE 600 600

EXTENT 806141.887843 3346695.719558 810886.158231 3350349.755389
UNITS meters

SHAPEPATH "data"
IMAGECOLOR 255 255 255

DEBUG ON

# you may need to change this to match your MapServer build
IMAGETYPE png_rgb

#
# Projection definition, consult the PROJ.4 documentation for parameter
discussion
#
PROJECTION
  "init=epsg:32615"
END
# PROJECTION

OUTPUTFORMAT
  NAME png_rgb
  DRIVER "GD/PNG"
  MIMETYPE "image/png"
  IMAGEMODE RGB
  EXTENSION "png"
END


#
# Start of web interface definition (including WMS enabling metadata)
#
WEB
  IMAGEPATH "/var/www/ssl/html/scratch/"
  IMAGEURL "scratch/"
  METADATA
    "wfs_title" "WFS for xxx"
    "wfs_onlineresource" "https://www.xxx.xxx..."
    "wfs_srs" "EPSG:32615"
    "ows_schemas_location" "http://ogc.dmsolutions.ca"
  END
END


#
# Start of symbol definitions (we're only using a few)
#
SYMBOL
  NAME 'circle'
  TYPE ELLIPSE
  POINTS 1 1 END
  FILLED TRUE
END


#
# Start of layer definitions
#
LAYER
  NAME "xxxx"
  #STATUS OFF
  STATUS ON
  TYPE POLYGON
  DUMP TRUE
  CONNECTIONTYPE postgis
  CONNECTION "user=xxx password=xxx dbname=xxx host=xxx port=5432"
  DATA "the_geom from xxxx"
  #TEMPLATE "/var/www/ssl/html/xxx"
  #TOLERANCE 10
  #TOLERANCEUNITS meters
  PROJECTION
    "init=epsg:32615"
  END
  METADATA
    "wfs_title"  "xxxx"
    "wfs_srs"    "EPSG:32615"
    "wfs_abstract" "xxxx"
    "wfs_keywordlist" "xxxx"
  END
END
END




 =======================================================================
TABLE DEFINITION

   Column    |          Type          | Modifiers
-------------+------------------------+-----------
 name        | character(24)          | not null
 description | character varying(256) |
 the_geom    | geometry               |
 an_int      | integer                |
 comments    | character varying      |
Indexes:
    "xxxx_pkey" primary key, btree (name)
Check constraints:
    "$1" CHECK (srid(the_geom) = 32615)
    "$2" CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS
NULL)



More information about the MapServer-users mailing list