6

I have a point shapefile of Persons (The point is located at the registered address of the person) and a polygon shapefile of parcels.

There is an owner_id attribute in the parcels shapefile, which links the owner in the persons shapefile to the the parcel ( For the sake of argument lets assume that one parcel can have only one owner, while one person can own multiple parcels)

If I was working with ArcGIS, I would have created a relationship class to link these two featureclasses in the Geo-database, and then Published the data using ArcGIS Server. I could then use Query Related Records (Operation) on the Rest End point in my Web App.

But I'm working with the Open source stack (Qgis+PostGIS+Geoserver+OpenLayers). What is the way of modelling these relationships in this stack?

Right now I have the primary-key foreign-key relationship set up in the PostGIS Database, and have published these two layers as two different services. Whenever I need to find related records, I have to manually run WFS requests on the other layer.

Is there a better, more standard compliant or best-practice way of doing this in the Open Source Stack?

3

You are describing what the OGC world calls a complex feature. GeoServer supports this through the App Schema plugin - see this tutorial for a (fairly) clear introduction to this.

Your Answer

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

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