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:

  <geo:GeodesyML gml:id="geoml_monuments.fid-39d8a647_15cd161ff6e_-7e89">
        <geo:height />
        <geo:foundation />
           <geo:siteName>Cordell, OK</geo:siteName>
           <geo:countryCodeISO>United States</geo:countryCodeISO>
           <geo:tectonicPlate>North America</geo:tectonicPlate>
                 <gml:Point gml:id="cart.geoml_monuments.fid-39d8a647_15cd161ff6e_-7e89" />
                 <gml:Point gml:id="latlon.geoml_monuments.fid-39d8a647_15cd161ff6e_-7e89" srsDimension="2">
                    <gml:pos>-98.977854677 35.355545782</gml:pos>

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.