0

Is it possible to denormalize relation between non feature type and feature type? So the result is a feature type.

Here is an example to demonstrate my needs: I have two table stations & observations

stations table

id  code    name          position
-------------------------------------------
13  ALS     Alessandria   POINT(8.63 44.92)
7   BOL     Bologna       POINT(11.34 44.50)
21  ROV     Rovereto      POINT(11.05 45.89) 

observations table

id      station_id      time                    value
--------------------------------------------------------------
1       13              2016-12-19 12:26:40     20
2       13              2016-12-19 12:27:13     155
3       7               2016-12-19 12:28:31     35
4       7               2016-12-19 12:28:55     25
5       7               2016-12-19 12:29:24     80
6       7               2016-12-19 12:30:26     1019
7       7               2016-12-19 12:30:51     1015

Is it possible to map these tables to get feature type represent the below table

id      station_id      time                    value       Point
-----------------------------------------------------------------------------
1       13              2016-12-19 12:26:40     20          POINT(8.63 44.92)
2       13              2016-12-19 12:27:13     155         POINT(8.63 44.92)
3       7               2016-12-19 12:28:31     35          POINT(11.34 44.50)
4       7               2016-12-19 12:28:55     25          POINT(11.34 44.50)
5       7               2016-12-19 12:29:24     80          POINT(11.34 44.50)
6       7               2016-12-19 12:30:26     1019        POINT(11.34 44.50)
7       7               2016-12-19 12:30:51     1015        POINT(11.34 44.50)

So I can do WMS & WFS requests for this feature type.

Note: This can done using SQL views, but it is required to be done using application schema.

  • Did you try writing the query of join in application schema ? – Ahsan Mukhtar Apr 8 at 9:42
  • how? can you provide an example?!! – Ahmed Nour Eldeen Apr 8 at 9:49

Your Answer

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

Browse other questions tagged or ask your own question.