0

I have been trying to create a mapServer map by joining 3 table then create classes on those joins (2000 - red, 2010 - green, 2020 - blue)

I am not getting an error but noting is display

$query = "geom FROM (SELECT a.geom, b.geom, c.geom FROM data2000 as a INNER JOIN data2015 as b ON b.province = '$variable' INNER JOIN data2020 as c ON b.province = '$variable') AS subquery USING UNIQUE gid USING SRID=4326";

I would also like to see this represented in

CLASS
     data 1
     STYLE
        ....
     END
END
CLASS
     data 2
     STYLE
        ....
     END
END
CLASS
     data 3
     STYLE
        ....
     END
END
  • That SQL query does not make sense. Why aren't you using three layers? – CL. May 18 at 14:20
  • Thanks man, I didn't think of that – Asanda Lamba May 19 at 8:55
2

I will try to prompt you:

  1. For classes you need to use EXPRESSION.

  2. DATA "target_point from (select events_objects_tbl.target_point, events_objects_tbl.source_point, geo_units_tbl.geo_unit_group from events_objects_tbl JOIN geo_units_tbl ON geo_units_tbl.id = events_objects_tbl.target_geo_unit_id AND geo_units_tbl.date = events_objects_tbl.date) as subquery using unique oid using srid=4326"

1a.

    CLASS
      NAME "events_targets_a"
      GROUP "events_targets"
      EXPRESSION ("[geo_unit_group]" = "Группа А")
      STYLE
        SYMBOL "a_targets_cluster"
        SIZE 64
      END
    END
| improve this answer | |

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.