Class WFSCountDefaultUtil

java.lang.Object
org.tailormap.api.geotools.wfs.WFSCountDefaultUtil

public final class WFSCountDefaultUtil extends Object
Reads the maximum number of features a WFS 2.0.0 server returns for a GetFeature request, advertised in the capabilities as the CountDefault constraint (for example the GeoServer maxFeatures or MapServer wfs_maxfeatures setting). A server returns at most this number of features, even if a higher count is requested. WFS 1.x servers don't advertise their limit.
  • Method Details

    • getCountDefault

      public static Integer getCountDefault(org.geotools.api.data.DataAccess<?,?> dataStore)
      Get the CountDefault of a WFS from the capabilities GeoTools already retrieved when opening the data store, so no extra request is made.
      Parameters:
      dataStore - the data store, may be of any type
      Returns:
      the CountDefault, or null if the data store is not a WFS or the WFS has no (valid) CountDefault
    • getCountDefault

      public static Integer getCountDefault(Document capabilities)
      Get the CountDefault from a WFS capabilities document. A constraint on the GetFeature operation takes precedence over one for all operations.
      Parameters:
      capabilities - the capabilities document
      Returns:
      the CountDefault, or null if absent or not a positive integer