Opened 18 years ago

Closed 13 years ago

#1678 closed defect (fixed)

wfs_maxfeatures = 0

Reported by: cjohnson@… Owned by: jmckenna
Priority: normal Milestone: 5.6 release
Component: Documentation - MapServer Version: 4.6
Severity: normal Keywords:
Cc: banders@…

Description (last modified by dmorissette)

Presently, When one specifies wfs_maxfeatures = 0, it is essentially ignored,
and all features are returned with a WFS GetFeature request.

I plan on modifying this behavior such that wfs_maxfeatures = 0 returns 0
features with a WFS GetFeature request.



[Example MapFile]
Map
  ...
  WEB 
    METADATA 
      ...
      "wfs_maxfeatures" "0"
    END #end metadata  
  End #WEeb
...
End #Map

[Example Http request]
http://localhost/cgi-bin/mapserv.exe?map=C:\Program%20Files\Apache%20Group\Apache2\cgi-bin\maps\foo.map&VERSION=1.0.0&SERVICE=WFS&REQUEST=GetFeature&TYPENAME=bc_coastline


[Example results of http request with future wfs_maxfeatures = 0 support]
<?xml version='1.0' encoding="ISO-8859-1" ?>
<wfs:FeatureCollection
   xmls...
   ...
      <gml:boundedBy>
        extent information
        ...
      </gml:boundedBy>
    <gml:featureMember>
    </gml:featureMember>
</wfs:FeatureCollection>

Change History (14)

comment:1 by assefa, 18 years ago

Cc: mapserver-bugs@… added
Adding myself.

 The only note that I had was expressed in earlier e-mail :

 "The only thing that needed to be documented is that when you do a wfs query
and use the MAXFEATURES parameter (allowed values start with 1), It might end up
retruning nothing if the wfs_maxfeatures is set to 0."

 

comment:2 by banders@…, 18 years ago

Cc: banders@… added

comment:3 by assefa, 18 years ago

patch sent by Clint

1280,1284d1279
< 
< 	// handle case of maxfeatures = 0
< 	if(maxfeatures != 0){
< 	    msGMLWriteWFSQuery(map, stdout, maxfeatures, pszNameSpace, outputformat);
<     }
1285a1281,1282
>     msGMLWriteWFSQuery(map, stdout, maxfeatures, pszNameSpace, outputformat);
>     
1291c1288
<     if ((i==map->numlayers) || (maxfeatures == 0)) {
---
>     if (i==map->numlayers) {

comment:4 by assefa, 18 years ago

I have applied the patch as per comment #2 in mapserver cvs.

I have added a note in the documentation.
http://mapserver.gis.umn.edu/docs/howto/wfs_server/howto_view
 I will reassign this bug to jeff at the end.


Does it need to be ported to 4.8.x branch ? I personaly feel that since It is
not a bug correction, we should not, but If it is a must for you, we still can
do it I think.



comment:5 by banders@…, 18 years ago

Presently the patch is on the 4.9 branch only, right?  I would like to see this
applied to 4.8.x as well if that's possible.

comment:6 by assefa, 18 years ago

Daniel,

 what do you think about porting this to the 4.8 brach.  I am little bit
hesitant since It is not a bug fix and I always assumed that only bug fixes
would be added to these braches. On the other side, the addtion does not im-pact
other part of the software.  Please advice.

comment:7 by banders@…, 18 years ago

Assefa,

Any decision about whether the change will get into 4.8.x?

comment:8 by assefa, 18 years ago

Daniel 

 could you please comment on this ?

Thanks

comment:9 by dmorissette, 18 years ago

The change is only that  wfs_maxfeatures = 0  would be honoured, right?

To avoid introducing new bugs we should backport only real/serious bug fixes and
not introduce behavior changes. Since this is a trivial change that has very
little chances of affecting anything else and it fixes an interoperability issue
then I guess we can bend the rules and backport it.

comment:10 by assefa, 18 years ago

Owner: changed from cjohnson@… to jmckenna@…
Updated in the 4.8.x branch.

Assigned to Jeff for doc update (see comment #3)

comment:11 by jmckenna, 17 years ago

Milestone: 5.0 release
Owner: changed from jmckenna@… to jmckenna

comment:12 by jmckenna, 16 years ago

Component: WFS ServerMapServer Documentation

comment:13 by dmorissette, 15 years ago

Description: modified (diff)
Milestone: 5.6 release

comment:14 by havatv, 13 years ago

Resolution: fixed
Status: newclosed

Fixed for the 6.0 and trunk documentation in r11983. I have not touched the version 5 documentation. If it is necessary to fix in 5 also, please reopen.

I have inserted the following text:

Sensible values are integers greater than 0. If 0 is specified, no features will be returned.

Note: See TracTickets for help on using tickets.