1

使用するようなフィルターを使用して Geoserver から GML レイヤーを要求するソリューションはありますかbbox:

http://localhost:8080/geoserver/tiger/ows?service=WFS&version=1.0.0&
request=GetFeature&typeName=tiger:poi&maxFeatures=50&
bbox=-74.0104611,40.70758763,-74.00153046439813,40.719885123828675

bbox結果は、ユーザーが入力したパラメーターに基づいて、バウンディング ボックス (緯度/経度) を具体的にフィルタリングします。

結果:

<wfs:FeatureCollection xsi:schemaLocation="http://www.census.gov http://127.0.0.1:8080/geoserver/tiger/wfs?service=WFS&version=1.0.0&request=DescribeFeatureType&typeName=tiger%3Apoi http://www.opengis.net/wfs http://127.0.0.1:8080/geoserver/schemas/wfs/1.0.0/WFS-basic.xsd">
    <gml:boundedBy>
        <gml:null>unknown</gml:null>
    </gml:boundedBy>
    <gml:featureMember>
        <tiger:poi fid="poi.4">
            <tiger:the_geom>
                <gml:Point srsName="http://www.opengis.net/gml/srs/epsg.xml#4326"><gml:coordinates decimal="." cs="," ts=" ">-74.00857344,40.71194565</gml:coordinates></gml:Point>
            </tiger:the_geom>
            <tiger:NAME>lox</tiger:NAME>
            <tiger:THUMBNAIL>pics/22037884-Ti.jpg</tiger:THUMBNAIL>
            <tiger:MAINPAGE>pics/22037884-L.jpg</tiger:MAINPAGE>
         </tiger:poi></gml:featureMember>
</wfs:FeatureCollection>

今の問題は、 に基づいてデータをフィルタリングしたいのですが、要求時に をパラメーターとして<tiger:NAME>lox</tiger:NAME>入力して試してみましたがtiger:NAME=lox、パラメーターを入力しない場合と同じ結果になりました。これに対する解決策はありますか?

4

1 に答える 1

2

WFS-RequestおよびGeoserver Filter内の Spatial Filter を使用した Filter Encoding に基づきます。という名前のパラメーターがfilterあり、値は次のように入力できることがわかりました。

http://localhost:8080/geoserver/tiger/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=tiger:poi&maxFeatures=2&filter=<PropertyIsEqualTo><PropertyName>NAME</PropertyName><Literal>lox</Literal></PropertyIsEqualTo>

于 2012-05-28T08:03:34.997 に答える