3liz / lizmap-web-client

Transfer a QGIS project on a server, Lizmap is providing the web interface to browse it
https://www.lizmap.com
Mozilla Public License 2.0
259 stars 143 forks source link

Edit layers with 2 geometry column #694

Closed majorxtrem closed 6 years ago

majorxtrem commented 7 years ago

Hi,

I'm trying to edit a layer with tow geometry column and is not working :(

Here the SQL to create my table

CREATE TABLE immobilier.imm_insalubrites_test
(
    id integer NOT NULL DEFAULT nextval('immobilier.imm_insalubrites_test_id_seq'::regclass),
    refcad character varying(15) COLLATE pg_catalog."default",
    numero_boites character varying(5) COLLATE pg_catalog."default",
    mesures text COLLATE pg_catalog."default",
    date_debut date,
    date_fin date,
    geom geometry(MultiPoint,31370),
    geompoly geometry(MultiPolygon,31370),
    CONSTRAINT pk_imm_insalubrites_test PRIMARY KEY (id)
)

I have a TRIGGER and a FUNCTION in Postgis to update the filed geompoly when I do insert or update.

we use that to avoid digitize a polygon an instead use a point, it's easier for the end user.

In QGIS (2.18.13) it's working very well but not in lizmap (master branch)

In log I have this : ERREUR: parse error - invalid geometry ASTUCE : "" <-- parse error at position 1 within geometry INSTRUCTION : SELECT GeometryType(ST_GeomFromText('', 31370)) as geomtype

Do you have an idea ? It's a bug or a limitation of lizmap ?

In advance Thx

rldhont commented 7 years ago

If you do not publish geompoly in WFS, do you continue to have the issue ?