tinyows
tinyows copied to clipboard
Support multiline DATA options in MapServer mapfiles
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"