Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhanced deegree for support of Spatial Joins #720

Merged
merged 30 commits into from
Nov 23, 2022

Conversation

dstenger
Copy link
Contributor

This pull request implements support of "Spatial Joins".

A description how Spatial Joins work can be found in the WFS 2.0 specification: Chapter "7.9.2.5.3.1
Join queries", page 39

In addition, the implementation fulfils all requirements of the Spatial Joins conformance class as defined in the WFS 2.0 specification (Chapter "A.1.12 Spatial joins", page 103).

This is an example request how to use Spatial Joins:

<?xml version="1.0" encoding="UTF-8"?>
<wfs:GetFeature service="WFS" version="2.0.0" xmlns:app="http://www.deegree.org/app"
 xmlns:wfs="http://www.opengis.net/wfs/2.0" xmlns:fes="http://www.opengis.net/fes/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:schemaLocation="http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0/wfs.xsd
http://www.opengis.net/fes/2.0 http://schemas.opengis.net/filter/2.0/filter.xsd"
 count="1">
 <wfs:Query typeNames="app:feature_type_1 app:feature_type_2">
  <fes:Filter>
   <fes:Intersects>
    <fes:ValueReference>app:feature_type_1/app:geometry</fes:ValueReference>
    <fes:ValueReference>app:feature_type_2/app:geometry</fes:ValueReference>
   </fes:Intersects>
  </fes:Filter>
 </wfs:Query>
</wfs:GetFeature>

In this case, an Intersect operation between the two FeatureTypes "feature_type_1" and "feature_type_2" is executed.
The result will be returned as a tuple.
Example of response:

<wfs:FeatureCollection xsi:schemaLocation="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 http://www.deegree.org/app http://test-server:8080/deegree/services/wfs?SERVICE=WFS&amp;VERSION=2.0.0&amp;REQUEST=DescribeFeatureType&amp;OUTPUTFORMAT=application%2Fgml%2Bxml%3B+version%3D3.2&amp;TYPENAME=app:feature_type_1,app:feature_type_2&amp;NAMESPACES=xmlns(app,http%3A%2F%2Fwww.deegree.org%2Fapp)" timeStamp="2016-06-27T13:59:03Z" numberMatched="1" numberReturned="1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wfs="http://www.opengis.net/wfs/2.0" xmlns:gml="http://www.opengis.net/gml/3.2">
   <wfs:boundedBy>
      <gml:Envelope srsName="urn:ogc:def:crs:EPSG::4326">
         <gml:lowerCorner>...</gml:lowerCorner>
         <gml:upperCorner>...</gml:upperCorner>
      </gml:Envelope>
   </wfs:boundedBy>
   <wfs:member>
      <wfs:Tuple>
         <wfs:member>
            <app:feature_type_1 gml:id="feature_type_1_10" xmlns:app="http://www.deegree.org/app">
               <app:name>test</app:name>
               <app:geometry>
                  <!--Inlined geometry 'feature_type_1_10_APP_GEOMETRY'-->
                  <gml:Polygon gml:id="feature_type_1_10_APP_GEOMETRY" srsName="urn:ogc:def:crs:EPSG::4326">
                     <gml:exterior>
                        <gml:LinearRing>
                           <gml:posList>...</gml:posList>
                        </gml:LinearRing>
                     </gml:exterior>
                  </gml:Polygon>
               </app:geometry>
            </app:feature_type_1>
         </wfs:member>
         <wfs:member>
            <app:feature_type_2 gml:id="feature_type_2_3" xmlns:app="http://www.deegree.org/app">
               <app:name>test</app:name>
               <app:geometry>
                  <!--Inlined geometry 'feature_type_2_3_APP_GEOMETRY'-->
                  <gml:Polygon gml:id="feature_type_2_3_APP_GEOMETRY" srsName="urn:ogc:def:crs:EPSG::4326">
                     <gml:exterior>
                        <gml:LinearRing>
                           <gml:posList>...</gml:posList>
                        </gml:LinearRing>
                     </gml:exterior>
                  </gml:Polygon>
               </app:geometry>
            </app:feature_type_2>
         </wfs:member>
      </wfs:Tuple>
   </wfs:member>
</wfs:FeatureCollection>

The implementation is limited to PostgreSQL-FeatureStores.

lgoltz and others added 25 commits May 26, 2016 12:16
@dstenger dstenger added enhancement enhancement or improvement in progress labels Jun 27, 2016
@tfr42 tfr42 added this to the 3.4 milestone Jul 7, 2016
@tfr42 tfr42 modified the milestones: 3.4.1, 3.4 Aug 9, 2016
@tfr42 tfr42 modified the milestones: 3.4.1, 3.5 Jun 18, 2018
@copierrj copierrj added the needs rebase PR is not up to date and needs rebase label Jul 26, 2019
@tfr42 tfr42 added WFS deegree Web Feature Service and removed needs rebase PR is not up to date and needs rebase labels Aug 15, 2021
@tfr42 tfr42 added the CI failing CI build job fails label Feb 4, 2022
@tfr42 tfr42 added the needs rebase PR is not up to date and needs rebase label May 16, 2022
@tfr42 tfr42 removed the needs rebase PR is not up to date and needs rebase label Jun 3, 2022
@stephanr stephanr removed the CI failing CI build job fails label Nov 23, 2022
@copierrj copierrj merged commit 275ffa9 into deegree:main Nov 23, 2022
@lgoltz lgoltz deleted the spatialJoins branch December 8, 2022 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement enhancement or improvement WFS deegree Web Feature Service
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants