MS RFC 105:支持WFS 2.0(服务器端)

日期

2013/11

作者

甚至鲁奥

联系

甚至在Mines的dot rouault巴黎dot org

状态

草稿

版本

MAPServer 7

1。概述

MapServer目前支持OGC WFS 1.0.0和1.1.0协议。最新发布的版本 WFS 2.0 ,希望MapServer实现它。尤其是在欧洲的inspire指令中,该指令要求WFS 2.0作为inspire下载服务的基本协议。

2。变化

WFS 2.0变更汇总

显然,WFS 1.1和WFS 2.0之间没有官方差异,下面是一个总结:

  • GetPropertyValue

  • ListStoredQueries

  • DescribeStoredQueries

  • 带存储查询的GetFeature

  • 本工程未涉及的新作业:

  • CreateStoredQuery

  • DropStoredQuery

getCapabilities更改

getCapabilities请求w.r.t WFS 1.1的响应文档中有一些更改和添加:

  • <ows:operationsMetadata>元素可以具有子元素,这些子元素会通知实现支持规范的哪些一致性类。对于mapserver,我们报告为支持的:implementsbasicwfs、kvpencoding、xmlcencoding、implementsresultpaging。我们还发布了“countdefault”中功能计数的服务器端限制。

  • 过滤器功能尊重 Filter Encoding 2.0 能力。它有一个<fes:conformity>元素,该元素公布了实现支持fe 2.0的哪些部分。在MapServer的情况下,我们报告为支持的:implementsQuery、implementsHocQuery、implementsResourceID、implementsInstandarFilter、implementsStandardFilter、implementsMinPatialFilter、implementsMinmporalFilter和implementsMinumXPath

我们现在还支持getcapabilities的sections参数,该参数允许用户只请求getcapabilities文档的一部分。此参数的值是一个(逗号分隔的)值列表,其中包括:all、serviceIdentification、serviceProvider、operationsMetadata、featureTypeList、filter_capabilities

在cite测试期间发现的,我们现在总是在特性类型的<name>元素中添加名称空间前缀(对于WFS 1.1.0也可以/应该这样做)。如果未指定用户命名空间,则使用默认的“ms:”前缀。

有关获取能力响应的示例,请访问https://github.com/MapServer/msautotest/blob/wfs2/wxs/expected/wfs_200_caps.xml

GML 3.2.1

GML 3.2.1在每个几何元素上定义了一个强制的gml:id属性:点、线串、多边形、多点、多行串、多多边形。ID将生成为“feature_gml_id.serial_number”,其中feature_gml_id是几何体的要素元素上的gml:id,而serial_number是从1开始并从每个子几何体(多点中的点等)递增的数字。

<ms:a_layer gml:id="a_layer.1">
  <gml:boundedBy>
      <gml:Envelope srsName="urn:ogc:def:crs:EPSG::4326">
          <gml:lowerCorner>49.000000 2.000000</gml:lowerCorner>
          <gml:upperCorner>50.000000 3.000000</gml:upperCorner>
      </gml:Envelope>
  </gml:boundedBy>
  <ms:msGeometry>
    <gml:MultiPoint gml:id="a_layer.1.1" srsName="urn:ogc:def:crs:EPSG::4326">
      <gml:pointMembers>
        <gml:Point gml:id="a_layer.1.2">
          <gml:pos>49.000000 2.000000</gml:pos>
        </gml:Point>
        <gml:Point gml:id="a_layer.1.3">
          <gml:pos>50.000000 3.000000</gml:pos>
        </gml:Point>
      </gml:pointMembers>
    </gml:MultiPoint>
  </ms:msGeometry>
</ms:a_layer>

对于SRS,对于WFS 2.0,它总是用“urn:ogc:def:crs:epsg::”语法报告。这可能也适用于WFS 1.1.0。可以将“wfs-return-srs-aun-as-urn”设置为“true”或“false”,以启用或禁用此行为。WFS 2.0默认为“真”,旧版本默认为“假”。

与WFS的早期版本相反,WFS 2.0在其XML模式定义中不导入任何GML模式,因此可以使用其他GML输出格式生成有效的GetFeature响应。特别是,已经为WFS 1.0和1.1处理的GML 2.1.1和GML 3.1.1可用于输出DescribeFeatureType、GetFeature和GetPropertyValue。

滤波器编码2.0

“propertyname”元素替换为“valuereference”元素,具有等效的语义。同样,WFS 1.1<ogc:gmlobjectid gml:id=“XXXX”/>运算符替换为<fes:resourceid rid=“XXXX”/>。

为了进行符合性测试,引入了对propertyIsNull和propertyIsNil运算符的虚拟实现,因为MapServer无法生成可为空或不可为空的字段。

fe 2.0 mintemporalfilter一致性类支持<fes:during>as运算符和<gml:timeperiod>as操作数。

<fes:During>
    <fes:ValueReference>timeProperty</fes:ValueReference>
    <gml:TimePeriod gml:id="TP1">
        <gml:beginPosition>2005-05-17T00:00:00Z</gml:beginPosition>
        <gml:endPosition>2005-05-23T00:00:00Z</gml:endPosition>
    </gml:TimePeriod>
</fes:During>

与时间滤波器相关,在GML 3.2.1输出中,日期类型字段将在GML中输出如下:

<ms:aFieldName gml:id="layerName.fid.aFieldName">
    <gml:timePosition>2004-01-01</gml:timePosition>
</ms:aFieldName>

在.xsd中:

<element name="aFieldName" minOccurs="0" type="gml:TimeInstantType"/>

如果需要,规范中并不清楚,但它似乎与<fes:during>的操作数一致(时间段必须与TimeInstant匹配)。

响应分页支持

MapServer中已支持将WFS 1.1.0作为扩展名的响应分页。这现在是WFS 2.0的标准(可选)功能。分页是通过使用startindex(对于第一个索引,从0开始)和count(count相当于wfs 1.1 maxfeatures)参数触发的。

GetFeature操作

类型名被类型名替换。FeatureID替换为ResourceID。

<gml:featuremember>元素替换为<wfs:member>

<wfs:FeatureCollection numberReturned="X" numberMatched="Y" timeStamp="Z">
    <wfs:member>
        <ms:myElement gml_id="myElement.1">
            <ms:firstProperty>foo</ms:firstProperty>
            ...
        </ms:myElement>
    </wfs:member>
</wfs:FeatureCollection>

featureCollection元素具有“numberReturned”和“numberMatched”强制属性。

  • Number Returned包含文档中返回的要素数(当指定RESULTTYPE=HITS时,始终返回0)。

  • NumberMatched包含符合请求条件的功能数。如果在映射文件中定义了“wfs_MaxFeatures”元数据项(或在请求中指定了计数),则如果匹配的功能数量至少达到服务器端或客户端限制,则返回“unknown”。这是为了避免服务器上的性能问题。通过定义“wfs_compute_number_matched”“true”,将始终计算匹配功能的确切数量,但这可能会导致性能问题。

如果相关,MapServer将填充“下一个”和“上一个”可选属性,这些属性包含在响应页面之间导航的URL。

请求服务=WFS&version=2.0.0&request=GetFeature&typeNames=Province&Count=1&startIndex=2将生成以下响应:

<wfs:FeatureCollection
[...] numberMatched="unknown" numberReturned="1"
previous="http://localhost:8080/mapserv.cgi?SERVICE=WFS&amp;VERSION=2.0.0&amp;REQUEST=GetFeature&amp;TYPENAMES=province&amp;COUNT=1&amp;STARTINDEX=1"
next="http://localhost:8080/mapserv.cgi?SERVICE=WFS&amp;VERSION=2.0.0&amp;REQUEST=GetFeature&amp;TYPENAMES=province&amp;COUNT=1&amp;STARTINDEX=3">
[...]
</wfs:FeatureCollection>

如果GetFeature请求在多个类型名上操作,则每个查询的结果必须在其自己的FeatureCollection中(§11.3.3.5)。

<wfs:FeatureCollection numberReturned="X" numberMatched="Y" timeStamp="Z">
<wfs:member>
    <wfs:FeatureCollection numberReturned="X1" numberMatched="Y1" timeStamp="Z">
    <wfs:member>
        <ms:layer1 gml_id="layer1.1">
            ...
        </ms:myElement>
        ...
    <wfs:member>
    </wfs:FeatureCollection>
</wfs:member>
<wfs:member>
    <wfs:FeatureCollection numberReturned="X2" numberMatched="Y2" timeStamp="Z">
    <wfs:member>
        <ms:layer2 gml_id="layer2.1">
            ...
        </ms:myElement>
        ...
    <wfs:member>
    </wfs:FeatureCollection>
</wfs:member>
</wfs:FeatureCollection>

存储查询

存储的查询是存储在服务器上的查询(<wfs:query>),可能带有参数,这些参数的值可以在GetFeature请求期间由客户端分配。

在web.metadata级别,可以使用以逗号分隔的存储查询ID列表指定“wfs-storedquerys”元数据项。

然后,对于每个存储的查询ID,“wfs_stored query id_u inlinedef”必须使用有效的<storedquerydescription>指定为值。由于指定内联XML内容并不总是方便的,因此也可以指定“wfs storedqueryid u filedef”,其值是包含<storedquerydescription>xml内容的文件名。

"wfs_storedqueries"           "bboxstoredquery"
"wfs_bboxstoredquery_filedef" "/data/bboxstoredquery.xml"

使用/data/bboxstoredquery.xml,例如包含:

<StoredQueryDescription xmlns:xs="http://www.w3.org/2001/XMLSchema"
                        xmlns:gml="http://www.opengis.net/gml/3.2"
                        id="bboxstoredquery">
    <Title>query title</Title>
    <Abstract>query abstract</Abstract>
    <Parameter name="longmin" type="xs:double"/>
    <Parameter name="latmin" type="xs:double"/>
    <Parameter name="longmax" type="xs:double"/>
    <Parameter name="latmax" type="xs:double"/>
    <QueryExpressionText isPrivate="false"
                        language="urn:ogc:def:queryLanguage:OGC-WFS::WFS_QueryExpression"
                        xmlns:ms="http://mapserver.gis.umn.edu/mapserver"
                        returnFeatureTypes="ms:firstLayer ms:secondLayer">
        <Query xmlns:fes="http://www.opengis.net/fes/2.0" typeNames="ms:firstLayer">
            <fes:Filter>
                <fes:BBOX>
                    <gml:Envelope srsName="urn:ogc:def:crs:EPSG::4326">
                        <gml:lowerCorner>${latmin} ${longmin}</gml:lowerCorner>
                        <gml:upperCorner>${latmax} ${longmax}</gml:upperCorner>
                    </gml:Envelope>
                </fes:BBOX>
            </fes:Filter>
        </Query>
        <Query xmlns:fes="http://www.opengis.net/fes/2.0" typeNames="ms:secondLayer">
            <fes:Filter>
                <fes:BBOX>
                    <gml:Envelope srsName="urn:ogc:def:crs:EPSG::4326">
                        <gml:lowerCorner>${latmin} ${longmin}</gml:lowerCorner>
                        <gml:upperCorner>${latmax} ${longmax}</gml:upperCorner>
                    </gml:Envelope>
                </fes:BBOX>
            </fes:Filter>
        </Query>
    </QueryExpressionText>
</StoredQueryDescription>

相应的有效GetFeature请求可以是:

REQUEST=GetFeature&STOREDQUERY_ID=bboxstoredquery&LONGMIN=2&LATMIN=49&LONGMAX=3&LATMAX=50

预定义的urn:ogc:def:query:ogc-wfs::getFeatureByID存储查询

WFS 2.0定义了一个强制的“urn:ogc:def:query:ogc-wfs::getFeatureByID”存储查询。此查询接受一个ID参数,该参数的值必须是功能ID。

有效的请求是:request=getfeature&storedquery_id=urn:ogc:def:query:ogc-wfs::getfeaturebyid&id=mylayer.3

MapServer中硬编码的定义是:

<StoredQueryDescription id="urn:ogc:def:query:OGC-WFS::GetFeatureById">
    <Title>Get feature by identifier</Title>
    <Abstract>Returns the single feature whose value is equal to the specified value of the ID argument</Abstract>
    <Parameter name="ID" xmlns:xs="http://www.w3.org/2001/XMLSchema" type="xs:string"/>
    <QueryExpressionText isPrivate="true"
                        language="urn:ogc:def:queryLanguage:OGC-WFS::WFS_QueryExpression"
                        returnFeatureTypes="">
        <Query xmlns:fes="http://www.opengis.net/fes/2.0" typeNames="?">
            <fes:Filter>
                <fes:ResourceId rid="${ID}"/>
            </fes:Filter>
        </Query>
    </QueryExpressionText>
</StoredQueryDescription>

