Coder Social home page Coder Social logo

Comments (12)

MaelREBOUX avatar MaelREBOUX commented on July 22, 2024 1

As seen this morning I find that using the configuration of the attribute table plugin is more suitable for my personnal use cases.

These kind of support is layer dependent, this means that inside the attribute table configuration the administrator must include specific configuration properties for each layer for which he wants to provide the above (coded values and validations).

Need to test ;)

from mapstore2-georchestra.

offtherailz avatar offtherailz commented on July 22, 2024

We have custom editor options:
See this dependent project.
https://github.com/geosolutions-it/MapStore2-C040/blob/master/localConfig.json#L368

where you define RULES (regex that apply identify the layer and the attribute to apply)
and each rule can use a custom editor.

The linked config has a custom editor called "AddressesEditor", that is a customization present only in that installation.

In MapStore we have only "DropDownEditor" that can be configured with a fixed list of values (this covers the first point).
We can add a NumberEditor that can be used to define min and max and a FormatEditor that checks if the content matches a regex.

from mapstore2-georchestra.

offtherailz avatar offtherailz commented on July 22, 2024

I report some additional information about the meeting:

  • We will check if it is possible to add also initial default values for new rows, because this task was not foreseen in the original program
  • @MaelREBOUX can you provide us a sample dataset, with write permission and all the data types you need to support, and also the constraints on values for each attribute, so we can ensure that all the use cases are covered? thank you very much

from mapstore2-georchestra.

MaelREBOUX avatar MaelREBOUX commented on July 22, 2024

This is the test layer layer for editing : https://public-test.sig.rennesmetropole.fr/geoserver/wfs?REQUEST=DescribeFeatureType&TYPENAME=test:mapstore_test

But I have issues to correctly set up the permissions for being editing by anyone in WFS. It is not ou traditionnal way...

CREATE TABLE mapstore_test
(
    id integer NOT NULL DEFAULT nextval('urba_foncier.mapstore_test_id_seq'::regclass),
    att_integer integer,
    att_integer_constr integer NOT NULL,
    att_long numeric,
    att_varchar character varying(50) COLLATE pg_catalog."default" DEFAULT ''::character varying,
    att_varchar_constr character varying(50) COLLATE pg_catalog."default" DEFAULT ''::character varying,
    att_text text COLLATE pg_catalog."default",
    att_text_constr text COLLATE pg_catalog."default",
    att_url text COLLATE pg_catalog."default",
    att_boolen boolean,
    att_date_iso date,
    att_date_timestamp timestamp without time zone DEFAULT now(),
    geom geometry(Point,3948),
    CONSTRAINT mapstore_test_pk PRIMARY KEY (id)
        USING INDEX TABLESPACE bdu,
    CONSTRAINT att_varchar_constr_dom CHECK (att_varchar_constr::text = ANY (ARRAY['Non renseigné'::text, 'Publicité'::text, 'Pré-enseigne'::text, 'Enseigne'::text])),
    CONSTRAINT att_integer_constr_check CHECK (att_integer_constr < 5),
    CONSTRAINT att_text_constr_dom CHECK (att_text_constr = ANY (ARRAY['non renseigné'::text, 'permanent'::text, 'temporaire'::text]))
)

from mapstore2-georchestra.

MaelREBOUX avatar MaelREBOUX commented on July 22, 2024

@offtherailz @tdipisa

I still cannot correctly set up the permissions for obtain a WFS layer edited by anyone (ie not authentificated).
I wrote a message to the mailing list for support. Could you help ?

from mapstore2-georchestra.

tdipisa avatar tdipisa commented on July 22, 2024

@MaelREBOUX I will check it tomorrow, thank you anyway.

from mapstore2-georchestra.

tdipisa avatar tdipisa commented on July 22, 2024

@MaelREBOUX

I still cannot correctly set up the permissions for obtain a WFS layer edited by anyone (ie not authentificated).

I saw that in our DEV instance of geOrchestra there is a specific security rule at WFS service level that prevent other users (also anonymous) to write data through WFS

image

I'm quite confident that you have something similar in your public-test instance.
Therefore I don't think that you can provide write access to us on test:mapstore_test.

Maybe you can share an export of the dataset in SHP format? If you can do that we can publish it in our DEV instance.

Anyway I think that we don't necessarily need to finally save a modification, what we have to do here is to properly setup the edit mode in MS according to the data and the configuration of the plugin for that layer.

from mapstore2-georchestra.

MaelREBOUX avatar MaelREBOUX commented on July 22, 2024

Sad news but logical for geOrchestra : need to be authentificated for this kind of work.

From our point of view it is important to test in the conditions of production, ie : table with constraints.

So... I think you have a PostGIS database on the demo platform ?
If yes : could you create the layer described above : #49 (comment)

from mapstore2-georchestra.

tdipisa avatar tdipisa commented on July 22, 2024

@MaelREBOUX

Sad news but logical for geOrchestra : need to be authentificated for this kind of work.

Of course, that's exactly what I supposed in my previous comment.

From our point of view it is important to test in the conditions of production, ie : table with constraints.

OK

So... I think you have a PostGIS database on the demo platform ?
If yes : could you create the layer described above : #49 (comment)

OK, let's try with this

from mapstore2-georchestra.

randomorder avatar randomorder commented on July 22, 2024

@tdipisa
I created a database and table on our DEV environment. I just had to tweak a little the creation script (we don't have a bdu tablespace or a urba_foncier schema):

geoserver=> CREATE TABLE mapstore_test
(
    id integer NOT NULL DEFAULT nextval('mapstore_test_id_seq'::regclass),
    att_integer integer,
    att_integer_constr integer NOT NULL,
    att_long numeric,
    att_varchar character varying(50) COLLATE pg_catalog."default" DEFAULT ''::character varying,
    att_varchar_constr character varying(50) COLLATE pg_catalog."default" DEFAULT ''::character varying,
    att_text text COLLATE pg_catalog."default",
    att_text_constr text COLLATE pg_catalog."default",
    att_url text COLLATE pg_catalog."default",
    att_boolen boolean,
    att_date_iso date,
    att_date_timestamp timestamp without time zone DEFAULT now(),
    geom geometry(Point,3948),
    CONSTRAINT mapstore_test_pk PRIMARY KEY (id),
    CONSTRAINT att_varchar_constr_dom CHECK (att_varchar_constr::text = ANY (ARRAY['Non renseigné'::text, 'Publicité'::text, 'Pré-enseigne'::text, 'Enseigne'::text])),                                                                                                                                                                           CONSTRAINT att_integer_constr_check CHECK (att_integer_constr < 5),
    CONSTRAINT att_text_constr_dom CHECK (att_text_constr = ANY (ARRAY['non renseigné'::text, 'permanent'::text, 'temporaire'::text]))
);
CREATE TABLE

More detail in the doc for the DEV server. The layer is published here

Any issues let me know

from mapstore2-georchestra.

tdipisa avatar tdipisa commented on July 22, 2024

@randomorder
Thank you so much for this. You forgot to include this constraint:

CONSTRAINT att_integer_constr_check CHECK (att_integer_constr < 5),

@offtherailz @vlt1
I've pepared this context in our DEV where I've populated the layer with some points. Constraints are properly working DB side.

from mapstore2-georchestra.

tdipisa avatar tdipisa commented on July 22, 2024

@MaelREBOUX I think we are ready now, thank you.

from mapstore2-georchestra.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.