openapi: 3.1.0
info:
  title: Planning Department — Digital Planning Data of Regulated Areas
  version: csdi-native-readonly-v1
  description: Deterministic derivative of retained native CSDI metadata. Read-only GET operations are selected only where native capabilities and protocol documentation support them. Publisher originals remain separate. Successful metadata retrieval does not prove current data-query success, complete response fields or all layer combinations.
paths:
  /arcgis2/services/DATA/RA_PLAN_CSDI/MapServer/WFSServer:
    get:
      operationId: WfsMapServerGetFeature
      tags:
        - WFS
      summary: Retrieve published features
      description: One read-only GET operation selects published feature types by name. Attribute types derive from retained DescribeFeatureType XSD when available; missing XSD, geometry, unread response data and unknown fields remain explicit limitations.
      parameters:
        - name: service
          in: query
          required: true
          description: OGC service identifier.
          schema:
            type: string
            enum:
              - WFS
          example: WFS
        - name: version
          in: query
          required: true
          description: Exact capabilities version.
          schema:
            type: string
            enum:
              - 2.0.0
          example: 2.0.0
        - name: request
          in: query
          required: true
          description: Read-only operation advertised by GetCapabilities.
          schema:
            type: string
            enum:
              - GetFeature
          example: GetFeature
        - name: typeNames
          in: query
          required: true
          description: Published feature type names; multiple selections follow the advertised protocol syntax. Values are publisher identifiers; examples are choices, not a closed enumeration. The full ID/title directory is in x-csdi-layer-choices.
          schema:
            type: string
          examples:
            choice1:
              summary: TPIS_ADM.OD_RA_PLAN_CSDI
              value: RA_PLAN_CSDI:TPIS_ADM.OD_RA_PLAN_CSDI
          x-choice-count: 1
        - name: outputFormat
          in: query
          required: false
          description: Advertised native representation; JSON, GML, CSV and images are kept distinct.
          schema:
            type: string
            enum:
              - GML32
              - GML32+ZIP
              - GML32+GZIP
              - application/gml+xml; version=3.2
              - GML3
              - GML3+ZIP
              - GML3+GZIP
              - text/xml; subtype=gml/3.1.1
              - GML2
              - GML2+ZIP
              - GML2+GZIP
              - text/xml; subtype=gml/2.1.2
              - GEOJSON
              - GEOJSON+ZIP
              - GEOJSON+GZIP
              - ESRIGEOJSON
              - ESRIGEOJSON+ZIP
              - ESRIGEOJSON+GZIP
              - KML
              - application/vnd.google-earth.kml xml
              - application/vnd.google-earth.kml+xml
              - KMZ
              - application/vnd.google-earth.kmz
              - SHAPE+ZIP
              - CSV
              - CSV+ZIP
              - CSV+GZIP
              - Geopackage
              - Geopackage+ZIP
          example: GEOJSON
        - name: count
          in: query
          required: false
          description: OGC bounded feature limit; example requests one feature without claiming a server-wide bound.
          schema:
            type: integer
          example: 1
        - name: srsName
          in: query
          required: false
          description: Output CRS choices advertised by at least one feature type; support may vary by selected type.
          schema:
            type: string
          example: urn:ogc:def:crs:EPSG::2326
      responses:
        "200":
          description: Native publisher response; protocol or business errors may also be returned. Metadata connection and actual data-query success are separate.
          content:
            application/gml+xml:
              schema:
                type: string
            text/xml:
              schema:
                type: string
            application/json:
              schema:
                $ref: "#/components/schemas/WfsMapServerWfsFeatureCollection"
            application/geo+json:
              schema:
                $ref: "#/components/schemas/WfsMapServerWfsFeatureCollection"
            application/vnd.google-earth.kml+xml:
              schema:
                type: string
            "*/*":
              schema:
                description: Native Geopackage+ZIP output; wire media type/fields are not constrained.
            text/csv:
              schema:
                type: string
                description: Native CSV; row/column wire conformance is not inferred from JSON schemas.
      externalDocs:
        url: https://docs.ogc.org/is/09-025r2/09-025r2.html
      x-advertised-crss:
        - urn:ogc:def:crs:EPSG::2326
      servers:
        - url: https://www.ozp.tpb.gov.hk:443
      x-native-source-evidence:
        - url: https://www.ozp.tpb.gov.hk/arcgis/services/DATA/RA_PLAN_CSDI/MapServer/WFSServer?service=WFS&request=GetCapabilities
          sha256: 0419f7612afc6c73ba5d32d44913da4d115dbe8fb88c1eacea8a180b5599ebb7
          httpStatus: 200
          contentType: text/xml; charset=UTF-8
          role: wfs-capabilities
          parseStatus: pass
          kind: wfs-capabilities
        - url: https://www.ozp.tpb.gov.hk:443/arcgis2/services/DATA/RA_PLAN_CSDI/MapServer/WFSServer?service=WFS&version=2.0.0&request=DescribeFeatureType&typeNames=RA_PLAN_CSDI%3ATPIS_ADM.OD_RA_PLAN_CSDI
          sha256: 2adcd86090b9022856df385c811d0dd6fc55b0e361984183cd4b2267200ebe03
          httpStatus: 200
          contentType: text/xml; charset=UTF-8
          role: wfs-feature-type
          parseStatus: pass
          kind: wfs-feature-type