与更标准的存储查询描述相比,有两个奇怪之处:运行时将“returnFeatureTypes”属性的值替换为mapfile的有效WFS层的名称(在发出响应文档以描述storedqueries请求时)。而typenames属性的值是在运行时根据传递的id参数的值推导出来的。

可以通过定义“wfs-urn:ogc:def:query:ogc-wfs::getFeatureByID_inlinedef”或“wfs-urn:ogc:def:query:ogc-wfs::getFeatureByID_inlinedef”通过自定义定义来覆盖此硬编码定义(例如为其他语言提供替代值)。但是,<queryExpressionText>属性和子元素的值必须与硬编码定义完全相同,才能正确执行。

使用urn:ogc:def:query:ogc-wfs::getFeatureByID的getFeature似乎与带有resourceID参数的getFeature相同,但两者之间存在差异。GetFeatureByID直接返回功能作为响应:

<?xml version='1.0' encoding="UTF-8" ?>
<ms:province gml:id="province.977" xmlns:ms="http://mapserver.gis.umn.edu/mapserver"
            xmlns:gml="http://www.opengis.net/gml/3.2"
            xmlns:wfs="http://www.opengis.net/wfs/2.0"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:schemaLocation="http://mapserver.gis.umn.edu/mapserver http://localhost/path/to/wfs_simple?myparam=something&amp;SERVICE=WFS&amp;VERSION=2.0.0&amp;REQUEST=DescribeFeatureType&amp;TYPENAME=province&amp;OUTPUTFORMAT=application%2Fgml%2Bxml%3B%20version%3D3.2 http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0/wfs.xsd http://www.opengis.net/gml/3.2 http://schemas.opengis.net/gml/3.2.1/gml.xsd">
<gml:boundedBy>
    <gml:Envelope srsName="urn:ogc:def:crs:EPSG::4326">
    <gml:lowerCorner>47.76789 -61.51051</gml:lowerCorner>
    <gml:upperCorner>47.79644 -61.45764</gml:upperCorner>
    </gml:Envelope>
</gml:boundedBy>
<ms:msGeometry>
    <gml:Polygon gml:id="province.977.1" srsName="urn:ogc:def:crs:EPSG::4326">
    <gml:exterior>
        <gml:LinearRing>
        <gml:posList srsDimension="2">47.77424 -61.51051 47.78860 -61.50894 47.79644 -61.49272 47.78743 -61.45764 47.76789 -61.45998 47.76961 -61.48350 47.77424 -61.51051 </gml:posList>
        </gml:LinearRing>
    </gml:exterior>
    </gml:Polygon>
</ms:msGeometry>
</ms:province>

ListStoredQueries

liststoredqueries操作没有参数,并返回所有存储查询(标题和返回功能类型)的简化描述。

<?xml version="1.0" encoding="UTF-8"?>
<wfs:ListStoredQueriesResponse xmlns:wfs="http://www.opengis.net/wfs/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.opengis.net/wfs/2.0" xsi:schemaLocation="http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0/wfs.xsd">
<StoredQuery id="urn:ogc:def:query:OGC-WFS::GetFeatureById">
    <Title>Get feature by identifier</Title>
    <ReturnFeatureType xmlns:ms="http://mapserver.gis.umn.edu/mapserver">ms:province</ReturnFeatureType>
    <ReturnFeatureType xmlns:ms="http://mapserver.gis.umn.edu/mapserver">ms:point</ReturnFeatureType>
    <ReturnFeatureType xmlns:ms="http://mapserver.gis.umn.edu/mapserver">ms:multipoint</ReturnFeatureType>
</StoredQuery>
<StoredQuery id="myquery">
    <Title>query title</Title>
    <ReturnFeatureType xmlns:ms="http://mapserver.gis.umn.edu/mapserver">ms:point</ReturnFeatureType>
</StoredQuery>
</wfs:ListStoredQueriesResponse>

DescribeStoredQueries

DescribeStoredQueries操作接受一个可选的storedQuery_id参数,该参数列出了存储查询的ID。如果未指定,则将返回所有存储的查询及其完整描述。

mapserver将尊重<queryexpressiontext>的isprivate属性的值。如果定义为“true”,则在对DescribeStoredQueries请求的响应中不会返回<query>节点。

<wfs:DescribeStoredQueriesResponse xmlns:wfs="http://www.opengis.net/wfs/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.opengis.net/wfs/2.0" xsi:schemaLocation="http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0/wfs.xsd">
<StoredQueryDescription id="urn:ogc:def:query:OGC-WFS::GetFeatureById">
    <Title>Get feature by identifier</Title>
    <Abstract>Returns the single feature whose value is equal to the specified value of the ID argument</Abstract>
    <Parameter xmlns:xs="http://www.w3.org/2001/XMLSchema" name="ID" type="xs:string"/>
    <QueryExpressionText xmlns:ms="http://mapserver.gis.umn.edu/mapserver" isPrivate="true" language="urn:ogc:def:queryLanguage:OGC-WFS::WFS_QueryExpression" returnFeatureTypes="ms:province ms:point"/>
</StoredQueryDescription>
<StoredQueryDescription xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:fes="http://www.opengis.net/fes/2.0" id="myquery">
    <Title>query title</Title>
    <Abstract>query abstract</Abstract>
    <Parameter name="longmin" type="xs:double"/>
    <Parameter name="latmin" type="xs:double"/>
    <Parameter name="longmax" type="xs:double"/>
    <Parameter name="latmax" type="xs:double"/>
    <QueryExpressionText xmlns:ms="http://mapserver.gis.umn.edu/mapserver" isPrivate="false" language="urn:ogc:def:queryLanguage:OGC-WFS::WFS_QueryExpression" returnFeatureTypes="ms:point">
        <Query xmlns:fes="http://www.opengis.net/fes/2.0" typeNames="ms:point">
            <fes:Filter>
                <fes:BBOX>
                    <fes:ValueReference>msGeometry</fes:ValueReference>
                    <gml:Envelope srsName="urn:ogc:def:crs:EPSG::4326">
                    <gml:lowerCorner>${latmin} ${longmin}</gml:lowerCorner>
                    <gml:upperCorner>${latmax} ${longmax}</gml:upperCorner>
                    </gml:Envelope>
                </fes:BBOX>
            </fes:Filter>
        </Query>
    </QueryExpressionText>
</StoredQueryDescription>
</wfs:DescribeStoredQueriesResponse>

GetPropertyValue操作

request=getPropertyValue&typenames=layerName&valueReference=propertyName。

响应文档具有<valuecollection>top元素,并且仅包含作为<wfs:member>

<wfs:ValueCollection>
    <wfs:member>
        <ms:aProperty>foo</ms:aProperty>
    </wfs:member>
</wfs:ValueCollection>

getFeature操作的大多数参数(如filter、resourceID、bbox、storedquery_id或paging)也可以用于getPropertyValue操作,因此,MSWFSGetFeature()的大部分逻辑都已重构,以便MSWFSGetPropertyValue()也可以重用它。

分选

排序已经是WFS 1.1中应该提供的功能,但还不受支持。我们现在支持使用ogr和postgis连接进行排序。

其他依赖于RDBMS(Oracle,MSSpatial,…)支持“ORDER BY”SQL子句的提供程序可以升级为支持排序,但此RFC不包括这一点。

MapServer shapefile提供程序不支持排序。如果需要,必须使用ogr shapefile提供程序。

对排序的支持依赖于在mapserver.h和mapfile.c中添加的以下内容

typedef enum {
    SORT_ASC,
    SORT_DESC
} sortOrderEnum;

typedef struct {
    char* item;
    sortOrderEnum sortOrder;
} sortByProperties;

typedef struct {
    int nProperties;
    sortByProperties* properties;
} sortByClause;

struct layerObj {
  [...]
  sortByClause sortBy;
};

int msLayerSupportsSorting(layerObj *layer);
void msLayerSetSort(layerObj *layer, const sortByClause* sortBy);
char* msLayerBuildSQLOrderBy(layerObj *layer);

如果新的提供程序支持排序,则必须更新mslayersupportsorting()。wfs代码调用mslayersetsort()。而mslayerBuildSQLOrderBy()可以由提供程序调用,这些提供程序将排序作为“order by”SQL子句实现,PostGIS和OGR就是这样。

kvp和xml语法

对于所有支持的操作,都会处理键值对(如get或post)和XML语法(如post)。

可选/强制性GML项目

票证https://github.com/MapServer/MapServer/issues/3563和https://github.com/MapServer/MapServer/issues/3319提出了一个关于如何处理强制/可选gml项目的问题。到目前为止,DescribeFeatureType响应文档中的所有广告属性都是必需的(因为没有指定minOccurs)。但是,当使用PROPERTYNAME发布GetFeature时,在GetFeature响应文档中只返回指定的属性,这导致文档不符合GML应用程序架构。

解决方法是在层元数据中引入“gml_optional_items”元素。默认情况下,现在所有项目都将被视为可选(gml应用程序模式中的minoccurs=“0”)。如果指定了“gml_optional_items”,则只有列出的元素是可选的,其他包含的项目是必需的。对于当前行为,此更改是最向后兼容的解决方案:将只更改DescribeFeatureType的输出(minOccurs=“0”),但具有propertyName的getFeature仍将只返回上述属性。如果有更多的强制性项目,那么指定“gml_强制性项目”可能更方便。

此实现的默认行为:

"gml_optional_items" "all"

除上述项目外,所有项目均可选:

"gml_mandatory_items" "a_required_item,another_one"

所有项目必须:

"gml_mandatory_items" "all"

除上述项目外的所有强制性项目:

"gml_optional_items"  "an_optional_item,another_one"

除此之外,为了向后兼容,当处理不带显式属性名的GetFeature请求时,我们将返回所有项目,可选或强制。现在可以通过指定“gml_default_items”来修改此行为,以指定必须返回哪些项(可选项中)。

合并所有相关元数据项的示例:

"gml_include_items"   "all"
"gml_exclude_items"   "REG_CODE"
"gml_optional_items"  "all"
"gml_mandatory_items" "NAME"
"gml_default_items"   "NAME_E,NAME_F"

激发下载服务

INSPIRE Technical Guidance Download Services v3.1 可以使用Atom提要(此RFC不支持)和/或WFS 2.0实现。因此,我们将实现Inspire D.S.一致性类2(预定义WFS)和3(直接WFS)。必须通过除WFS 2.0实现本身以外的其他方式解决强制性合规性类别“4:服务质量”。

关于mapfile配置,与“提供inspire-specific-metadata”中的元数据项相同。 Inspire View服务 必须提供(在WFS或OWS命名空间中)。除此之外,对于下载服务,必须使用空间数据集标识符(或用逗号分隔的标识符列表)设置强制的“WFS_inspire_dsid_code”元数据项。技术指南第4.1.3段描述了附加到此参数的语义。如果需要,可以使用“wfs-inspire-dsid-ns”指定链接到数据集标识符的命名空间。

这些元数据项用于在getCapabilities响应文档的<ows:extendedCapabilities>元素中生成<inspire_dls:extendedCapabilities>元素。

Inspire下载服务还包括对多种语言的支持。支持哪些语言的定义是通过类似于View Services的“wfs ou languages”元数据关键字完成的。wfs kvp请求中的“language=xxx”额外参数将对getCapabilities响应文档产生影响,其中<wws:serviceProvider>元素以及<featureTypeList>部分中的<title>、<abstract>和<wws:keywords>下的信息将被转换为请求语言,前提是转换后的版本为在映射文件中提供。作为技术指南建议的扩展,数据和连接关键字的值可以包含一个将被请求的语言替换的“%language%”字符串。

Mapfile 冲击

有效的WFS 1.1配置可以在不修改WFS 2.0的情况下使用。

Inspire下载服务支持需要指定上面段落中指定的元数据项。

三。实施细节

3.1受影响的文件

CMakeLists.txt : add mapwfs20.c, fix a few dependency issues
mapfile.c : refactoring of msLoadProjectionString(), initialization/free of
            layer->sortBy
mapgml.c : GML 3.2.1 and WFS 2.0 GetFeature output specificities. Part of handling
           of "gml_optional_items", "gml_mandatory_items" and "gml_default_items"
mapgml.h : move some #define into another include files
mapio.h/.c : add msIO_pushStdoutToBufferAndGetOldContext() and
             msIO_restoreOldStdoutContext(), so that we can reuse without any change
             the generation of Inspire View Services extended metadata in a libxml2 DOM document
maplayer.c : new sorting functions
mapogcfilter.h/.c : Filter Encoding 2.0 support, temporal filtering, simplification
                 of existing code
mapogcfiltercommon.c : temporal filtering
mapogcsld.c: adaptation for a renaming of a function called
mapogcsos.c: adaptations for a renaming of a function called and change of prototypes
mapogr.cpp: support for a filter string that combine both a SQL where clause that
            can be passed to OGR, and a time filtering part that is processed on
            MapServer side; support for sorting
