Nuno,

that sounds like a useful improvement. One consideration is what happens when a nested geometry is multivalued and has a cardinality of zero or more than one. Also, do you anticipate that your implementation will work with nested properties generated by feature chaining? I am thinking of joining and filtering with spatial predicates.

Please also update <modules/extension/app-schema/app-schema/src/test/resources/test-data/AppSchemaDataAccess.xsd> to include this new element. I think this is still the canonical source for the schema, although we do not yet have a good way of distributing it.

Kind regards,
Ben.

On 19/02/18 22:29, Nuno Oliveira wrote:
Hi all,

Currently is not possible to specify in App-Schema mappings the default geometry of a mapped feature type,
note that having a default geometry defined is mainly important for WMS.

Most of the times a geometry will be available in the root feature type and a default geometry will be correctly
and automatically selected.

But in certain situations a feature type may have multiple geometries, or the geometry may be nested,
for example:

    <wfs:member>

       <st:Station gml:id​ = "station.st.1"​>

         <st:name>​station1​</st:name>

         <st:location>

           <st:name>​Europe​</st:name>

    *<st:position>*

    *         <gml:Point srsDimension​="2"*

    *           srsName​="http://www.opengis.net/gml/srs/epsg.xml#4326"​ >*

    *           <gml:pos>​-1.0 1.0​</gml:pos>*

    *         </gml:Point>*

    *       </st:position>*

         </st:location>

       </st:Station>

    </wfs:member>

In this case the geometry is nested inside the location element. I propose to extend App-Schema
mappings to allows us to define explicitly the default geometry:

    <FeatureTypeMapping>

       <sourceDataStore>​stations​</sourceDataStore>

       <sourceType>​stations​</sourceType>

       <targetElement>​st:Station​</targetElement>

    *<defaultGeometry>st:location/st:position</defaultGeometry>*

       <attributeMappings>

         <AttributeMapping>

           <targetAttribute>​st:Station​</targetAttribute>

           <idExpression>

             <OCQL>​strConcat('station.', ID)​</OCQL>

           </idExpression>

         </AttributeMapping>

Any objection or comments ?

Cheers,

Nuno Oliveira



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot



_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel


--
Ben Caradoc-Davies <b...@transient.nz>
Director
Transient Software Limited <https://transient.nz/>
New Zealand

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to