4

I am using Geoserver 2.12 with the application schema plugin to map a PostGIS database schema to the GeodesyML schema. I need to set up a WFS request that returns GeodesyML output such as:

<wfs:member>
  <geo:GeodesyML gml:id="geoml_monuments.fid-39d8a647_15cd161ff6e_-7e89">
     <geo:Site>
        <geo:installedDate>2001-09-12T06:00:00Z</geo:installedDate>
     </geo:Site>
     <geo:Monument>
        <geo:height />
        <geo:foundation />
     </geo:Monument>
     <geo:siteLog>
        <geo:siteIdentification>
           <geo:siteName>Cordell, OK</geo:siteName>
           <geo:fourCharacterID>SG19</geo:fourCharacterID>
        </geo:siteIdentification>
        <geo:siteLocation>
           <geo:city>Norman</geo:city>
           <geo:state>Oklahoma</geo:state>
           <geo:countryCodeISO>United States</geo:countryCodeISO>
           <geo:tectonicPlate>North America</geo:tectonicPlate>
           <geo:approximatePositionITRF>
              <geo:cartesianPosition>
                 <gml:Point gml:id="cart.geoml_monuments.fid-39d8a647_15cd161ff6e_-7e89" />
              </geo:cartesianPosition>
              <geo:geodeticPosition>
                 <gml:Point gml:id="latlon.geoml_monuments.fid-39d8a647_15cd161ff6e_-7e89" srsDimension="2">
                    <gml:pos>-98.977854677 35.355545782</gml:pos>
                 </gml:Point>
              </geo:geodeticPosition>
           </geo:approximatePositionITRF>
        </geo:siteLocation>
     </geo:siteLog>
  </geo:GeodesyML>

I have succeeded in doing this when the data is all stored in a single materialized view in my database. Unfortunately this is too limiting and I need to be able to pull things from multiple views. Specifically I want to be able to pull the geodeticPosition and cartesianPosition geometry objects from a PostGIS view called location_view and all the rest of the data from site_view. I believe the way to do this is by Feature Chaining wherein I need to set up a top level mapping file which pulls data from site_view and <Include>s a second mapping file that pulls from location_view. In each of these mapping files, what do I need to have in the <targetElement>, <targetAttribute>, <linkElement>, <linkField>, and <sourceExpression> fields? Alternatively, is there an easier way to pull data from two different tables/views into a single mapping file?

Here is an example provided from the Geoserver docs on Feature Chaining

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.