components:
  schemas:
    WfsMapServerWfsTPISADMODRAPLANCSDIAttributes:
      type: object
      properties:
        OBJECTID:
          description: Native XSD type xsd:int. Requiredness is not projected from XML occurrence into all JSON queries.
          type: integer
        RA_PLAN_NO:
          description: Native XSD type . Requiredness is not projected from XML occurrence into all JSON queries.
          type:
            - string
            - "null"
          maxLength: 20
        RA_ENG:
          description: Native XSD type . Requiredness is not projected from XML occurrence into all JSON queries.
          type:
            - string
            - "null"
          maxLength: 200
        RA_CHT:
          description: Native XSD type . Requiredness is not projected from XML occurrence into all JSON queries.
          type:
            - string
            - "null"
          maxLength: 200
        RA_CHS:
          description: Native XSD type . Requiredness is not projected from XML occurrence into all JSON queries.
          type:
            - string
            - "null"
          maxLength: 200
        GAZ_DATE:
          description: Native XSD type xsd:dateTime. Requiredness is not projected from XML occurrence into all JSON queries.
          type:
            - string
            - "null"
        OZP_SCHM:
          description: Native XSD type . Requiredness is not projected from XML occurrence into all JSON queries.
          type:
            - string
            - "null"
          maxLength: 10
        SECT_NO:
          description: Native XSD type . Requiredness is not projected from XML occurrence into all JSON queries.
          type:
            - string
            - "null"
          maxLength: 20
        SUB_AREA:
          description: Native XSD type . Requiredness is not projected from XML occurrence into all JSON queries.
          type:
            - string
            - "null"
          maxLength: 80
        PLAN_SCALE:
          description: Native XSD type xsd:int. Requiredness is not projected from XML occurrence into all JSON queries.
          type:
            - integer
            - "null"
        GEOJSON_LINK:
          description: Native XSD type . Requiredness is not projected from XML occurrence into all JSON queries.
          type:
            - string
            - "null"
          maxLength: 4000
        GML_LINK:
          description: Native XSD type . Requiredness is not projected from XML occurrence into all JSON queries.
          type:
            - string
            - "null"
          maxLength: 4000
        SHP_LINK:
          description: Native XSD type . Requiredness is not projected from XML occurrence into all JSON queries.
          type:
            - string
            - "null"
          maxLength: 4000
        SHAPE:
          description: Native geometry property gml:MultiSurfacePropertyType; JSON geometry is not inferred from its XML type.
        SHAPE.STArea__:
          description: Native XSD type xsd:double. Requiredness is not projected from XML occurrence into all JSON queries.
          type:
            - number
            - "null"
        SHAPE.STLength__:
          description: Native XSD type xsd:double. Requiredness is not projected from XML occurrence into all JSON queries.
          type:
            - number
            - "null"
      additionalProperties: true
    WfsMapServerWfsFeatureCollection:
      type: object
      properties:
        type:
          type: string
        features:
          type: array
          items:
            type: object
            properties:
              type:
                type: string
              properties:
                $ref: "#/components/schemas/WfsMapServerWfsTPISADMODRAPLANCSDIAttributes"
              geometry:
                description: Geometry representation is not constrained by the retained attribute metadata.
            additionalProperties: true
      additionalProperties: true
externalDocs:
  url: https://portal.csdi.gov.hk/csdi-webpage/doc/GeoSpatialServices
x-csdi-layer-choices:
  - id: RA_PLAN_CSDI:TPIS_ADM.OD_RA_PLAN_CSDI
    title: TPIS_ADM.OD_RA_PLAN_CSDI
    protocol: wfs
x-csdi-source-evidence:
  - url: https://portal.csdi.gov.hk/geoportal/csw?service=CSW&version=2.0.2&request=GetRecordById&elementSetName=full&id=c17a8a39-4fed-5e02-8528-998b84011228
    sha256: 56b9472f17426b5db52d21c4cd8c28d1bf3ccf2d0e574f5deb15250720c9ceac
    httpStatus: 200
    contentType: application/xml;charset=UTF-8
    role: csw-record
    parseStatus: pass
    kind: csw-record
  - url: https://www.ozp.tpb.gov.hk/arcgis/services/DATA/RA_PLAN_CSDI/MapServer/WFSServer?service=WFS&request=GetCapabilities
    sha256: 0419f7612afc6c73ba5d32d44913da4d115dbe8fb88c1eacea8a180b5599ebb7
    httpStatus: 200
    contentType: text/xml; charset=UTF-8
    role: wfs-capabilities
    parseStatus: pass
    kind: wfs-capabilities
  - url: https://www.ozp.tpb.gov.hk:443/arcgis2/services/DATA/RA_PLAN_CSDI/MapServer/WFSServer?service=WFS&version=2.0.0&request=DescribeFeatureType&typeNames=RA_PLAN_CSDI%3ATPIS_ADM.OD_RA_PLAN_CSDI
    sha256: 2adcd86090b9022856df385c811d0dd6fc55b0e361984183cd4b2267200ebe03
    httpStatus: 200
    contentType: text/xml; charset=UTF-8
    role: wfs-feature-type
    parseStatus: pass
    kind: wfs-feature-type
x-csdi-source-scope:
  partialProtocols: []
  nativeMetadataStatus:
    status: http_200_retained
    http200Sources: 3
  fullSourceCompleteness: not_established
  actualDataQueriesByConversion: 0
