European Commission logo
INSPIRE Community Forum

Geoserver - problem with geometry in DataType

I've problem with support geometry function in WFS 2.0 when a geometry attribute is defined in DataType class and not directly in featureType class. For example: INSPIRE Address application schema 4.0 where geometry of address type is position:GeographicPosition:geomerty:GM_Point.

In the GML file that returns through the WFS service always SRS is encoded like this:http://www.opengis.net/gml/srs/epsg.xml#4258, regardless of server settings. 


<ad:geometry>

<gml:Point gml:id="geometry.0000059a-af4a-4940-8580-b55579f34b4f" srsDimension="2"srsName="http://www.opengis.net/gml/srs/epsg.xml#4258">

<gml:pos>

52.32023551 21.19134196

</gml:pos>

</gml:Point>

</ad:geometry>

But a more serious problem is with spatial filtering e.g. BBOX. Server not correctly supports other SRS then native and order of axis. 

Similar problems occur in other application schema where geometry is in DataType e.g. maritime units and population distribution.

Am I doing something wrong or a bug? I'm using Geoserver 3.14 i 3.12 and PostGIS database but the same problem have 
occured with MS SQL database.

Below fragment of my App-Schema config:


<AttributeMapping>
    <targetAttribute>ad:position/ad:GeographicPosition/ad:geometry</targetAttribute>
    <idExpression>
        <OCQL>strConcat('geometry.', id_localid)</OCQL>
    </idExpression>
    <sourceExpression>
        <OCQL>position_geo</OCQL>
    </sourceExpression>
</AttributeMapping>

 

Best regards,

Pawel

  • Jordi ESCRIU

    Dear Pawel,

    Thank you for your contribution.

    I will try to spread the word about your issue to Geoserver, WFS experts in order to respond you.

    Guess the problem persist?

    Jordi

  • Katharina SCHLEIDT

    By Katharina SCHLEIDT

    Hi Pawel,

    First off, if you're encountering similar issues in your underlying MS SQL database, think you may want to start looking here before you bother with the higher levels!

    The app schema mapping for the geometry encoding looks fairly good, whereby I tend to avoid doing concatenations on the ID in the mapping (I sort this in the DB in advance, safer :) )

    In addition, you may want to add info on the defaultGeometry as follows at the top of your FeatureTypeMapping, right under your targetElement:

    <defaultGeometry>ad:position/ad:GeographicPosition/ad:geometry</defaultGeometry>

    :)

    Kathi