0

I'm creating a data model with user defined types (Composite Types) https://www.postgresql.org/docs/10/rowtypes.html to implement INSPIRE EU Data Model. And I want to publish my data with Web Feature Services (WFS). I tried that with GeoServer and MapServer.

GeoServer: doesn't read the column. When I tried, I got the follow warning:

09 mar 15:17:23 WARN [geotools.jdbc] - Could not find mapping for 'inspireid', ignoring the column and setting the feature type read only

MapServer: With MapServer I can have a WFS with all my data but not structured. For example, the column INSPIREID has 3 sub columns and it shows like this:

<base:inspireid>(vaedificio_100,https://catalog.inspire.geoportal.pt/BU/Building,"(2020-02-24,)")</base:inspireid>

insted of this

<base:inspireid>
    <base:localid>vaedificio_100</base:localid>
    <base:namespace>https://catalog.inspire.geoportal.pt/BU/Building</base:namespace>
    <base:versionid>2020-02-24</base:versionid>
</base:inspireid>

Possible workarounds in both cases is to give the query directly but I lose the structured with that to. MapServer have a interesting feature, "gml_groups" but it doesn't work for complex hierarchies. And with MapServer I have little control over the nampespaces, witch is another problem.

Is there alternative or know to can I resolve this problem?

6
  • 1
    are you using the app-schema extension in GeoServer?
    – Ian Turton
    Commented Mar 9, 2020 at 16:11
  • I didn't try that yet, and for what I have seen that could be my best hope, but I still didn't find a connection between Geoserver and PostgreSQL composite types so I still a lilltle bit skeptical. But I will try that. Commented Mar 9, 2020 at 16:18
  • I've never tried, but all the successful inspire data sets I have seen in GS use app-schema to do it
    – Ian Turton
    Commented Mar 9, 2020 at 16:21
  • failing that you can contribute or sponsor an upgrade to handle them
    – Ian Turton
    Commented Mar 9, 2020 at 16:22
  • You can't use MapServer to do a complex feature WFS AFAIK, another option is deegree.
    – nmtoken
    Commented Mar 10, 2020 at 10:20

1 Answer 1

3

GeoServer has not support for composite types. You can however publish data dataset in the classic relational way (separate table and foreign key) and use app-schema to explain GeoServer the relationship between the tables.

As a plan B, you can also implement support for composite types read wise, but it's not just reading them, you'll have to implement support for them while advertising the WFS schema, encoding GML, and what to do with the other formats (at the very least, it should not start throwing exceptions).

2
  • Thank you for the response. My English is not very good, and my programming skills are worse, what do you mean with "implement support"? Are you talking about changing the data model or are you talking about GeoServer? By the way, I already have a GML in compliance with my model and with INSPIRE, I just don't have the "service part". Do you know alternatives that can read GML instead of the DB? Commented Mar 10, 2020 at 9:42
  • I'm talking about writing code for GeoServer, yes. Alternatives... hum... maybe have a look at Deegree? Commented Mar 11, 2020 at 12:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.