mapows.c : fixes for a few memory leaks; wfs_cite_wfs2 hack; other misc minor changes;
           add msOWSGetInspireSchemasLocation()
mapows.h : extend wfsParamsObj and gmlItemObj structures; other misc changes
mapowscommon.c : support for translation of ServiceIdentification and
                 ServiceProvider sections; support for validation of WFS 2.0
                 XML post requests
mapowscommon.h : #define for namespaces, URIs
mappostgis.c : support for sorting
mapproject.h/.c : hack for reprojection worldwide long/lat BBOX to projected SRS;
               add msIsAxisInvertedProj() and msAxisSwapShape()
mapquery.c : use only_cache_result_count flag if "wfs_compute_number_matched" "true"
             is specified; fix a bug in msQueryByRect when reprojection is involved;
mapserver.h : prototype and structure changes for sorting support; other misc changes
maptime.h/.c : const sanitization
maputil.c : add msMapSetLanguageSpecificConnection()
mapwcs11.c : adaptations for change of prototypes
mapwcs20.c : adaptations for change of prototypes
mapwfs.c : lots of changes !
mapwfs11.c : a few changes to make msWFSDumpLayer11() usable by WFS 2.0 too
mapwfs20.c : new file with the code that only applies to WFS 2.0 : GetCapabilities,
             stored queries management.
mapwms.c : adaptations for change of prototypes

3.2向后兼容性问题

wfs_getcapabilities_version

3.3MapScript更改

没有

3.4性能影响

默认配置应具有与WFS 1.1.0相同的性能。

对于不是RDBMS驱动程序的大型OGR数据源(如shapefile),排序可能比较慢,因为已经完成了对层功能的完整扫描。

3.6限制

此RFC不包括以下功能:

  • GetFeature操作中的标准、空间或时间联接。它们都是'filter encoding 2.0'的可选一致性类。`

  • 支持xpath 2.0的一个非常小的子集(即使我们无耻地宣传实现minumxpath以使cite测试满意)。这仅限于使用gml_group时的属性名、“groupname/propertyname”语法,以及getpropertyvalue的valuereference参数的@gml:id。

  • 锁定WFS

  • 事务性工作流

  • 功能版本

  • 继承/schema-element()xpath函数

  • SOAP

  • 命名空间:忽略命名空间kvp参数。层和属性名中的名称空间前缀刚刚被删除。

  • GetFeature请求中的别名参数

  • 各种resolvexxxx参数

  • 为WFS 2.0协议升级MapServer WFS客户端

3.7文件

这个 WFS服务器 文档页面将更新。

将为Inspire下载服务创建一个新页面,其中引用了 Inspire View服务 .

3.8试验

已经添加了15个新的映射文件,其中有200多个测试请求,以测试实现的各个方面。

在现有的WFS 1.0或1.1测试中未观察到回归。

预期文档的XML输出已经根据WFS或生成的GML应用程序模式进行了验证,新的msautotest/pymod/xmlvalidate.py脚本如http://lists.osgeo.org/pipermail/mapserver-dev/2013-10月/013708.html所述。

4。臭虫识别码

5。OCG符合性测试

OGC遵从性和互操作性测试计划(CITE)提供自动测试来验证实现。到今天为止,WFS2.0的测试还在测试阶段:https://cite.opengeospatial.org/teamengine/

实现通过了以下一致性级别的所有测试(引用WFS 2.0 R12测试版):-所有GML应用程序架构(7/7)-定义功能和功能集合的GML应用程序架构(2/2)-简单WFS(22/22)-基本WFS(44/44)

cite引擎上使用的映射文件是 wfs_200_cite.map (带OGR连接的shapefile,要求gdal大于等于1.10)和 wfs_200_cite_postgis.map .

注意:cite测试之一包括发送一个请求=getCapabilities get request而不使用任何服务。由于MapServer在不同的版本中实现不同的OGC服务,因此不可能提供一个能让所有规范都满意的响应。默认情况下,MapServer发送一个不符合WFS 2.0的HTML错误。因此,为了获得cite遵从性,需要定义一个“wfs-cite-wfs2”Web元数据,该元数据将返回正确的异常。

6。实施资源

这项计划的实施将由鲁奥公司完成,资金来自 BRGM (G_ologiques和mini_res研究局)。

7。参考文件

以下文件适用于本开发:

8。投票历史

TBD