Opened 14 years ago

Closed 14 years ago

#1533 closed defect (fixed)

[WFS] Feature count returned less than values of MaxFeatures

Reported by: liuar Owned by: liuar
Priority: low Milestone:
Component: WFS Interface Version: 2.2.0
Severity: trivial Keywords:
Cc: External ID: 1361400

Description

Steps:

  1. Load sample sheboygan data.
  2. Configure WFS Service by Site Administrator.
  3. Send Request as below ( replace IP:Port as yours)

http://<IP:Port>/mapguide/mapagent/mapagent.fcgi?REQUEST=GetFeature&SERVICE=WFS&TypeName=ns146044037:CityLimits&version=1.1.0&MAXFEATURES=2

Results:
Only 1 feature returned.

Expected results:
2 features should be returned per specification of WFS.

Change History (2)

comment:1 by liuar, 14 years ago

Two factors could result in this issue:

Because the MgServerFdoFeatureReader in MapGudie server uses -1 to mark empty, while MgWfsFeatures in MapGuide web tier uses 0, so there will be 1 more feature returned from MapGuide server. So I updated the maxFeatures value from numFeaturesToRetrieve to numFeaturesToRetrieve-1

Ptr<MgByteReader> resultReader = featureService->GetWfsFeature(featureSourceId, ((sSchemaHash.size()==0) ? sClass : sSchemaHash + _(":") + sClass), requiredProperties, m_getFeatureParams->GetSrs(), filter, numFeaturesToRetrieve-1, sVersion, sOutputFormat, sSortCriteria, sPrefix, oFeatureTypes.GetNamespaceUrl());


Read schema namespaces will cause m_iMaxFeatures-- which will cause the last feature lost from the response gml document, so I add m_iMaxFeatures's value while reading schema namespaces.

comment:2 by liuar, 14 years ago

Resolution: fixed
Status: newclosed

Changeset [5399] by liuar

Note: See TracTickets for help on using tickets.