Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support multiline DATA options in MapServer mapfiles #64

Open
sebastic opened this issue Jan 3, 2014 · 0 comments
Open

Support multiline DATA options in MapServer mapfiles #64

sebastic opened this issue Jan 3, 2014 · 0 comments

Comments

@sebastic
Copy link
Contributor

sebastic commented Jan 3, 2014

Currently the mapfile parser in TinyOWS doesn't support multiline options in the MapServer mapfile.

The multiline syntax supported by MapServer is very convenient for keeping long subqueries readable instead of forcing it onto a single line, which is currently required for TinyOWS.

An example mapfile multiline option with a long subquery not supported by TinyOWS:

    DATA           "geovlak from (SELECT w.gid, ST_Transform(w.geovlak, 4326) AS geovlak,
                                         w.woonplaatsnaam,
                                         gw.gemeentecode,
                                         gp.gemeentenaam,
                                         gp.provinciecode,
                                         gp.provincienaam,
                                         ow.osm_type,
                                         ow.osm_id
                                    FROM woonplaats          AS w,
                                         osm_woonplaats      AS ow,
                                         gemeente_woonplaats AS gw
                               LEFT JOIN gemeente_provincie  AS gp ON gw.gemeentecode = gp.gemeentecode
                                   WHERE w.woonplaatsstatus = 'Woonplaats aangewezen'
                                     AND w.aanduidingrecordinactief = 'false'
                                     AND w.begindatumtijdvakgeldigheid <= NOW()
                                     AND (w.einddatumtijdvakgeldigheid IS NULL OR
                                          w.einddatumtijdvakgeldigheid > NOW())
                                     AND w.identificatie = gw.woonplaatscode
                                     AND gw.status = 'definitief'
                                     AND gw.begindatumtijdvakgeldigheid <= NOW()
                                     AND (gw.einddatumtijdvakgeldigheid IS NULL OR
                                          gw.einddatumtijdvakgeldigheid > NOW())
                                     AND w.identificatie = ow.identificatie
                                 ) as subquery using unique gid using srid=4326"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant