<?xml version="1.0" encoding="UTF-8"?>
<wfs:WFS_Capabilities
  xmlns="http://www.opengis.net/wfs/2.0"
  xmlns:wfs="http://www.opengis.net/wfs/2.0"
  xmlns:ows="http://www.opengis.net/ows/1.1"
  xmlns:fes="http://www.opengis.net/fes/2.0"
  xmlns:SPD="https://maps.data.gov.scot/arcgis/admin/services/NRS/SPD/MapServer/WFSServer"
  xmlns:xlink="http://www.w3.org/1999/xlink"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  version="2.0.0"  xsi:schemaLocation="http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0/wfs.xsd https://maps.data.gov.scot/arcgis/admin/services/NRS/SPD/MapServer/WFSServer https://maps.data.gov.scot:443/arcgis/services/NRS/SPD/MapServer/WFSServer?service=wfs%26version=2.0.0%26request=DescribeFeatureType"
>
  <ows:ServiceIdentification>
    <ows:Title>WFS</ows:Title>
    <ows:Abstract>The Scottish Postcode Directory (SPD) is the definitive source for postcode geographies in Scotland, updated twice a year by National Records of Scotland (NRS). It is a comprehensive geographical lookup file that maps all postcodes in Scotland to higher geographical levels, such as council areas and data zones, and contains both current and deleted postcodes. The SPD includes: 1) A list of live and deleted postcodes across Scotland (Postcode Index); 2) Mapping of postcodes to higher geographical areas like census output areas, data zones, and council areas; 3) Digital boundaries for live postcodes, sectors and districts; 4)Digital point locations for live postcodes, sectors and districts (grid references).  The SPD is used to link postcodes to other data sources and higher geographies, and helps to understand and analyse geographical patterns in Scotland. Note the published version of the SPD does not include Royal Mail information on Delivery Point Count (DPC), Delivery Point Count Non-Residential (DPCNR) or Household Count (HC). Those interested in this information should enquire with geographycustomerservices@nrscotland.gov.uk.</ows:Abstract>
    <ows:Keywords>
      <ows:Keyword>ESRI(LongLat)</ows:Keyword>
      <ows:Keyword>Statistical</ows:Keyword>
      <ows:Keyword>units</ows:Keyword>
      <ows:Keyword>statistical</ows:Keyword>
      <ows:Keyword>data</ows:Keyword>
      <ows:Keyword>Boundaries</ows:Keyword>
      <ows:Keyword>Postcodes</ows:Keyword>
    </ows:Keywords>
    <ows:ServiceType>WFS</ows:ServiceType>
    <ows:ServiceTypeVersion>2.0.0</ows:ServiceTypeVersion>
    <ows:Fees>None</ows:Fees>
    <ows:AccessConstraints>No limitations to public access</ows:AccessConstraints>
  </ows:ServiceIdentification>
  <ows:ServiceProvider>
    <ows:ProviderName>National Records of Scotland</ows:ProviderName>
    <ows:ServiceContact>
      <ows:IndividualName>Geography</ows:IndividualName>
      <ows:PositionName>Geography Branch</ows:PositionName>
      <ows:ContactInfo>
        <ows:Phone>
          <ows:Voice></ows:Voice>
          <ows:Facsimile></ows:Facsimile>
        </ows:Phone>
        <ows:Address>
          <ows:DeliveryPoint>General Register House, 2 Princes Street</ows:DeliveryPoint>
          <ows:City>City of Edinburgh</ows:City>
          <ows:AdministrativeArea>City of Edinburgh</ows:AdministrativeArea>
          <ows:PostalCode>EH1 3YY</ows:PostalCode>
          <ows:Country>United Kingdom</ows:Country>
          <ows:ElectronicMailAddress>geographycustomerservices@nrscotland.gov.uk</ows:ElectronicMailAddress>
        </ows:Address>
        <ows:OnlineResource xlink:href="https://maps.data.gov.scot/arcgis/admin/services/NRS/SPD/MapServer/WFSServer"/>
        <ows:HoursOfService></ows:HoursOfService>
        <ows:ContactInstructions></ows:ContactInstructions>
      </ows:ContactInfo>
      <ows:Role>Publisher</ows:Role>
    </ows:ServiceContact>
  </ows:ServiceProvider>
  <ows:OperationsMetadata>
    <ows:Operation name="GetCapabilities">
      <ows:DCP>
        <ows:HTTP>
          <ows:Get xlink:href="https://maps.data.gov.scot:443/arcgis/services/NRS/SPD/MapServer/WFSServer?"/>
          <ows:Post xlink:href="https://maps.data.gov.scot:443/arcgis/services/NRS/SPD/MapServer/WFSServer"/>
        </ows:HTTP>
      </ows:DCP>
      <ows:Parameter name="AcceptVersions">
        <ows:AllowedValues>
          <ows:Value>1.0.0</ows:Value>
          <ows:Value>1.1.0</ows:Value>
          <ows:Value>2.0.0</ows:Value>
      </ows:AllowedValues>
      </ows:Parameter>
    </ows:Operation>
    <ows:Operation name="DescribeFeatureType">
      <ows:DCP>
        <ows:HTTP>
          <ows:Get xlink:href="https://maps.data.gov.scot:443/arcgis/services/NRS/SPD/MapServer/WFSServer?"/>
          <ows:Post xlink:href="https://maps.data.gov.scot:443/arcgis/services/NRS/SPD/MapServer/WFSServer"/>
        </ows:HTTP>
      </ows:DCP>
    <ows:Parameter name="outputFormat">
      <ows:AllowedValues>
        <ows:Value>text/xml; subtype=gml/3.2</ows:Value>
      </ows:AllowedValues>
    </ows:Parameter>
    </ows:Operation>
    <ows:Operation name="GetPropertyValue">
      <ows:DCP>
        <ows:HTTP>
          <ows:Get xlink:href="https://maps.data.gov.scot:443/arcgis/services/NRS/SPD/MapServer/WFSServer?"/>
          <ows:Post xlink:href="https://maps.data.gov.scot:443/arcgis/services/NRS/SPD/MapServer/WFSServer"/>
        </ows:HTTP>
      </ows:DCP>
      <ows:Parameter name="resolve">
        <ows:AllowedValues>
          <ows:Value>none</ows:Value>
          <ows:Value>local</ows:Value>
        </ows:AllowedValues>
      </ows:Parameter>
    </ows:Operation>
    <ows:Operation name="GetFeature">
      <ows:DCP>
        <ows:HTTP>
          <ows:Get xlink:href="https://maps.data.gov.scot:443/arcgis/services/NRS/SPD/MapServer/WFSServer?"/>
          <ows:Post xlink:href="https://maps.data.gov.scot:443/arcgis/services/NRS/SPD/MapServer/WFSServer"/>
        </ows:HTTP>
      </ows:DCP>
      <ows:Parameter name="resultType">
        <ows:AllowedValues>
          <ows:Value>results</ows:Value>
          <ows:Value>hits</ows:Value>
        </ows:AllowedValues>
      </ows:Parameter>
      <ows:Parameter name="outputFormat">
        <ows:AllowedValues>
          <ows:Value>GML32</ows:Value>
          <ows:Value>GML32+ZIP</ows:Value>
          <ows:Value>GML32+GZIP</ows:Value>
          <ows:Value>application/gml+xml; version=3.2</ows:Value>
          <ows:Value>GML3</ows:Value>
          <ows:Value>GML3+ZIP</ows:Value>
          <ows:Value>GML3+GZIP</ows:Value>
          <ows:Value>text/xml; subtype=gml/3.1.1</ows:Value>
          <ows:Value>GML2</ows:Value>
          <ows:Value>GML2+ZIP</ows:Value>
          <ows:Value>GML2+GZIP</ows:Value>
          <ows:Value>text/xml; subtype=gml/2.1.2</ows:Value>
          <ows:Value>GEOJSON</ows:Value>
          <ows:Value>GEOJSON+ZIP</ows:Value>
          <ows:Value>GEOJSON+GZIP</ows:Value>
          <ows:Value>ESRIGEOJSON</ows:Value>
          <ows:Value>ESRIGEOJSON+ZIP</ows:Value>
          <ows:Value>ESRIGEOJSON+GZIP</ows:Value>
          <ows:Value>KML</ows:Value>
          <ows:Value>application/vnd.google-earth.kml xml</ows:Value>
          <ows:Value>application/vnd.google-earth.kml+xml</ows:Value>
          <ows:Value>KMZ</ows:Value>
          <ows:Value>application/vnd.google-earth.kmz</ows:Value>
          <ows:Value>SHAPE+ZIP</ows:Value>
          <ows:Value>CSV</ows:Value>
          <ows:Value>CSV+ZIP</ows:Value>
          <ows:Value>CSV+GZIP</ows:Value>
          <ows:Value>Geopackage</ows:Value>
          <ows:Value>Geopackage+ZIP</ows:Value>
        </ows:AllowedValues>
      </ows:Parameter>
      <ows:Parameter name="resolve">
        <ows:AllowedValues>
          <ows:Value>none</ows:Value>
          <ows:Value>local</ows:Value>
        </ows:AllowedValues>
      </ows:Parameter>
    </ows:Operation>
    <ows:Operation name="GetGmlObject">
      <ows:DCP>
        <ows:HTTP>
          <ows:Get xlink:href="https://maps.data.gov.scot:443/arcgis/services/NRS/SPD/MapServer/WFSServer?"/>
          <ows:Post xlink:href="https://maps.data.gov.scot:443/arcgis/services/NRS/SPD/MapServer/WFSServer"/>
        </ows:HTTP>
      </ows:DCP>
    </ows:Operation>
    <ows:Operation name="ListStoredQueries">
      <ows:DCP>
        <ows:HTTP>
          <ows:Get xlink:href="https://maps.data.gov.scot:443/arcgis/services/NRS/SPD/MapServer/WFSServer?"/>
          <ows:Post xlink:href="https://maps.data.gov.scot:443/arcgis/services/NRS/SPD/MapServer/WFSServer"/>
        </ows:HTTP>
      </ows:DCP>
    </ows:Operation>
    <ows:Operation name="DescribeStoredQueries">
      <ows:DCP>
        <ows:HTTP>
          <ows:Get xlink:href="https://maps.data.gov.scot:443/arcgis/services/NRS/SPD/MapServer/WFSServer?"/>
          <ows:Post xlink:href="https://maps.data.gov.scot:443/arcgis/services/NRS/SPD/MapServer/WFSServer"/>
        </ows:HTTP>
      </ows:DCP>
    </ows:Operation>
    <ows:Constraint name="ImplementsBasicWFS"><ows:NoValues/><ows:DefaultValue>TRUE</ows:DefaultValue></ows:Constraint>
    <ows:Constraint name="ImplementsTransactionalWFS"><ows:NoValues/><ows:DefaultValue>FALSE</ows:DefaultValue></ows:Constraint>
    <ows:Constraint name="ImplementsLockingWFS"><ows:NoValues/><ows:DefaultValue>FALSE</ows:DefaultValue></ows:Constraint>
    <ows:Constraint name="KVPEncoding"><ows:NoValues/><ows:DefaultValue>TRUE</ows:DefaultValue></ows:Constraint>
    <ows:Constraint name="XMLEncoding"><ows:NoValues/><ows:DefaultValue>TRUE</ows:DefaultValue></ows:Constraint>
    <ows:Constraint name="SOAPEncoding"><ows:NoValues/><ows:DefaultValue>FALSE</ows:DefaultValue></ows:Constraint>
    <ows:Constraint name="ImplementsInheritance"><ows:NoValues/><ows:DefaultValue>FALSE</ows:DefaultValue></ows:Constraint>
    <ows:Constraint name="ImplementsRemoteResolve"><ows:NoValues/><ows:DefaultValue>FALSE</ows:DefaultValue></ows:Constraint>
    <ows:Constraint name="ImplementsResultPaging"><ows:NoValues/><ows:DefaultValue>TRUE</ows:DefaultValue></ows:Constraint>
    <ows:Constraint name="ImplementsStandardJoins"><ows:NoValues/><ows:DefaultValue>FALSE</ows:DefaultValue></ows:Constraint>
    <ows:Constraint name="ImplementsSpatialJoins"><ows:NoValues/><ows:DefaultValue>FALSE</ows:DefaultValue></ows:Constraint>
    <ows:Constraint name="ImplementsTemporalJoins"><ows:NoValues/><ows:DefaultValue>FALSE</ows:DefaultValue></ows:Constraint>
    <ows:Constraint name="ImplementsFeatureVersioning"><ows:NoValues/><ows:DefaultValue>FALSE</ows:DefaultValue></ows:Constraint>
    <ows:Constraint name="ManageStoredQueries"><ows:NoValues/><ows:DefaultValue>FALSE</ows:DefaultValue></ows:Constraint>
    <ows:Constraint name="CountDefault"><ows:NoValues/><ows:DefaultValue>5000</ows:DefaultValue></ows:Constraint>
  </ows:OperationsMetadata>
  <wfs:FeatureTypeList>
  <wfs:FeatureType>
    <wfs:Name>SPD:PostcodeGridRef</wfs:Name>
    <wfs:Title>PostcodeGridRef</wfs:Title>
    <wfs:DefaultCRS>urn:ogc:def:crs:EPSG::27700</wfs:DefaultCRS>
    <ows:WGS84BoundingBox>
      <ows:LowerCorner>-8.17237446 54.57009438</ows:LowerCorner>
      <ows:UpperCorner>-0.73612827 60.82348022</ows:UpperCorner>
    </ows:WGS84BoundingBox>
  </wfs:FeatureType>
  <wfs:FeatureType>
    <wfs:Name>SPD:PostcodeSectorGridRef</wfs:Name>
    <wfs:Title>PostcodeSectorGridRef</wfs:Title>
    <wfs:DefaultCRS>urn:ogc:def:crs:EPSG::27700</wfs:DefaultCRS>
    <ows:WGS84BoundingBox>
      <ows:LowerCorner>-8.02226647 54.65936614</ows:LowerCorner>
      <ows:UpperCorner>-1.16923432 60.28126668</ows:UpperCorner>
    </ows:WGS84BoundingBox>
  </wfs:FeatureType>
  <wfs:FeatureType>
    <wfs:Name>SPD:PostcodeDistrictGridRef</wfs:Name>
    <wfs:Title>PostcodeDistrictGridRef</wfs:Title>
    <wfs:DefaultCRS>urn:ogc:def:crs:EPSG::27700</wfs:DefaultCRS>
    <ows:WGS84BoundingBox>
      <ows:LowerCorner>-8.02226647 54.74318168</ows:LowerCorner>
      <ows:UpperCorner>-1.16923432 60.28126668</ows:UpperCorner>
    </ows:WGS84BoundingBox>
  </wfs:FeatureType>
  <wfs:FeatureType>
    <wfs:Name>SPD:PostcodeUnit</wfs:Name>
    <wfs:Title>PostcodeUnit</wfs:Title>
    <wfs:DefaultCRS>urn:ogc:def:crs:EPSG::27700</wfs:DefaultCRS>
    <ows:WGS84BoundingBox>
      <ows:LowerCorner>-9.22986760 54.51338109</ows:LowerCorner>
      <ows:UpperCorner>-0.70735614 60.86611141</ows:UpperCorner>
    </ows:WGS84BoundingBox>
  </wfs:FeatureType>
  <wfs:FeatureType>
    <wfs:Name>SPD:PostcodeSector</wfs:Name>
    <wfs:Title>PostcodeSector</wfs:Title>
    <wfs:DefaultCRS>urn:ogc:def:crs:EPSG::27700</wfs:DefaultCRS>
    <ows:WGS84BoundingBox>
      <ows:LowerCorner>-9.22986760 54.51338109</ows:LowerCorner>
      <ows:UpperCorner>-0.70735614 60.86611141</ows:UpperCorner>
    </ows:WGS84BoundingBox>
  </wfs:FeatureType>
  <wfs:FeatureType>
    <wfs:Name>SPD:PostcodeDistrict</wfs:Name>
    <wfs:Title>PostcodeDistrict</wfs:Title>
    <wfs:DefaultCRS>urn:ogc:def:crs:EPSG::27700</wfs:DefaultCRS>
    <ows:WGS84BoundingBox>
      <ows:LowerCorner>-9.22986760 54.51338109</ows:LowerCorner>
      <ows:UpperCorner>-0.70735614 60.86611141</ows:UpperCorner>
    </ows:WGS84BoundingBox>
  </wfs:FeatureType>
  </wfs:FeatureTypeList>
  <fes:Filter_Capabilities>
  <fes:Conformance>
    <fes:Constraint name="ImplementsQuery"><ows:NoValues/><ows:DefaultValue>TRUE</ows:DefaultValue></fes:Constraint>
    <fes:Constraint name="ImplementsAdHocQuery"><ows:NoValues/><ows:DefaultValue>TRUE</ows:DefaultValue></fes:Constraint>
    <fes:Constraint name="ImplementsFunctions"><ows:NoValues/><ows:DefaultValue>TRUE</ows:DefaultValue></fes:Constraint>
    <fes:Constraint name="ImplementsResourceId"><ows:NoValues/><ows:DefaultValue>TRUE</ows:DefaultValue></fes:Constraint>
    <fes:Constraint name="ImplementsMinStandardFilter"><ows:NoValues/><ows:DefaultValue>TRUE</ows:DefaultValue></fes:Constraint>
    <fes:Constraint name="ImplementsStandardFilter"><ows:NoValues/><ows:DefaultValue>TRUE</ows:DefaultValue></fes:Constraint>
    <fes:Constraint name="ImplementsMinSpatialFilter"><ows:NoValues/><ows:DefaultValue>TRUE</ows:DefaultValue></fes:Constraint>
    <fes:Constraint name="ImplementsSpatialFilter"><ows:NoValues/><ows:DefaultValue>TRUE</ows:DefaultValue></fes:Constraint>
    <fes:Constraint name="ImplementsMinTemporalFilter"><ows:NoValues/><ows:DefaultValue>FALSE</ows:DefaultValue></fes:Constraint>
    <fes:Constraint name="ImplementsTemporalFilter"><ows:NoValues/><ows:DefaultValue>FALSE</ows:DefaultValue></fes:Constraint>
    <fes:Constraint name="ImplementsVersionNav"><ows:NoValues/><ows:DefaultValue>FALSE</ows:DefaultValue></fes:Constraint>
    <fes:Constraint name="ImplementsSorting"><ows:NoValues/><ows:DefaultValue>TRUE</ows:DefaultValue></fes:Constraint>
    <fes:Constraint name="ImplementsExtendedOperators"><ows:NoValues/><ows:DefaultValue>FALSE</ows:DefaultValue></fes:Constraint>
    <fes:Constraint name="ImplementsMinimumXPath"><ows:NoValues/><ows:DefaultValue>TRUE</ows:DefaultValue></fes:Constraint>
    <fes:Constraint name="ImplementsSchemaElementFunc"><ows:NoValues/><ows:DefaultValue>FALSE</ows:DefaultValue></fes:Constraint>
  </fes:Conformance>
  <fes:Id_Capabilities>
    <fes:ResourceIdentifier name="fes:ResourceId"/>
  </fes:Id_Capabilities>
  <fes:Scalar_Capabilities>
    <fes:LogicalOperators/>
    <fes:ComparisonOperators>
      <fes:ComparisonOperator name="PropertyIsEqualTo"/>
      <fes:ComparisonOperator name="PropertyIsNotEqualTo"/>
      <fes:ComparisonOperator name="PropertyIsLessThan"/>
      <fes:ComparisonOperator name="PropertyIsGreaterThan"/>
      <fes:ComparisonOperator name="PropertyIsLessThanOrEqualTo"/>
      <fes:ComparisonOperator name="PropertyIsGreaterThanOrEqualTo"/>
      <fes:ComparisonOperator name="PropertyIsLike"/>
      <fes:ComparisonOperator name="PropertyIsNull"/>
      <fes:ComparisonOperator name="PropertyIsNil"/>
      <fes:ComparisonOperator name="PropertyIsBetween"/>
    </fes:ComparisonOperators>
  </fes:Scalar_Capabilities>
  <fes:Spatial_Capabilities>
    <fes:GeometryOperands xmlns:gml="http://www.opengis.net/gml" xmlns:gml32="http://www.opengis.net/gml">
      <fes:GeometryOperand name="gml:Box"/>
      <fes:GeometryOperand name="gml:Envelope"/>
      <fes:GeometryOperand name="gml:Point"/>
      <fes:GeometryOperand name="gml:LineString"/>
      <fes:GeometryOperand name="gml:LinearRing"/>
      <fes:GeometryOperand name="gml:Polygon"/>
      <fes:GeometryOperand name="gml:MultiPoint"/>
      <fes:GeometryOperand name="gml:MultiCurve"/>
      <fes:GeometryOperand name="gml:MultiSurface"/>
    </fes:GeometryOperands>
    <fes:SpatialOperators>
      <fes:SpatialOperator name="BBOX"/>
      <fes:SpatialOperator name="Equals"/>
      <fes:SpatialOperator name="Disjoint"/>
      <fes:SpatialOperator name="Intersects"/>
      <fes:SpatialOperator name="Touches"/>
      <fes:SpatialOperator name="Crosses"/>
      <fes:SpatialOperator name="Within"/>
      <fes:SpatialOperator name="Contains"/>
      <fes:SpatialOperator name="Overlaps"/>
      <fes:SpatialOperator name="DWithin"/>
    </fes:SpatialOperators>
  </fes:Spatial_Capabilities>
  </fes:Filter_Capabilities>
</wfs:WFS_Capabilities>
