[OSGeo Africa] PostGIS one to many relationship without duplicate geometries

Hugo Paul hugopaul at live.com
Mon Aug 17 12:06:32 PDT 2020

Hi Everyone

I am looking for some guidance/assistance please. I am building a web app using ArcGIS JS API 4.16 and our GeoDBMS is Postgres with PostGIS layers served through Geoserver 2.17.

We do not have an Arc Enterprise license and therefor use the Geoserver, OGCFeatureLayer, wms, etc. method to load layers into our web app.

My problem is that when I want to make a one to many relationship in Postgres (where the geometry layer is the one and a non-spatial table is the many), it duplicates the geometry.

Example: I have one high rise apartment block (1 polygon) with 50 living units (non-spatial table) when I try to relate (join) the non-spatial table to the spatial table it creates 50 duplicate polygons. I do this using views..

All I want is a relationship between the spatial and non-spatial tables without creating duplicate geometries (Similar to the ArcGIS relate function).

Has anyone experienced this that might be able to give me some advise please? Or if anyone knows of a consultancy firm with PostGIS experience who might be able to assist, please advise.

Thank you in advance

Kind regards

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/africa/attachments/20200817/c91c5ded/attachment.html>

More information about the Africa mailing list