From 00f1c2a893a6d7dc0d0fb2effdae2179620a9942 Mon Sep 17 00:00:00 2001 From: Michael Douchin Date: Tue, 23 Jul 2024 17:56:03 +0200 Subject: [PATCH] Compatibility for Lizmap 3.6 & 3.7 - Remove compatibility for 3.5 --- gobsapi/classes/Indicator.class.php | 4 +- gobsapi/classes/Project.class.php | 71 +- gobsapi/classes/gobsapiListener.listener.php | 143 + gobsapi/controllers/observation.classic.php | 11 +- gobsapi/events.xml | 6 +- .../{gobsapi => config}/config.ini.php | 0 gobsapi/install/configure.php | 73 + gobsapi/install/install.php | 27 +- gobsapi/install/install_1_6.php | 33 + gobsapi/module.xml | 4 +- gobsapi/www/img/lizmap_mappemonde.jpg | Bin 0 -> 14302 bytes tests/Makefile | 122 +- tests/README.md | 109 +- tests/add-server-plugins.sh | 5 + tests/api_tests.md | 36 + ...vation_create_outside_allowed_polygon.json | 18 + ...ut_observation_create_outside_project.json | 19 + tests/docker-compose.yml | 12 +- tests/lizmap/etc/additional-config.ini | 1 + .../conf/lizmapconfig.d/lizmapConfig.ini.php | 8 +- .../conf/localconfig.d/localconfig.ini.php | 8 + .../etc/conf/profiles.d/profile.ini.php | 16 +- tests/lizmap/etc/mailconfig.ini | 14 - tests/lizmap/etc/nginx.conf | 6 +- tests/lizmap/etc/pg_service.conf | 14 - tests/lizmap/initdb.d/init.sh | 11 + .../instances/tests/gobs_administration.qgs | 8580 ++++++++++++++++ .../tests/gobs_administration.qgs.bak | 8582 +++++++++++++++++ .../tests/gobs_administration.qgs.cfg | 1169 +++ .../tests/gobs_administration_attachments.zip | Bin 0 -> 1992 bytes .../instances/{gobsapi => tests}/gobsapi.qgs | 0 .../{gobsapi => tests}/gobsapi.qgs.cfg | 0 tests/sql/import.sh | 10 + tests/sql/test_data.sql | 40 +- 34 files changed, 18893 insertions(+), 259 deletions(-) create mode 100644 gobsapi/classes/gobsapiListener.listener.php rename gobsapi/install/{gobsapi => config}/config.ini.php (100%) create mode 100644 gobsapi/install/configure.php create mode 100644 gobsapi/install/install_1_6.php create mode 100644 gobsapi/www/img/lizmap_mappemonde.jpg create mode 100755 tests/add-server-plugins.sh create mode 100644 tests/api_tests.md create mode 100644 tests/api_tests/data/input_observation_create_outside_allowed_polygon.json create mode 100644 tests/api_tests/data/input_observation_create_outside_project.json create mode 100644 tests/lizmap/etc/additional-config.ini delete mode 100644 tests/lizmap/etc/mailconfig.ini create mode 100644 tests/lizmap/instances/tests/gobs_administration.qgs create mode 100644 tests/lizmap/instances/tests/gobs_administration.qgs.bak create mode 100644 tests/lizmap/instances/tests/gobs_administration.qgs.cfg create mode 100644 tests/lizmap/instances/tests/gobs_administration_attachments.zip rename tests/lizmap/instances/{gobsapi => tests}/gobsapi.qgs (100%) rename tests/lizmap/instances/{gobsapi => tests}/gobsapi.qgs.cfg (100%) create mode 100755 tests/sql/import.sh diff --git a/gobsapi/classes/Indicator.class.php b/gobsapi/classes/Indicator.class.php index 7b2dac5..2a69494 100644 --- a/gobsapi/classes/Indicator.class.php +++ b/gobsapi/classes/Indicator.class.php @@ -745,7 +745,7 @@ public function setDocumentUrl($document) 'gobsapi~indicator:getIndicatorDocument' ); $document_url = str_replace( - 'index.php/gobsapi/indicator/getIndicatorDocument', + 'gobsapi.php/gobsapi/indicator/getIndicatorDocument', 'gobsapi.php/project/'.$this->project_key.'/indicator/'.$this->code.'/document/'.$document->uid, $document_url ); @@ -774,7 +774,7 @@ public function setObservationMediaUrl($uid) 'gobsapi~observation:getObservationMedia' ); $media_url = str_replace( - 'index.php/gobsapi/observation/getObservationMedia', + 'gobsapi.php/gobsapi/observation/getObservationMedia', 'gobsapi.php/project/'.$this->project_key.'/indicator/'.$this->code.'/observation/'.$uid.'/media', $media_url ); diff --git a/gobsapi/classes/Project.class.php b/gobsapi/classes/Project.class.php index 771a881..a9846ee 100644 --- a/gobsapi/classes/Project.class.php +++ b/gobsapi/classes/Project.class.php @@ -92,7 +92,7 @@ public function __construct($project_key, $login) $this->buildGobsProject(); } } else { - jLog::log('Project "'.$project_key.'" connection name is not valid: "'.$this->connectionName.'"'); + \jLog::log('Project "'.$project_key.'" connection name is not valid: "'.$this->connectionName.'"'); } } @@ -189,14 +189,14 @@ public function checkConnection() } } else { $errorCode = $cnx->errorCode(); - jLog::log('Connection to the PostgreSQL service "'.$this->connectionName.'" failed', 'error'); - jLog::log($errorCode, 'error'); + \jLog::log('Connection to the PostgreSQL service "'.$this->connectionName.'" failed', 'error'); + \jLog::log($errorCode, 'error'); $status = false; } } catch (Exception $e) { $msg = $e->getMessage(); - jLog::log('Connection to the PostgreSQL service "'.$this->connectionName.'" failed', 'error'); - jLog::log($msg, 'error'); + \jLog::log('Connection to the PostgreSQL service "'.$this->connectionName.'" failed', 'error'); + \jLog::log($msg, 'error'); $status = false; } @@ -217,14 +217,15 @@ public function checkConnection() public function getProjectPropertiesFromDatabase() { $project = null; - $cnx = jDb::getConnection($this->connectionProfile); + $projectCode = $this->project_key; + $groups = implode('@@', $this->userGroups); $sql = " WITH proj AS ( SELECT id FROM gobs.project - WHERE pt_code = $1 + WHERE pt_code = ".$cnx->quote($projectCode)." LIMIT 1 ), global_view AS ( @@ -241,11 +242,11 @@ public function getProjectPropertiesFromDatabase() SELECT fk_id_project, string_agg(pv_label, ',') AS labels, - ST_multi(ST_Union(geom))::geometry(MULTIPOLYGON, 4326) AS geom + CAST( ST_multi(ST_Union(geom)) AS geometry(MULTIPOLYGON, 4326) ) AS geom FROM proj, gobs.project_view AS pv WHERE fk_id_project = proj.id AND regexp_split_to_array(pv_groups, '[\\s,;]+') - && regexp_split_to_array($2, '@@') + && regexp_split_to_array(".$cnx->quote($groups).", '@@') GROUP BY fk_id_project ) SELECT @@ -263,37 +264,45 @@ public function getProjectPropertiesFromDatabase() INNER JOIN merged_views AS mv ON mv.fk_id_project = p.id - WHERE p.pt_code = $1 + WHERE p.pt_code = ".$cnx->quote($projectCode)." LIMIT 1 "; - $params = array( - $this->project_key, - implode('@@', $this->userGroups), - ); + $resultset = null; try { + $resultset = $cnx->prepare($sql); - $resultset->execute($params); + // We do not used prepared statement anymore because this feature seems broken + $execute = $resultset->execute(); + $data = array(); - foreach ($resultset->fetchAll() as $record) { - $data['id'] = $record->id; - $data['code'] = $record->pt_code; - $data['lizmap_project_key'] = $record->pt_lizmap_project_key; - $data['label'] = $record->pt_label; - $data['description'] = $record->pt_description; - $data['indicator_codes'] = $record->pt_indicator_codes; - $data['allowed_polygon_wkt'] = $record->allowed_polygon_wkt; - $data['xmin'] = $record->xmin; - $data['ymin'] = $record->ymin; - $data['xmax'] = $record->xmax; - $data['ymax'] = $record->ymax; + if ($resultset && $resultset->id() === false) { + $errorCode = $cnx->errorCode(); + + throw new Exception($errorCode); + } + + if ($resultset !== null) { + foreach ($resultset->fetchAll() as $record) { + $data['id'] = $record->id; + $data['code'] = $record->pt_code; + $data['lizmap_project_key'] = $record->pt_lizmap_project_key; + $data['label'] = $record->pt_label; + $data['description'] = $record->pt_description; + $data['indicator_codes'] = $record->pt_indicator_codes; + $data['allowed_polygon_wkt'] = $record->allowed_polygon_wkt; + $data['xmin'] = $record->xmin; + $data['ymin'] = $record->ymin; + $data['xmax'] = $record->xmax; + $data['ymax'] = $record->ymax; + } } return $data; } catch (Exception $e) { $msg = $e->getMessage(); - jLog::log('An error occured while requesting the properties for the project "'.$this->project_key.'"', 'error'); - jLog::log($msg, 'error'); + \jLog::log('An error occurred while requesting the properties for the project "'.$this->project_key.'"', 'error'); + \jLog::log($msg, 'error'); return null; } @@ -327,7 +336,7 @@ private function buildGobsProject() 'gobsapi~project:getProjectGeopackage', ); $gpkg_url = str_replace( - 'index.php/gobsapi/project/getProjectGeopackage', + 'gobsapi.php/gobsapi/project/getProjectGeopackage', 'gobsapi.php/project/'.$this->project_key.'/geopackage', $gpkg_url ); @@ -345,7 +354,7 @@ private function buildGobsProject() 'gobsapi~project:getProjectIllustration', ); $media_url = str_replace( - 'index.php/gobsapi/project/getProjectIllustration', + 'gobsapi.php/gobsapi/project/getProjectIllustration', 'gobsapi.php/project/'.$this->project_key.'/illustration', $media_url ); diff --git a/gobsapi/classes/gobsapiListener.listener.php b/gobsapi/classes/gobsapiListener.listener.php new file mode 100644 index 0000000..f140626 --- /dev/null +++ b/gobsapi/classes/gobsapiListener.listener.php @@ -0,0 +1,143 @@ +getSAMLAttributes(); + \jLog::dump($attributes, "onAuthLogin: SAML attributes"); + + + $allGroups = array(); + foreach(jAcl2DbUserGroup::getGroupList() as $group) { + $allGroups[$group->id_aclgrp] = $group; + } + + $login = $event->login; + + $groupsOfUser = array(); + if (isset($attributes['GOBS_ROLE'])) { + // expect to have array having this kind of item: + // '{"id":"cn=ROLE_GOBS_ADMIN,ou=ROLE,cn=GOBS,ou=application,dc=pacte,dc=projet", "code":"ROLE_GOBS_ADMIN", "label":"Role admin pour G-Obs"}' + + if (!is_array($attributes['GOBS_ROLE'])) { + $attributes['GOBS_ROLE'] = array($attributes['GOBS_ROLE']); + } + + $groupsOfUser = $this->registerGroups($allGroups, $attributes['GOBS_ROLE'], 'GOBS_ROLE'); + } + + if (isset($attributes['GOBS_SI'])) { + // expect to have array having this kind of item: + // '{"id":null, "code":"GOBS_ADMIN", "label":"Administrateurs G-Obs", "description":"Les adminstrateurs de G-Obs"}' + if (!is_array($attributes['GOBS_SI'])) { + $attributes['GOBS_SI'] = array($attributes['GOBS_SI']); + } + + $groupsOfUser = array_merge($groupsOfUser, $this->registerGroups($allGroups, $attributes['GOBS_SI'], 'GOBS_SI')); + } + + \jLog::dump(array_keys($groupsOfUser), "onAuthLogin: Groupes de l'utilisateur $login"); + $groupToRemove = array(); + foreach(jAcl2DbUserGroup::getGroupList($login) as $group) { + if ($group->grouptype == 2) { + // private group, let's ignore + continue; + } + if (isset($groupsOfUser[$group->id_aclgrp])) { + // the user is already in the group + unset($groupsOfUser[$group->id_aclgrp]); + } + else { + // the user is in a group that is not listed in roles given by SAML + // let's remove him from it + $groupToRemove[] = $group->id_aclgrp; + } + } + + $hasChanges = false; + foreach($groupToRemove as $grpId) { + \jLog::log("onAuthLogin: Remove $login from $grpId"); + \jAcl2DbUserGroup::removeUserFromGroup($login, $grpId); + $hasChanges = true; + } + + foreach($groupsOfUser as $grpId => $ok) { + \jLog::log("onAuthLogin: Add $login into $grpId"); + \jAcl2DbUserGroup::addUserToGroup($login, $grpId); + $hasChanges = true; + } + + if ($hasChanges) { + \jAcl2::clearCache(); + } + } + + protected function registerGroups(&$allGroups, $samlGroups, $rolesName) { + $groupsOfUser = array(); + $adminGroup = array(); + if (isset(jApp::config()->gobsapi['adminSAMLGobsRoleName'])) { + $adminGroup = \jApp::config()->gobsapi['adminSAMLGobsRoleName']; + if (!is_array($adminGroup)) { + $adminGroup = array($adminGroup); + } + } + + foreach($samlGroups as $roleAsJson) { + $role = @json_decode($roleAsJson, true); + if (!$role || !isset($role['code']) || $role['code'] == '') { + \jLog::log('gobs login: bad role value into '.$rolesName.', not a json or code property missing: '.$roleAsJson, 'error'); + continue; + } + $idGrp = $role['code']; + $name = isset($role['label']) ? $role['label']: $idGrp; + if ($name == '') { + $name = $idGrp; + } + if (!isset($allGroups[$idGrp])) { + \jAcl2DbUserGroup::createGroup($name, $idGrp); + if (in_array($idGrp, $adminGroup)) { + foreach(jAcl2DbManager::$ACL_ADMIN_RIGHTS as $role) { + \jAcl2DbManager::addRight($idGrp, $role); + } + \jAcl2DbManager::addRight($idGrp, 'acl.group.create'); + \jAcl2DbManager::addRight($idGrp, 'auth.users.list'); + \jAcl2DbManager::addRight($idGrp, 'auth.users.modify'); + \jAcl2DbManager::addRight($idGrp, 'auth.users.view'); + \jAcl2DbManager::addRight($idGrp, 'lizmap.admin.access'); + \jAcl2DbManager::addRight($idGrp, 'lizmap.admin.repositories.create'); + \jAcl2DbManager::addRight($idGrp, 'lizmap.admin.repositories.delete'); + \jAcl2DbManager::addRight($idGrp, 'lizmap.admin.repositories.update'); + \jAcl2DbManager::addRight($idGrp, 'lizmap.admin.repositories.view'); + \jAcl2DbManager::addRight($idGrp, 'lizmap.admin.services.update'); + \jAcl2DbManager::addRight($idGrp, 'lizmap.admin.services.view'); + + } + \jAcl2DbManager::removeRight($idGrp, 'auth.user.change.password', '-', true); + \jAcl2DbManager::removeRight($idGrp, 'auth.users.change.password', '-', true); + \jAcl2DbManager::addRight($idGrp, 'auth.user.view'); + \jAcl2DbManager::addRight($idGrp, 'auth.user.modify'); + } + + $groupsOfUser[$idGrp] = true; + } + return $groupsOfUser; + } + +} diff --git a/gobsapi/controllers/observation.classic.php b/gobsapi/controllers/observation.classic.php index a00a3b5..a6bce83 100644 --- a/gobsapi/controllers/observation.classic.php +++ b/gobsapi/controllers/observation.classic.php @@ -152,8 +152,17 @@ private function checkBodyActions($from) { // Parameters $body = $this->request->readHttpBody(); + // Since Jelix 1.7, the body is given as an array and not as a string anymore. + // Gobs Observation class expects it as a JSON string + if (is_array($body)) { + // For new versions, we must re-encode it as JSON + $bodyString = json_encode($body); + } else { + $bodyString = $body; + } + $observation_uid = null; - $gobs_observation = new Observation($this->user, $this->indicator, $observation_uid, $body); + $gobs_observation = new Observation($this->user, $this->indicator, $observation_uid, $bodyString); // Check observation JSON $action = 'create'; diff --git a/gobsapi/events.xml b/gobsapi/events.xml index b3b6f94..b55bb0b 100755 --- a/gobsapi/events.xml +++ b/gobsapi/events.xml @@ -1,7 +1,5 @@ - diff --git a/gobsapi/install/gobsapi/config.ini.php b/gobsapi/install/config/config.ini.php similarity index 100% rename from gobsapi/install/gobsapi/config.ini.php rename to gobsapi/install/config/config.ini.php diff --git a/gobsapi/install/configure.php b/gobsapi/install/configure.php new file mode 100644 index 0000000..81ae1f1 --- /dev/null +++ b/gobsapi/install/configure.php @@ -0,0 +1,73 @@ +havingName( + 'gobsapi', + array( + new MapInclude('urls.xml') + ) + ) + ; + } + + public function getEntryPointsToCreate() + { + return array( + new \Jelix\Installer\Module\EntryPointToInstall( + 'gobsapi.php', + 'gobsapi/config.ini.php', + 'gobsapi.php', + 'config/config.ini.php' + ) + ); + } + + + function configure(\Jelix\Installer\Module\API\ConfigurationHelpers $helpers) + { + // Copy configuration file for user defined options + // TODO: This file should be editable by the admin user in LWC admin panel + $gobs_config_target = \jApp::varConfigPath('gobsapi.ini.php'); + if (!file_exists($gobs_config_target)) { + $helpers->copyFile('config/gobsapi.ini.php.dist', $gobs_config_target); + } + + // Adapt SAML configuration it is exists + $authConfigfile = \jApp::varConfigPath('saml/saml.coord.ini.php'); + if (file_exists($authConfigfile)) { + $authConfig = new \Jelix\IniFile\IniModifier($authConfigfile); + $authConfig->setValue('userform', "lizmap~account", 'saml'); + $authConfig->save(); + } + + $localConfigFile = \jApp::varConfigPath('localconfig.ini.php'); + $localConfig = new \Jelix\IniFile\IniModifier($localConfigFile); + if (!isset(jApp::config()->gobsapi['adminSAMLGobsRoleName'])) { + $localConfig->setValue('adminSAMLGobsRoleName', 'ROLE_GOBS_ADMIN', 'gobsapi', ''); + $localConfig->setValue('adminSAMLGobsRoleName', 'GOBS_ADMIN', 'gobsapi', ''); + $localConfig->save(); + } + } +} diff --git a/gobsapi/install/install.php b/gobsapi/install/install.php index 5afe024..d67ec9f 100644 --- a/gobsapi/install/install.php +++ b/gobsapi/install/install.php @@ -1,33 +1,16 @@ createEntryPoint('gobsapi.php', 'gobsapi/config.ini.php', 'gobsapi', 'classic'); - } else { - // Copy directory for Jelix configuration file related to new entry point - $gobsapi_jelix_config_target = jApp::configPath('gobsapi/config.ini.php'); - $this->copyFile('gobsapi/config.ini.php', $gobsapi_jelix_config_target); - // Copy the new entry point PHP file in Lizmap www folder - // Deprecated and not safe ! - $this->copyFile('gobsapi.php', jApp::wwwPath('gobsapi.php')); - } - - // Copy configuration file for user defined options - // TODO: This file should be editable by the admin user in LWC admin panel - $gobs_config_target = jApp::configPath('gobsapi.ini.php'); - if (!file_exists($gobs_config_target)) { - $this->copyFile('config/gobsapi.ini.php.dist', $gobs_config_target); - } } } diff --git a/gobsapi/install/install_1_6.php b/gobsapi/install/install_1_6.php new file mode 100644 index 0000000..5afe024 --- /dev/null +++ b/gobsapi/install/install_1_6.php @@ -0,0 +1,33 @@ +createEntryPoint('gobsapi.php', 'gobsapi/config.ini.php', 'gobsapi', 'classic'); + } else { + // Copy directory for Jelix configuration file related to new entry point + $gobsapi_jelix_config_target = jApp::configPath('gobsapi/config.ini.php'); + $this->copyFile('gobsapi/config.ini.php', $gobsapi_jelix_config_target); + + // Copy the new entry point PHP file in Lizmap www folder + // Deprecated and not safe ! + $this->copyFile('gobsapi.php', jApp::wwwPath('gobsapi.php')); + } + + // Copy configuration file for user defined options + // TODO: This file should be editable by the admin user in LWC admin panel + $gobs_config_target = jApp::configPath('gobsapi.ini.php'); + if (!file_exists($gobs_config_target)) { + $this->copyFile('config/gobsapi.ini.php.dist', $gobs_config_target); + } + } +} diff --git a/gobsapi/module.xml b/gobsapi/module.xml index 860b0f1..b63acec 100644 --- a/gobsapi/module.xml +++ b/gobsapi/module.xml @@ -10,7 +10,9 @@ http://3liz.com - + + + diff --git a/gobsapi/www/img/lizmap_mappemonde.jpg b/gobsapi/www/img/lizmap_mappemonde.jpg new file mode 100644 index 0000000000000000000000000000000000000000..6a2661e9acd9c45d7d660fbf29d692330c28da39 GIT binary patch literal 14302 zcmbulRa9I-yDi$dL*wqj-6gndaCdii2^L&~y9a0_SO+I)hJpBT>wx;L0JI+2L}Ma{TqP4TL4)AG9nT(5+X7(5;6)3 zGAcR{9UTn~od6pL6G%)zLPAVHL_|i(KutzYPeDXP!%job$i%|RLQ2iS&B4sgz|6w@ zcL;!i3U~rM!NK7I{z3rc002A!+<*4?p9dZR0QYYbl)sw*)c;zCdos&v$p;EiE#b9D zQ4lBYll`i9(v!aV@=C@4Y(>x&NmC)6gSPZ#VN)W15Yjh1QH`&SZdeo9;}5Q?&QOl^S2+aln@LiOr8;NRAA_qDzm~) zBwUlazWi);|0mk9Gv29*npn9@n}l1wQ1xH}vK_jUz<+24QTW0N~EZs*Z0 z3$cpBSv;V(w+F7o0EPH=e{fXFSL`?YT_-K6XMpUgvZ^^w;ZrEtHQ9ofYDG+#f3cUF zC_l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mscyZlZSqFasI*~j)#04)F8^uz)jkaTf47kQ Nj)oaNqV(^^{|7qw3;X~8 literal 0 HcmV?d00001 diff --git a/tests/Makefile b/tests/Makefile index 57c0c35..4ce8f6d 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -8,7 +8,7 @@ LIZMAP_DIR=$(shell pwd)/lizmap LIZMAP_USER_ID:=$(shell id -u) LIZMAP_USER_GID:=$(shell id -g) -LIZMAP_VERSION_TAG:=3.5 +LIZMAP_VERSION_TAG:=3.7 QGIS_VERSION_TAG:=ltr-rc POSTGIS_VERSION_TAG:=11-2.5 @@ -18,7 +18,7 @@ LIZMAP_PORT:=127.0.0.1:9095 OWS_PORT:=127.0.0.1:9096 LZMPGPORT:=127.0.0.1:9097 -GOBSAPI_MODULE_SRC:=$(shell realpath ..) +MODULE_SRC:=$(shell realpath ..) main: @cat <<- EOF @@ -27,11 +27,12 @@ main: stop: stop docker and remove containers clean: reset containers and remove lizmap configuration shell: open a shell in Lizmap web container + install-module: install the module on the Lizmap test instance install-plugins: install QGIS Server plugins - import-data: import test data inside the PostgreSQL database - export-data: export test data from the PostgreSQL database + import-test-data: import test data inside the PostgreSQL database + export-test-data: export test data to tests/sql/test_data.sql - Note: Un fichier d'environment pour docker compose + Note: Un fichier d'environnement pour docker compose est crée à chaque invocation de 'run'. Cela permet d'utiliser les commandes 'docker compose' sans passer par le Makefile @@ -39,12 +40,12 @@ main: dirs: @mkdir -p $(LIZMAP_DIR)/var/log/nginx \ - $(LIZMAP_DIR)/var/nginx-cache \ - $(LIZMAP_DIR)/qgis-server-plugins \ - $(LIZMAP_DIR)/local-python \ - $(LIZMAP_DIR)/cache-python \ - $(GOBSAPI_MODULE_SRC)/tests/api_tests/.pytest_cache \ - $* + $(LIZMAP_DIR)/var/nginx-cache \ + $(LIZMAP_DIR)/qgis-server-plugins \ + $(LIZMAP_DIR)/local-python \ + $(LIZMAP_DIR)/cache-python \ + $(MODULE_SRC)/tests/api_tests/.pytest_cache \ + $* env: dirs @cat <<- EOF > .env @@ -56,7 +57,7 @@ env: dirs LIZMAP_PORT=$(LIZMAP_PORT) OWS_PORT=$(OWS_PORT) LZMPGPORT=$(LZMPGPORT) - GOBSAPI_MODULE_SRC=$(GOBSAPI_MODULE_SRC) + MODULE_SRC=$(MODULE_SRC) LIZMAP_VERSION_TAG=$(LIZMAP_VERSION_TAG) QGIS_VERSION_TAG=$(QGIS_VERSION_TAG) POSTGIS_VERSION_TAG=$(POSTGIS_VERSION_TAG) @@ -79,67 +80,84 @@ pull: docker pull 3liz/qgis-map-server:${QGIS_VERSION_TAG} docker pull 3liz/postgis:${POSTGIS_VERSION_TAG} -shell: - docker compose exec -u ${LIZMAP_USER_ID} lizmap /bin/sh -l - -shellpg: - docker compose exec -u ${LIZMAP_USER_ID} pgsql /bin/sh -l - install-plugins: dirs @echo "Install QGIS server plugins" docker run \ -u $(LIZMAP_USER_ID):$(LIZMAP_USER_GID) \ - --rm -i \ + --rm -it \ -e QGSRV_SERVER_PLUGINPATH=/srv/plugins \ -e QGIS_PLUGIN_MANAGER_SOURCES_FILE=/tmp/sources-plugin-manager.list \ -e QGIS_PLUGIN_MANAGER_CACHE_DIR=/tmp/cache-plugin-manager \ -v $(LIZMAP_DIR)/qgis-server-plugins:/srv/plugins \ -v $(shell pwd)/:/src \ - --entrypoint /bin/bash \ - 3liz/qgis-map-server:$(QGIS_VERSION_TAG) \ - -c "\ - echo "https://packages.3liz.org/pub/server-plugins-repository/unstable/plugins.[VERSION].xml" > /tmp/sources-plugin-manager.list; \ - qgis-plugin-manager update; \ - qgis-plugin-manager install 'Lizmap server'" + --entrypoint /src/add-server-plugins.sh \ + 3liz/qgis-map-server:${QGIS_VERSION_TAG} + +import-test-data: + sql/import.sh -export-data: - export PGPASSWORD=lizmap1234!; pg_dump -h localhost -U lizmap -d lizmap -p 9097 --no-acl --no-owner -Fp -f sql/test_data.sql +export-test-data: + @echo "Export demo data to tests/sql/test_data.sql" + docker compose exec -u $(LIZMAP_USER_ID) pgsql /bin/sh -c " \ + pg_dump -U postgres -d lizmap --no-owner --no-acl -n gobs -Fp + " > $(shell pwd)/sql/test_data.sql -import-data: - export PGPASSWORD=lizmap1234!; psql -h localhost -U lizmap -d lizmap -p 9097 -c 'DROP SCHEMA IF EXISTS gobs CASCADE;' - export PGPASSWORD=lizmap1234!; psql -h localhost -U lizmap -d lizmap -p 9097 -f sql/test_data.sql import-lizmap-acl: @echo "Set repositories and users rights if needed" @echo "Set view project" - docker compose exec -u $(LIZMAP_USER_ID) lizmap /bin/sh -c 'php lizmap/cmd.php acl2right add __anonymous "lizmap.repositories.view" gobsapi' - docker compose exec -u $(LIZMAP_USER_ID) lizmap /bin/sh -c 'php lizmap/cmd.php acl2right add users "lizmap.repositories.view" gobsapi' - docker compose exec -u $(LIZMAP_USER_ID) lizmap /bin/sh -c 'php lizmap/cmd.php acl2right add admins "lizmap.repositories.view" gobsapi' + docker compose exec -u $(LIZMAP_USER_ID) lizmap /bin/sh -c ' \ + php lizmap/console.php acl2:add __anonymous "lizmap.repositories.view" tests ; \ + php lizmap/console.php acl2:add users "lizmap.repositories.view" tests ; \ + php lizmap/console.php acl2:add admins "lizmap.repositories.view" tests' @echo "Display WMS links" - docker compose exec -u $(LIZMAP_USER_ID) lizmap /bin/sh -c 'php lizmap/cmd.php acl2right add __anonymous "lizmap.tools.displayGetCapabilitiesLinks" gobsapi' - docker compose exec -u $(LIZMAP_USER_ID) lizmap /bin/sh -c 'php lizmap/cmd.php acl2right add users "lizmap.tools.displayGetCapabilitiesLinks" gobsapi' - docker compose exec -u $(LIZMAP_USER_ID) lizmap /bin/sh -c 'php lizmap/cmd.php acl2right add admins "lizmap.tools.displayGetCapabilitiesLinks" gobsapi' + docker compose exec -u $(LIZMAP_USER_ID) lizmap /bin/sh -c ' \ + php lizmap/console.php acl2:add __anonymous "lizmap.tools.displayGetCapabilitiesLinks" tests ; \ + php lizmap/console.php acl2:add users "lizmap.tools.displayGetCapabilitiesLinks" tests ; \ + php lizmap/console.php acl2:add admins "lizmap.tools.displayGetCapabilitiesLinks" tests' @echo "Edition" - docker compose exec -u $(LIZMAP_USER_ID) lizmap /bin/sh -c 'php lizmap/cmd.php acl2right add __anonymous "lizmap.tools.edition.use" gobsapi' - docker compose exec -u $(LIZMAP_USER_ID) lizmap /bin/sh -c 'php lizmap/cmd.php acl2right add users "lizmap.tools.edition.use" gobsapi' - docker compose exec -u $(LIZMAP_USER_ID) lizmap /bin/sh -c 'php lizmap/cmd.php acl2right add admins "lizmap.tools.edition.use" gobsapi' + docker compose exec -u $(LIZMAP_USER_ID) lizmap /bin/sh -c ' \ + php lizmap/console.php acl2:add __anonymous "lizmap.tools.edition.use" tests ; \ + php lizmap/console.php acl2:add users "lizmap.tools.edition.use" tests ; \ + php lizmap/console.php acl2:add admins "lizmap.tools.edition.use" tests' @echo "Export layers" - docker compose exec -u $(LIZMAP_USER_ID) lizmap /bin/sh -c 'php lizmap/cmd.php acl2right add __anonymous "lizmap.tools.layer.export" gobsapi' - docker compose exec -u $(LIZMAP_USER_ID) lizmap /bin/sh -c 'php lizmap/cmd.php acl2right add users "lizmap.tools.layer.export" gobsapi' - docker compose exec -u $(LIZMAP_USER_ID) lizmap /bin/sh -c 'php lizmap/cmd.php acl2right add admins "lizmap.tools.layer.export" gobsapi' + docker compose exec -u $(LIZMAP_USER_ID) lizmap /bin/sh -c ' \ + php lizmap/console.php acl2:add __anonymous "lizmap.tools.layer.export" tests ; \ + php lizmap/console.php acl2:add users "lizmap.tools.layer.export" tests ; \ + php lizmap/console.php acl2:add admins "lizmap.tools.layer.export" tests' @echo "Add GobsAPI users" docker compose exec -u $(LIZMAP_USER_ID) lizmap /bin/sh -c 'php lizmap/scripts/script.php jcommunity~user:create -v --no-error-if-exists --admin gobsapi_writer al@al.al al_password' docker compose exec -u $(LIZMAP_USER_ID) lizmap /bin/sh -c 'php lizmap/scripts/script.php jcommunity~user:create -v --no-error-if-exists gobsapi_reader bob@bob.bob bob_password' docker compose exec -u $(LIZMAP_USER_ID) lizmap /bin/sh -c 'php lizmap/scripts/script.php jcommunity~user:create -v --no-error-if-exists gobsapi_writer_filtered md@md.md md_password' @echo "Add GobsAPI groups" - docker compose exec -u $(LIZMAP_USER_ID) lizmap /bin/sh -c 'php lizmap/cmd.php acl2group create gobsapi_group "GobsAPI group"' - docker compose exec -u $(LIZMAP_USER_ID) lizmap /bin/sh -c 'php lizmap/cmd.php acl2group create gobsapi_global_group "GobsAPI global group"' - docker compose exec -u $(LIZMAP_USER_ID) lizmap /bin/sh -c 'php lizmap/cmd.php acl2group create gobsapi_filtered_group "GobsAPI filtered group"' + docker compose exec -u $(LIZMAP_USER_ID) lizmap /bin/sh -c 'php lizmap/console.php acl2group:create gobsapi_group "GobsAPI group"' + docker compose exec -u $(LIZMAP_USER_ID) lizmap /bin/sh -c 'php lizmap/console.php acl2group:create gobsapi_global_group "GobsAPI global group"' + docker compose exec -u $(LIZMAP_USER_ID) lizmap /bin/sh -c 'php lizmap/console.php acl2group:create gobsapi_filtered_group "GobsAPI filtered group"' @echo "Put users in their groups" - docker compose exec -u $(LIZMAP_USER_ID) lizmap /bin/sh -c 'php lizmap/cmd.php acl2group adduser gobsapi_group gobsapi_writer' - docker compose exec -u $(LIZMAP_USER_ID) lizmap /bin/sh -c 'php lizmap/cmd.php acl2group adduser gobsapi_group gobsapi_reader' - docker compose exec -u $(LIZMAP_USER_ID) lizmap /bin/sh -c 'php lizmap/cmd.php acl2group adduser gobsapi_group gobsapi_writer_filtered' - docker compose exec -u $(LIZMAP_USER_ID) lizmap /bin/sh -c 'php lizmap/cmd.php acl2group adduser gobsapi_global_group gobsapi_writer' - docker compose exec -u $(LIZMAP_USER_ID) lizmap /bin/sh -c 'php lizmap/cmd.php acl2group adduser gobsapi_global_group gobsapi_reader' - docker compose exec -u $(LIZMAP_USER_ID) lizmap /bin/sh -c 'php lizmap/cmd.php acl2group adduser gobsapi_filtered_group gobsapi_writer_filtered' - docker compose exec -u $(LIZMAP_USER_ID) lizmap /bin/sh -c 'php lizmap/cmd.php acl2right add gobsapi_group "lizmap.repositories.view" "gobsapi"' + docker compose exec -u $(LIZMAP_USER_ID) lizmap /bin/sh -c 'php lizmap/console.php acl2user:addgroup gobsapi_writer gobsapi_group' + docker compose exec -u $(LIZMAP_USER_ID) lizmap /bin/sh -c 'php lizmap/console.php acl2user:addgroup gobsapi_reader gobsapi_group' + docker compose exec -u $(LIZMAP_USER_ID) lizmap /bin/sh -c 'php lizmap/console.php acl2user:addgroup gobsapi_writer_filtered gobsapi_group' + docker compose exec -u $(LIZMAP_USER_ID) lizmap /bin/sh -c 'php lizmap/console.php acl2user:addgroup gobsapi_writer gobsapi_global_group' + docker compose exec -u $(LIZMAP_USER_ID) lizmap /bin/sh -c 'php lizmap/console.php acl2user:addgroup gobsapi_reader gobsapi_global_group' + docker compose exec -u $(LIZMAP_USER_ID) lizmap /bin/sh -c 'php lizmap/console.php acl2user:addgroup gobsapi_writer_filtered gobsapi_filtered_group' + @echo "Set rights for groups" + docker compose exec -u $(LIZMAP_USER_ID) lizmap /bin/sh -c 'php lizmap/console.php acl2:add gobsapi_group "lizmap.repositories.view" tests' + + +install-module: + # @echo "Install SAML modules" + # docker compose exec -u ${LIZMAP_USER_ID} touch /www/lizmap/my-packages/composer.json + # docker compose exec -u ${LIZMAP_USER_ID} lizmap composer --working-dir=/www/lizmap/my-packages require jelix/saml-module:2.1.* + # docker compose exec -u ${LIZMAP_USER_ID} lizmap php /www/lizmap/install/configurator.php --no-interaction --force saml + # docker compose exec -u ${LIZMAP_USER_ID} lizmap php /www/lizmap/install/configurator.php --no-interaction --force samladmin + # docker compose exec -u ${LIZMAP_USER_ID} lizmap php /www/lizmap/install/installer.php -v + + @echo "Install GobsApi module" + docker compose exec -u ${LIZMAP_USER_ID} lizmap php /www/lizmap/install/configurator.php --no-interaction --force gobsapi + docker compose exec -u ${LIZMAP_USER_ID} lizmap php /www/lizmap/install/installer.php -v + +shell: + docker compose exec -u ${LIZMAP_USER_ID} lizmap /bin/sh -l + +postgres: + docker compose exec -u postgres pgsql psql lizmap diff --git a/tests/README.md b/tests/README.md index a6fe42a..b6f4062 100644 --- a/tests/README.md +++ b/tests/README.md @@ -1,83 +1,59 @@ -# Run Lizmap stack with docker compose +## Run Lizmap stack with docker compose Steps: -- Launch Lizmap with docker compose +* Launch Lizmap with docker compose ```bash # Clean previous versions (optional) make clean +# Pull docker images +make pull # Run the different services make run -make import-data -make import-lizmap-acl ``` - - Open your browser at http://localhost:9095 For more information, refer to the [docker compose documentation](https://docs.docker.com/compose/) -## Access to the dockerized PostgreSQL instance -You can access the docker PostgreSQL test database `lizmap` from your host by configuring a -[service file](https://docs.qgis.org/latest/en/docs/user_manual/managing_data_source/opening_data.html#postgresql-service-connection-file). -The service file can be stored in your user home `~/.pg_service.conf` and should contain this section +## Add the test data -```ini -[lizmap-gobsapi] -dbname=lizmap -host=localhost -port=9097 -user=lizmap -password=lizmap1234! +You can add some data in your docker test PostgreSQL database by running the SQL `tests/sql/test_data.sql`. + +```bash +make import-test-data ``` -Then you can use any PostgreSQL client (psql, QGIS, PgAdmin, DBeaver) and use the `service` -instead of the other credentials (host, port, database name, user and password). +If you have modified your test data suite (for example after upgrading to a new version) +please run : ```bash -psql service=lizmap-gobsapi +make export-test-data ``` -## Access to the lizmap container +Then add the modified file `tests/sql/test_data.sql` to your pull request. -If you want to enter into the lizmap container to execute some commands, -execute `make shell`. - -## Add the test data -### PostgreSQL gobs data +## Install the module -You can add some data in your docker test PostgreSQL database by running the SQL `tests/sql/test_data.sql`. +* Install the module with: ```bash -make import-data +make install-module ``` -or -```bash -psql service=lizmap-gobsapi -f tests/sql/test_data.sql -``` - -If you have modified your test data suite (for example after upgrading to a new version) -please run : - -```bash -make export-data -`` -and add the modified file `tests/sql/test_data.sql` to your pull request. +* Add the needed Lizmap rights: -### Lizmap Web Client groups, users and rights - -Before running manual or automatic tests, you also need to add some Lizmap groups, users and rights ```bash make import-lizmap-acl ``` -Create group: + +Created groups: * `gobsapi_group`, label `GobsAPI group` * `gobsapi_global_group`, label `GobsAPI global group` * `gobsapi_filtered_group`, label `GobsAPI filtered group` @@ -102,41 +78,36 @@ Created users (all inside `gobsapi` group): * it belongs to the groups `gobsapi_group` & `gobsapi_filtered_group` * it has read & write access but can only view & edit data filtered inside by the project view geometry -They can both access the [Lizmap test map](http://localhost:9095/index.php/view/map/?repository=gobsapi&project=gobsapi). - -## API tests +They can both access the [Lizmap test map](http://localhost:9095/index.php/view/map/?repository=tests&project=gobsapi). -### Fully inside docker +## Access to the dockerized PostgreSQL instance -When the docker compose stack is running +You can access the docker PostgreSQL test database `lizmap` from your host by configuring a +[service file](https://docs.qgis.org/latest/en/docs/user_manual/managing_data_source/opening_data.html#postgresql-service-connection-file). +The service file can be stored in your user home `~/.pg_service.conf` and should contain this section -```bash -docker compose run --rm pytest +```ini +[lizmap-gobsapi] +dbname=lizmap +host=localhost +port=9097 +user=lizmap +password=lizmap1234! ``` -### Local pytest - -But against the docker compose project - -You can use `pytest` to run the available unit tests: +Then you can use any PostgreSQL client (psql, QGIS, PgAdmin, DBeaver) and use the `service` +instead of the other credentials (host, port, database name, user and password). ```bash -# Go the the Python test directory -cd tests/api_tests/ +psql service=lizmap-gobsapi +``` -# create & activate virtual env -python3 -m venv .venv -source .venv/bin/activate +## Access to the lizmap container -# install requirements -pip3 install -r requirements/tests.txt +If you want to enter into the lizmap container to execute some commands, +execute `make shell`. -# Run tests -pytest -# Run only tests corresponding to a wildcard -pytest -v -k _with_spatial_layer +## API tests -# Deactivate env -deactivate -``` +You can run API tests by following this guide: [API Tests](api_tests.md) diff --git a/tests/add-server-plugins.sh b/tests/add-server-plugins.sh new file mode 100755 index 0000000..6c7b940 --- /dev/null +++ b/tests/add-server-plugins.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +qgis-plugin-manager init +qgis-plugin-manager update +qgis-plugin-manager install "Lizmap server" diff --git a/tests/api_tests.md b/tests/api_tests.md new file mode 100644 index 0000000..92f217d --- /dev/null +++ b/tests/api_tests.md @@ -0,0 +1,36 @@ +## API Tests + +### Fully inside docker + +When the docker compose stack is running + +```bash +docker compose run --rm pytest +``` + +### Local pytest + +But against the docker compose project + +You can use `pytest` to run the available unit tests: + +```bash +# Go the the Python test directory +cd tests/api_tests/ + +# create & activate virtual env +python3 -m venv .venv +source .venv/bin/activate + +# install requirements +pip3 install -r requirements/tests.txt + +# Run tests +pytest + +# Run only tests corresponding to a wildcard +pytest -v -k _with_spatial_layer + +# Deactivate env +deactivate +``` diff --git a/tests/api_tests/data/input_observation_create_outside_allowed_polygon.json b/tests/api_tests/data/input_observation_create_outside_allowed_polygon.json new file mode 100644 index 0000000..bfea912 --- /dev/null +++ b/tests/api_tests/data/input_observation_create_outside_allowed_polygon.json @@ -0,0 +1,18 @@ +{ + "id": null, + "indicator": "hiker_position", + "uuid": null, + "start_timestamp": "2022-07-22 03:30:00", + "end_timestamp": null, + "coordinates": { + "x": -3.9036, + "y": 48.3988 + }, + "wkt": "POINT(-3.9036 48.3988)", + "values": [ + 40 + ], + "media_url": null, + "created_at": null, + "updated_at": null +} diff --git a/tests/api_tests/data/input_observation_create_outside_project.json b/tests/api_tests/data/input_observation_create_outside_project.json new file mode 100644 index 0000000..140fd68 --- /dev/null +++ b/tests/api_tests/data/input_observation_create_outside_project.json @@ -0,0 +1,19 @@ +{ + "id": null, + "indicator": "hiker_position", + "uuid": null, + "start_timestamp": "2022-07-22 03:30:00", + "end_timestamp": null, + "coordinates": { + "x": -3.785, + "y": 48.15 + }, + "wkt": "POINT(-3.785 48.15)", + "values": [ + 40 + ], + "media_url": null, + "created_at": null, + "updated_at": null +} + \ No newline at end of file diff --git a/tests/docker-compose.yml b/tests/docker-compose.yml index 00bd324..96ab2f2 100644 --- a/tests/docker-compose.yml +++ b/tests/docker-compose.yml @@ -1,4 +1,3 @@ -version: '3' services: pgsql: image: 3liz/postgis:${POSTGIS_VERSION_TAG} @@ -30,10 +29,11 @@ services: - ${LIZMAP_DIR}/var/lizmap-log:/www/lizmap/var/log - ${LIZMAP_DIR}/var/lizmap-temp:/www/temp/lizmap/ - ${LIZMAP_DIR}/etc:/srv/etc:ro - - ${GOBSAPI_MODULE_SRC}/gobsapi:/www/lizmap/lizmap-modules/gobsapi + - ${MODULE_SRC}/gobsapi:/www/lizmap/lizmap-modules/gobsapi + - ${LIZMAP_DIR}/var/nginx-cache:/var/cache/nginx + - ${LIZMAP_DIR}/etc/additional-config.ini:/etc/php7/conf.d/additional-config.ini command: - php-fpm - restart: unless-stopped depends_on: - pgsql map: @@ -88,13 +88,13 @@ services: PIP_CACHE_DIR: "/.cache" volumes: # Python test folder - - ${GOBSAPI_MODULE_SRC}/tests/api_tests/:/usr/src/gobsapi/tests/api_tests + - ${MODULE_SRC}/tests/api_tests/:/usr/src/gobsapi/tests/api_tests # Module folder - - ${GOBSAPI_MODULE_SRC}/gobsapi:/usr/src/gobsapi/gobsapi + - ${MODULE_SRC}/gobsapi:/usr/src/gobsapi/gobsapi # Cache - ${LIZMAP_DIR}/local-python:/.local - ${LIZMAP_DIR}/cache-python:/.cache - - ${GOBSAPI_MODULE_SRC}/tests/api_tests/.pytest_cache:/usr/src/gobsapi/tests/api_tests/.pytest_cache + - ${MODULE_SRC}/tests/api_tests/.pytest_cache:/usr/src/gobsapi/tests/api_tests/.pytest_cache depends_on: - pgsql volumes: diff --git a/tests/lizmap/etc/additional-config.ini b/tests/lizmap/etc/additional-config.ini new file mode 100644 index 0000000..a90f6ca --- /dev/null +++ b/tests/lizmap/etc/additional-config.ini @@ -0,0 +1 @@ +max_execution_time = 120 diff --git a/tests/lizmap/etc/conf/lizmapconfig.d/lizmapConfig.ini.php b/tests/lizmap/etc/conf/lizmapconfig.d/lizmapConfig.ini.php index cdc5c0b..d201ec3 100644 --- a/tests/lizmap/etc/conf/lizmapconfig.d/lizmapConfig.ini.php +++ b/tests/lizmap/etc/conf/lizmapconfig.d/lizmapConfig.ini.php @@ -1,8 +1,8 @@ -// Lizmap url configuration [services] lizmapPluginAPIURL="http://map:8080/lizmap/" +appName="Lizmap GobsApi tests" -[repository:gobsapi] -label=gobsapi -path="/srv/projects/gobsapi/" +[repository:tests] +label=tests +path="/srv/projects/tests" allowUserDefinedThemes=1 diff --git a/tests/lizmap/etc/conf/localconfig.d/localconfig.ini.php b/tests/lizmap/etc/conf/localconfig.d/localconfig.ini.php index a84c094..774ce99 100644 --- a/tests/lizmap/etc/conf/localconfig.d/localconfig.ini.php +++ b/tests/lizmap/etc/conf/localconfig.d/localconfig.ini.php @@ -1,2 +1,10 @@ [modules] gobsapi.access=2 + +[jResponseHtml] +plugins = debugbar + +[mailer] +webmasterEmail="hosting-no-reply@lizmap.com" +webmasterName="Lizmap Docker" +mailerType=file diff --git a/tests/lizmap/etc/conf/profiles.d/profile.ini.php b/tests/lizmap/etc/conf/profiles.d/profile.ini.php index 930c689..3a85be0 100644 --- a/tests/lizmap/etc/conf/profiles.d/profile.ini.php +++ b/tests/lizmap/etc/conf/profiles.d/profile.ini.php @@ -1,5 +1,19 @@ -[jdb:gobsapi] +[jdb] + +default=jauth +jacl2_profile=jauth +lizlog=jauth + +[jdb:jauth] +driver=pgsql +host=pgsql +port=5432 +database=lizmap +user=lizmap +password="lizmap1234!" +search_path=public +[jdb:gobsapi] driver=pgsql host=pgsql port=5432 diff --git a/tests/lizmap/etc/mailconfig.ini b/tests/lizmap/etc/mailconfig.ini deleted file mode 100644 index 07349c7..0000000 --- a/tests/lizmap/etc/mailconfig.ini +++ /dev/null @@ -1,14 +0,0 @@ - -[mailer] -webmasterEmail="hosting-no-reply@lizmap.com" -webmasterName="Lizmap Docker" -mailerType=smtp -smtpHost=smtp.host.net -smtpPort=25 -smtpSecure=tls -smtpHelo= -smtpAuth=on -smtpUsername="hosting-no-reply@lizmap.com" -smtpPassword=mysecretpassword -smtpTimeout=10 - diff --git a/tests/lizmap/etc/nginx.conf b/tests/lizmap/etc/nginx.conf index 4f3f170..a241f45 100644 --- a/tests/lizmap/etc/nginx.conf +++ b/tests/lizmap/etc/nginx.conf @@ -44,8 +44,12 @@ http { # and found a index.php file here location ~* /(\w+/)?\w+\.php { - fastcgi_split_path_info ^(.+\.php)(/.+)$; + fastcgi_split_path_info ^(.+\.php)(/.*)$; set $path_info $fastcgi_path_info; # because of bug http://trac.nginx.org/nginx/ticket/321 + # Adapt the configuration to allow to upload big files + # https://docs.nextcloud.com/server/12/admin_manual/configuration_files/big_file_upload_configuration.html + client_max_body_size 0; + client_body_temp_path /var/cache/nginx 1 2; try_files $fastcgi_script_name =404; include fastcgi_params; diff --git a/tests/lizmap/etc/pg_service.conf b/tests/lizmap/etc/pg_service.conf index 7c82db6..035154c 100644 --- a/tests/lizmap/etc/pg_service.conf +++ b/tests/lizmap/etc/pg_service.conf @@ -1,17 +1,3 @@ -# -# Connection configuration file -# -# A service is a set of named connection parameters. You may specify -# multiple services in this file. Each starts with a service name in -# brackets. Subsequent lines have connection configuration parameters of -# the pattern "param=value" or LDAP URLs starting with "ldap://" -# to look up such parameters. A sample configuration for postgres is -# included in this file. Lines beginning with '#' are comments. -# -# Copy this to /etc/postgresql-common/ (or select its location with the -# PGSYSCONFDIR environment variable) and rename it pg_service.conf. -# - [lizmap-gobsapi] dbname=lizmap host=pgsql diff --git a/tests/lizmap/initdb.d/init.sh b/tests/lizmap/initdb.d/init.sh index 4599b75..6a5f41e 100644 --- a/tests/lizmap/initdb.d/init.sh +++ b/tests/lizmap/initdb.d/init.sh @@ -1,11 +1,22 @@ #!/bin/bash +# Create user lizmap which will create and own the database & schema psql --username postgres --no-password <<-EOSQL CREATE ROLE lizmap WITH LOGIN CREATEDB PASSWORD 'lizmap1234!'; CREATE DATABASE lizmap WITH OWNER lizmap; EOSQL +# Create extensions postgis & uuid-ossp psql --username postgres --no-password -d lizmap <<-EOSQL CREATE EXTENSION IF NOT EXISTS postgis SCHEMA public; CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; EOSQL + +# Create another test user and group which must be able to read & write +# data inside the pgrouting schema +psql --username postgres --no-password <<-EOSQL + CREATE ROLE "gis_user" WITH LOGIN CREATEDB PASSWORD 'lizmap1234!'; + CREATE ROLE "gis_group"; + GRANT "gis_group" TO "gis_user"; + GRANT CONNECT ON DATABASE "lizmap" TO "gis_user"; +EOSQL diff --git a/tests/lizmap/instances/tests/gobs_administration.qgs b/tests/lizmap/instances/tests/gobs_administration.qgs new file mode 100644 index 0000000..f3e7cf4 --- /dev/null +++ b/tests/lizmap/instances/tests/gobs_administration.qgs @@ -0,0 +1,8580 @@ + + + + + + + + PROJCRS["WGS 84 / Pseudo-Mercator",BASEGEOGCRS["WGS 84",ENSEMBLE["World Geodetic System 1984 ensemble",MEMBER["World Geodetic System 1984 (Transit)"],MEMBER["World Geodetic System 1984 (G730)"],MEMBER["World Geodetic System 1984 (G873)"],MEMBER["World Geodetic System 1984 (G1150)"],MEMBER["World Geodetic System 1984 (G1674)"],MEMBER["World Geodetic System 1984 (G1762)"],MEMBER["World Geodetic System 1984 (G2139)"],ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[2.0]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],ID["EPSG",4326]],CONVERSION["Popular Visualisation Pseudo-Mercator",METHOD["Popular Visualisation Pseudo Mercator",ID["EPSG",1024]],PARAMETER["Latitude of natural origin",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8801]],PARAMETER["Longitude of natural origin",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8802]],PARAMETER["False easting",0,LENGTHUNIT["metre",1],ID["EPSG",8806]],PARAMETER["False northing",0,LENGTHUNIT["metre",1],ID["EPSG",8807]]],CS[Cartesian,2],AXIS["easting (X)",east,ORDER[1],LENGTHUNIT["metre",1]],AXIS["northing (Y)",north,ORDER[2],LENGTHUNIT["metre",1]],USAGE[SCOPE["Web mapping and visualisation."],AREA["World between 85.06°S and 85.06°N."],BBOX[-85.06,-180,85.06,180]],ID["EPSG",3857]] + +proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +wktext +no_defs + 3857 + 3857 + EPSG:3857 + WGS 84 / Pseudo-Mercator + merc + EPSG:7030 + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + osm_mapnik_73cc9876_fa44_4742_bc09_afe572b57bbe + project_view_c10ae5f5_e011_4223_a08c_903108ad41d2 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + meters + + -12790955.31919470615684986 + -10041799.32541200332343578 + 15012367.76015940494835377 + 18148278.7754305973649025 + + 0 + + + PROJCRS["WGS 84 / Pseudo-Mercator",BASEGEOGCRS["WGS 84",ENSEMBLE["World Geodetic System 1984 ensemble",MEMBER["World Geodetic System 1984 (Transit)"],MEMBER["World Geodetic System 1984 (G730)"],MEMBER["World Geodetic System 1984 (G873)"],MEMBER["World Geodetic System 1984 (G1150)"],MEMBER["World Geodetic System 1984 (G1674)"],MEMBER["World Geodetic System 1984 (G1762)"],MEMBER["World Geodetic System 1984 (G2139)"],ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[2.0]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],ID["EPSG",4326]],CONVERSION["Popular Visualisation Pseudo-Mercator",METHOD["Popular Visualisation Pseudo Mercator",ID["EPSG",1024]],PARAMETER["Latitude of natural origin",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8801]],PARAMETER["Longitude of natural origin",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8802]],PARAMETER["False easting",0,LENGTHUNIT["metre",1],ID["EPSG",8806]],PARAMETER["False northing",0,LENGTHUNIT["metre",1],ID["EPSG",8807]]],CS[Cartesian,2],AXIS["easting (X)",east,ORDER[1],LENGTHUNIT["metre",1]],AXIS["northing (Y)",north,ORDER[2],LENGTHUNIT["metre",1]],USAGE[SCOPE["Web mapping and visualisation."],AREA["World between 85.06°S and 85.06°N."],BBOX[-85.06,-180,85.06,180]],ID["EPSG",3857]] + +proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +wktext +no_defs + 3857 + 3857 + EPSG:3857 + WGS 84 / Pseudo-Mercator + merc + EPSG:7030 + false + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Annotations_239d7cb0_01a6_4a7a_9e12_6651dbd7ecd7 + + + + + + + + + + 0 + 0 + + + + + false + + + + + + + + + + + + + + + + + 0 + 0 + + + + + false + + + + + + 1 + 0 + + + + + actor_5f01a6e5_8205_462f_af40_0ffd7ff0a44f + service='lizmap-gobsapi' key='id' estimatedmetadata=true checkPrimaryKeyUnicity='0' table="gobs"."actor" + + + + actor + + + + + 0 + 0 + + + + + false + + + + + + + dataset + + Actors + + + + + + + + + + + + + + + + + 0 + 0 + + + + + true + + + + + + + + + + + + + postgres + + + + + + + + + + + 1 + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + """ +Les formulaires QGIS peuvent avoir une fonction Python qui sera appelée à l'ouverture du formulaire. + +Utilisez cette fonction pour ajouter plus de fonctionnalités à vos formulaires. + +Entrez le nom de la fonction dans le champ "Fonction d'initialisation Python". +Voici un exemple à suivre: +""" +from qgis.PyQt.QtWidgets import QWidget + +def my_form_open(dialog, layer, feature): + geom = feature.geometry() + control = dialog.findChild(QWidget, "MyLineEdit") + + 0 + tablayout + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + a_label + + + + actor_category_8a7edcf8_cb34_4689_b22b_7a8a6a2ab610 + service='lizmap-gobsapi' key='id' estimatedmetadata=true checkPrimaryKeyUnicity='0' table="gobs"."actor_category" + + + + actor_category + + + + + 0 + 0 + + + + + true + + + + + + + dataset + + Actors categories + + + + + + + + + + + + + + + + + 0 + 0 + + + + + true + + + + + + + + + + + + + postgres + + + + + + + + + + + 1 + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + """ +Les formulaires QGIS peuvent avoir une fonction Python qui sera appelée à l'ouverture du formulaire. + +Utilisez cette fonction pour ajouter plus de fonctionnalités à vos formulaires. + +Entrez le nom de la fonction dans le champ "Fonction d'initialisation Python". +Voici un exemple à suivre: +""" +from qgis.PyQt.QtWidgets import QWidget + +def my_form_open(dialog, layer, feature): + geom = feature.geometry() + control = dialog.findChild(QWidget, "MyLineEdit") + + 0 + generatedlayout + + + + + + + + + + + + + + + + + + + + "ac_label" + + + + application_a455f2b7_b92d_413b_bb50_b9777b274f84 + service='lizmap-gobsapi' key='id' estimatedmetadata=true checkPrimaryKeyUnicity='1' table="gobs"."application" + + + + application + + + + + 0 + 0 + + + + + false + + + + + + + dataset + + List the external applications interacting with G-Obs database with the web API. +This will help storing application specific data such as the default values when creating automatically series, protocols, users, etc. + + + + + + + + + + + + + + + + + 0 + 0 + + + + + false + + + + + + + + + + + + + postgres + + + + + + + + + + + 1 + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + # -*- coding: utf-8 -*- +""" +Les formulaires QGIS peuvent avoir une fonction Python qui sera appelée à l'ouverture du formulaire. + +Utilisez cette fonction pour ajouter plus de fonctionnalités à vos formulaires. + +Entrez le nom de la fonction dans le champ "Fonction d'initialisation Python". +Voici un exemple à suivre: +""" +from qgis.PyQt.QtWidgets import QWidget + +def my_form_open(dialog, layer, feature): + geom = feature.geometry() + control = dialog.findChild(QWidget, "MyLineEdit") + + + 0 + generatedlayout + + + + + + + + + + + + + + + + + + + + + + + + "ap_description" + + + + dimension_962da0f3_0cfc_479f_b23f_bbc23496c9ee + service='lizmap-gobsapi' key='id' estimatedmetadata=true checkPrimaryKeyUnicity='1' table="gobs"."dimension" + + + + indicator dimensions + + + + + 0 + 0 + + + + + false + + + + + + + dataset + + Stores the different dimensions characteristics of an indicator + + + + + + + + + + + + + + + + + 0 + 0 + + + + + false + + + + + + + + + + + + + postgres + + + + + + + + + + + 1 + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + # -*- coding: utf-8 -*- +""" +Les formulaires QGIS peuvent avoir une fonction Python qui est appelée lorsque le formulaire est +ouvert. + +Utilisez cette fonction pour ajouter une logique supplémentaire à vos formulaires. + +Entrez le nom de la fonction dans le champ +"Fonction d'initialisation Python". +Voici un exemple: +""" +from qgis.PyQt.QtWidgets import QWidget + +def my_form_open(dialog, layer, feature): + geom = feature.geometry() + control = dialog.findChild(QWidget, "MyLineEdit") + + 0 + generatedlayout + + + + + + + + + + + + + + + + + + + + + + + + + + + "di_label" + + + + document_3f322924_735f_4bef_b903_9521d2f25444 + service='lizmap-gobsapi' key='id' estimatedmetadata=true checkPrimaryKeyUnicity='1' table="gobs"."document" + + + + document + + + + + 0 + 0 + + + + + true + + + + + + + dataset + + List of documents for describing indicators. + + + + + + + + + + + + + + + + + 0 + 0 + + + + + true + + + + + + + + + + + + + postgres + + + + + + + + + + + 1 + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + # -*- coding: utf-8 -*- +""" +Les formulaires QGIS peuvent avoir une fonction Python qui sera appelée à l'ouverture du formulaire. + +Utilisez cette fonction pour ajouter plus de fonctionnalités à vos formulaires. + +Entrez le nom de la fonction dans le champ "Fonction d'initialisation Python". +Voici un exemple à suivre: +""" +from qgis.PyQt.QtWidgets import QWidget + +def my_form_open(dialog, layer, feature): + geom = feature.geometry() + control = dialog.findChild(QWidget, "MyLineEdit") + + + 0 + generatedlayout + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + "do_description" + + + + glossary_cee356e0_5be5_4d87_ac2b_e8e8967c4032 + service='lizmap-gobsapi' key='id' estimatedmetadata=true checkPrimaryKeyUnicity='0' table="gobs"."glossary" + + + + glossary + + + + + 0 + 0 + + + + + true + + + + + + + dataset + + List of labels and words used as labels for stored data + + + + + + + + + + + + + + + + + 0 + 0 + + + + + true + + + + + + + + + + + + + postgres + + + + + + + + + + + 1 + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + """ +Les formulaires QGIS peuvent avoir une fonction Python qui sera appelée à l'ouverture du formulaire. + +Utilisez cette fonction pour ajouter plus de fonctionnalités à vos formulaires. + +Entrez le nom de la fonction dans le champ "Fonction d'initialisation Python". +Voici un exemple à suivre: +""" +from qgis.PyQt.QtWidgets import QWidget + +def my_form_open(dialog, layer, feature): + geom = feature.geometry() + control = dialog.findChild(QWidget, "MyLineEdit") + + + 0 + generatedlayout + + + + + + + + + + + + + + + + + + + + id + + + + graph_node_2cd9eee8_46e2_401c_87f7_8b40d9d6260e + service='lizmap-gobsapi' key='id' estimatedmetadata=true checkPrimaryKeyUnicity='0' table="gobs"."graph_node" + + + + graph_node + + + + + 0 + 0 + + + + + true + + + + + + + dataset + + Graph nodes, to store key words used to find an indicator. + + + + + + + + + + + + + + + + + 0 + 0 + + + + + true + + + + + + + + + + + + + postgres + + + + + + + + + + + 1 + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + """ +Les formulaires QGIS peuvent avoir une fonction Python qui sera appelée à l'ouverture du formulaire. + +Utilisez cette fonction pour ajouter plus de fonctionnalités à vos formulaires. + +Entrez le nom de la fonction dans le champ "Fonction d'initialisation Python". +Voici un exemple à suivre: +""" +from qgis.PyQt.QtWidgets import QWidget + +def my_form_open(dialog, layer, feature): + geom = feature.geometry() + control = dialog.findChild(QWidget, "MyLineEdit") + + + 0 + generatedlayout + + + + + + + + + + + + + + + + + + gn_label + + + + import_0343eb12_592e_4fd0_8380_51f4d62b6a56 + service='lizmap-gobsapi' key='id' estimatedmetadata=true checkPrimaryKeyUnicity='0' table="gobs"."import" + + + + import + + + + + 0 + 0 + + + + + true + + + + + + + dataset + + Journal des imports + + + + + + + + + + + + + + + + + 0 + 0 + + + + + true + + + + + + + + + + + + + postgres + + + + + + + + + + + 1 + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + # -*- coding: utf-8 -*- +""" +Les formulaires QGIS peuvent avoir une fonction Python qui sera appelée à l'ouverture du formulaire. + +Utilisez cette fonction pour ajouter plus de fonctionnalités à vos formulaires. + +Entrez le nom de la fonction dans le champ "Fonction d'initialisation Python". +Voici un exemple à suivre: +""" +from qgis.PyQt.QtWidgets import QWidget + +def my_form_open(dialog, layer, feature): + geom = feature.geometry() + control = dialog.findChild(QWidget, "MyLineEdit") + + + 0 + generatedlayout + + + + + + + + + + + + + + + + + + + + + + "id" + + + + indicator_18ba18bf_0390_45a3_8edd_1cc049e8a251 + service='lizmap-gobsapi' key='id' estimatedmetadata=true checkPrimaryKeyUnicity='0' table="gobs"."indicator" + + + + indicators + + + + + 0 + 0 + + + + + true + + + + + + + dataset + + Groups of observation data for decisional purpose. + + + + + + + + + + + + + + + + + 0 + 0 + + + + + true + + + + + + + + + + + + + postgres + + + + + + + + + + + 1 + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + """ +QGIS forms can have a Python function that is called when the form is +opened. + +Use this function to add extra logic to your forms. + +Enter the name of the function in the "Python Init function" +field. +An example follows: +""" +from qgis.PyQt.QtWidgets import QWidget + +def my_form_open(dialog, layer, feature): + geom = feature.geometry() + control = dialog.findChild(QWidget, "MyLineEdit") + + 0 + tablayout + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id_label + + + + layername_1b984aea_510b_4f33_b961_7b83868d7ee3 + service='lizmap-gobsapi' key='id' estimatedmetadata=true checkPrimaryKeyUnicity='1' table="( SELECT s.id, id_label AS indicator, id_paths AS indicator_paths, a_label AS actor_source, sl_label AS spatial_layer, pr_label AS protocol, count(o.id) AS nb_observation, min(o.ob_start_timestamp) AS min_date, max(Coalesce(o.ob_start_timestamp, o.ob_end_timestamp)) AS max_date FROM gobs.series s INNER JOIN gobs.observation o ON o.fk_id_series = s.id INNER JOIN gobs.actor a ON a.id = s.fk_id_actor INNER JOIN gobs.indicator i ON i.id = s.fk_id_indicator INNER JOIN gobs.spatial_layer sl ON sl.id = s.fk_id_spatial_layer INNER JOIN gobs.protocol p ON p.id = s.fk_id_protocol GROUP BY s.id, id_label, id_paths, a_label, sl_label, pr_label )" + + + + List of series + + + + + 0 + 0 + + + + + false + + + + + + + dataset + + + + + + + + + + 0 + 0 + + + + + false + + + + + postgres + + + + + + + + + + + 1 + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + 0 + generatedlayout + + + + + + "id" + + + + observation_bcc90162_47c8_4097_bc24_a31af92d2708 + service='lizmap-gobsapi' key='id' estimatedmetadata=true checkPrimaryKeyUnicity='0' table="gobs"."observation" + + + + observation + + + + + 0 + 0 + + + + + true + + + + + + + dataset + + Les données brutes au format pivot ( indicateur, date, valeurs et entité spatiale, auteur, etc.) + + + + + + + + + + + + + + + + + 0 + 0 + + + + + true + + + + + + + + + + + + + postgres + + + + + + + + + + + 1 + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + """ +Les formulaires QGIS peuvent avoir une fonction Python qui sera appelée à l'ouverture du formulaire. + +Utilisez cette fonction pour ajouter plus de fonctionnalités à vos formulaires. + +Entrez le nom de la fonction dans le champ "Fonction d'initialisation Python". +Voici un exemple à suivre: +""" +from qgis.PyQt.QtWidgets import QWidget + +def my_form_open(dialog, layer, feature): + geom = feature.geometry() + control = dialog.findChild(QWidget, "MyLineEdit") + + 0 + generatedlayout + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + "id" + + + + + -20037508.34278924390673637 + -20037508.34278924763202667 + 20037508.34278924390673637 + 20037508.34278924763202667 + + + -180 + -85.05112877980660357 + 179.99999999999997158 + 85.05112877980660357 + + osm_mapnik_73cc9876_fa44_4742_bc09_afe572b57bbe + crs=EPSG:3857&format&type=xyz&url=http://tile.openstreetmap.org/%7Bz%7D/%7Bx%7D/%7By%7D.png + + + + osm-mapnik + + + PROJCRS["WGS 84 / Pseudo-Mercator",BASEGEOGCRS["WGS 84",ENSEMBLE["World Geodetic System 1984 ensemble",MEMBER["World Geodetic System 1984 (Transit)"],MEMBER["World Geodetic System 1984 (G730)"],MEMBER["World Geodetic System 1984 (G873)"],MEMBER["World Geodetic System 1984 (G1150)"],MEMBER["World Geodetic System 1984 (G1674)"],MEMBER["World Geodetic System 1984 (G1762)"],MEMBER["World Geodetic System 1984 (G2139)"],ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[2.0]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],ID["EPSG",4326]],CONVERSION["Popular Visualisation Pseudo-Mercator",METHOD["Popular Visualisation Pseudo Mercator",ID["EPSG",1024]],PARAMETER["Latitude of natural origin",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8801]],PARAMETER["Longitude of natural origin",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8802]],PARAMETER["False easting",0,LENGTHUNIT["metre",1],ID["EPSG",8806]],PARAMETER["False northing",0,LENGTHUNIT["metre",1],ID["EPSG",8807]]],CS[Cartesian,2],AXIS["easting (X)",east,ORDER[1],LENGTHUNIT["metre",1]],AXIS["northing (Y)",north,ORDER[2],LENGTHUNIT["metre",1]],USAGE[SCOPE["Web mapping and visualisation."],AREA["World between 85.06°S and 85.06°N."],BBOX[-85.06,-180,85.06,180]],ID["EPSG",3857]] + +proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +wktext +no_defs + 3857 + 3857 + EPSG:3857 + WGS 84 / Pseudo-Mercator + merc + EPSG:7030 + false + + + + + + + + + + + + + + + PROJCRS["WGS 84 / Pseudo-Mercator",BASEGEOGCRS["WGS 84",ENSEMBLE["World Geodetic System 1984 ensemble",MEMBER["World Geodetic System 1984 (Transit)"],MEMBER["World Geodetic System 1984 (G730)"],MEMBER["World Geodetic System 1984 (G873)"],MEMBER["World Geodetic System 1984 (G1150)"],MEMBER["World Geodetic System 1984 (G1674)"],MEMBER["World Geodetic System 1984 (G1762)"],MEMBER["World Geodetic System 1984 (G2139)"],ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[2.0]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],ID["EPSG",4326]],CONVERSION["Popular Visualisation Pseudo-Mercator",METHOD["Popular Visualisation Pseudo Mercator",ID["EPSG",1024]],PARAMETER["Latitude of natural origin",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8801]],PARAMETER["Longitude of natural origin",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8802]],PARAMETER["False easting",0,LENGTHUNIT["metre",1],ID["EPSG",8806]],PARAMETER["False northing",0,LENGTHUNIT["metre",1],ID["EPSG",8807]]],CS[Cartesian,2],AXIS["easting (X)",east,ORDER[1],LENGTHUNIT["metre",1]],AXIS["northing (Y)",north,ORDER[2],LENGTHUNIT["metre",1]],USAGE[SCOPE["Web mapping and visualisation."],AREA["World between 85.06°S and 85.06°N."],BBOX[-85.06,-180,85.06,180]],ID["EPSG",3857]] + +proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +wktext +no_defs + 3857 + 3857 + EPSG:3857 + WGS 84 / Pseudo-Mercator + merc + EPSG:7030 + false + + + + + wms + + + + + + + + + 1 + 1 + 0 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + None + WholeRaster + Estimated + 0.02 + 0.98 + 2 + + + + + + resamplingFilter + + 0 + + + project_f42a5660_8aba_49f5_a9e7_92abb64e339e + service='lizmap-gobsapi' key='id' estimatedmetadata=true checkPrimaryKeyUnicity='1' table="gobs"."project" + + + + project + + + + + 0 + 0 + + + + + false + + + + + + + dataset + + List of projects, which represents a group of indicators + + + + + + + + + + + + + + + + + 0 + 0 + + + + + false + + + + + + + + + + + + + postgres + + + + + + + + + + + 1 + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + # -*- coding: utf-8 -*- +""" +Les formulaires QGIS peuvent avoir une fonction Python qui sera appelée à l'ouverture du formulaire. + +Utilisez cette fonction pour ajouter plus de fonctionnalités à vos formulaires. + +Entrez le nom de la fonction dans le champ "Fonction d'initialisation Python". +Voici un exemple à suivre: +""" +from qgis.PyQt.QtWidgets import QWidget + +def my_form_open(dialog, layer, feature): + geom = feature.geometry() + control = dialog.findChild(QWidget, "MyLineEdit") + + + 0 + tablayout + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + "pt_description" + + + + + -3.9494532076494302 + 48.33931229146320163 + -3.60112193435469985 + 48.57353478157200044 + + + -3.9494532076494302 + 48.33931229146320163 + -3.60112193435469985 + 48.57353478157200044 + + project_view_c10ae5f5_e011_4223_a08c_903108ad41d2 + service='lizmap-gobsapi' sslmode=disable key='id' estimatedmetadata=true srid=4326 type=MultiPolygon checkPrimaryKeyUnicity='1' table="gobs"."project_view" (geom) + + + + project_view + + + GEOGCRS["WGS 84",ENSEMBLE["World Geodetic System 1984 ensemble",MEMBER["World Geodetic System 1984 (Transit)"],MEMBER["World Geodetic System 1984 (G730)"],MEMBER["World Geodetic System 1984 (G873)"],MEMBER["World Geodetic System 1984 (G1150)"],MEMBER["World Geodetic System 1984 (G1674)"],MEMBER["World Geodetic System 1984 (G1762)"],MEMBER["World Geodetic System 1984 (G2139)"],ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[2.0]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["geodetic latitude (Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["geodetic longitude (Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],USAGE[SCOPE["Horizontal component of 3D system."],AREA["World."],BBOX[-90,-180,90,180]],ID["EPSG",4326]] + +proj=longlat +datum=WGS84 +no_defs + 3452 + 4326 + EPSG:4326 + WGS 84 + longlat + EPSG:7030 + true + + + + + + + dataset + + Allow to filter the access on projects and relative data (indicators, observations, etc.) with a spatial object for a given list of user groups + + + + + + + + + + + + + + + GEOGCRS["WGS 84",ENSEMBLE["World Geodetic System 1984 ensemble",MEMBER["World Geodetic System 1984 (Transit)"],MEMBER["World Geodetic System 1984 (G730)"],MEMBER["World Geodetic System 1984 (G873)"],MEMBER["World Geodetic System 1984 (G1150)"],MEMBER["World Geodetic System 1984 (G1674)"],MEMBER["World Geodetic System 1984 (G1762)"],MEMBER["World Geodetic System 1984 (G2139)"],ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[2.0]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["geodetic latitude (Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["geodetic longitude (Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],USAGE[SCOPE["Horizontal component of 3D system."],AREA["World."],BBOX[-90,-180,90,180]],ID["EPSG",4326]] + +proj=longlat +datum=WGS84 +no_defs + 3452 + 4326 + EPSG:4326 + WGS 84 + longlat + EPSG:7030 + true + + + + + + + + + + + + + postgres + + + + + + + + + + + 1 + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + 0 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + # -*- coding: utf-8 -*- +""" +Les formulaires QGIS peuvent avoir une fonction Python qui sera appelée à l'ouverture du formulaire. + +Utilisez cette fonction pour ajouter plus de fonctionnalités à vos formulaires. + +Entrez le nom de la fonction dans le champ "Fonction d'initialisation Python". +Voici un exemple à suivre: +""" +from qgis.PyQt.QtWidgets import QWidget + +def my_form_open(dialog, layer, feature): + geom = feature.geometry() + control = dialog.findChild(QWidget, "MyLineEdit") + + + 0 + generatedlayout + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + "id" + + + + protocol_5507f1c8_1802_4df0_a273_8e9b7f52c352 + service='lizmap-gobsapi' key='id' estimatedmetadata=true checkPrimaryKeyUnicity='0' table="gobs"."protocol" + + + + protocol + + + + + 0 + 0 + + + + + true + + + + + + + dataset + + List of protocols + + + + + + + + + + + + + + + + + 0 + 0 + + + + + true + + + + + + + + + + + + + postgres + + + + + + + + + + + 1 + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + """ +Les formulaires QGIS peuvent avoir une fonction Python qui sera appelée à l'ouverture du formulaire. + +Utilisez cette fonction pour ajouter plus de fonctionnalités à vos formulaires. + +Entrez le nom de la fonction dans le champ "Fonction d'initialisation Python". +Voici un exemple à suivre: +""" +from qgis.PyQt.QtWidgets import QWidget + +def my_form_open(dialog, layer, feature): + geom = feature.geometry() + control = dialog.findChild(QWidget, "MyLineEdit") + + 0 + tablayout + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + pr_label + + + + r_graph_edge_f2eb47e9_728b_4c85_a839_3b488e132e06 + service='lizmap-gobsapi' key='ge_parent_node,ge_child_node' estimatedmetadata=true checkPrimaryKeyUnicity='0' table="gobs"."r_graph_edge" + + + + r_graph_edge + + + + + 0 + 0 + + + + + true + + + + + + + dataset + + Graph edges: relations between nodes + + + + + + + + 0 + 0 + + + + + true + + + + + postgres + + + + + + + + + + + 1 + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + 0 + generatedlayout + + + + + + + + + + r_indicator_node_2ca83116_e69f_4dcb_abcb_de5bdf44b2be + service='lizmap-gobsapi' key='fk_id_indicator,fk_id_node' estimatedmetadata=true checkPrimaryKeyUnicity='0' table="gobs"."r_indicator_node" + + + + r_indicator_node + + + + + 0 + 0 + + + + + true + + + + + + + dataset + + Pivot table between indicators and nodes + + + + + + + + 0 + 0 + + + + + true + + + + + postgres + + + + + + + + + + + 1 + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + 0 + generatedlayout + + + + + + "fk_id_indicator" + + + + series_04a7414a_ab6d_4611_8a60_bcd22071dc22 + service='lizmap-gobsapi' key='id' estimatedmetadata=true checkPrimaryKeyUnicity='0' table="gobs"."series" + + + + series + + + + + 0 + 0 + + + + + true + + + + + + + dataset + + Series of data + + + + + + + + + + + + + + + + + 0 + 0 + + + + + true + + + + + + + + + + + + + postgres + + + + + + + + + + + 1 + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + """ +Les formulaires QGIS peuvent avoir une fonction Python qui sera appelée à l'ouverture du formulaire. + +Utilisez cette fonction pour ajouter plus de fonctionnalités à vos formulaires. + +Entrez le nom de la fonction dans le champ "Fonction d'initialisation Python". +Voici un exemple à suivre: +""" +from qgis.PyQt.QtWidgets import QWidget + +def my_form_open(dialog, layer, feature): + geom = feature.geometry() + control = dialog.findChild(QWidget, "MyLineEdit") + + 0 + tablayout + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + "id" + + + + spatial_layer_18215d6d_1f4c_40d2_ba83_f2c9a9694e84 + service='lizmap-gobsapi' key='id' estimatedmetadata=true checkPrimaryKeyUnicity='0' table="gobs"."spatial_layer" + + + + spatial_layer + + + + + 0 + 0 + + + + + true + + + + + + + dataset + + List the spatial layers, used to regroup the spatial data. Ex : cities, rivers, stations + + + + + + + + + + + + + + + + + 0 + 0 + + + + + true + + + + + + + + + + + + + postgres + + + + + + + + + + + 1 + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + """ +Les formulaires QGIS peuvent avoir une fonction Python qui sera appelée à l'ouverture du formulaire. + +Utilisez cette fonction pour ajouter plus de fonctionnalités à vos formulaires. + +Entrez le nom de la fonction dans le champ "Fonction d'initialisation Python". +Voici un exemple à suivre: +""" +from qgis.PyQt.QtWidgets import QWidget + +def my_form_open(dialog, layer, feature): + geom = feature.geometry() + control = dialog.findChild(QWidget, "MyLineEdit") + + 0 + tablayout + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + sl_label + + + + + + + + + + + 2 + + + 255 + 255 + 255 + 255 + 0 + 255 + 255 + + + false + + + + + + NONE + + + m2 + meters + + + 0 + 0 + + + 50 + 5 + 16 + 30 + 2.5 + false + false + 0 + 0 + false + false + true + 0 + 255,0,0,255 + + + false + + + true + 2 + MU + + + + DCIM + + + false + + 1 + + + + gobs_connection_name + gobs_is_admin + gobs_is_admin_project + lizmap_repository + lizmap_user + lizmap_user_groups + + + gobs_connection_name_value + yes + yes + + + + + + + + + actor_5f01a6e5_8205_462f_af40_0ffd7ff0a44f + actor_category_8a7edcf8_cb34_4689_b22b_7a8a6a2ab610 + application_a455f2b7_b92d_413b_bb50_b9777b274f84 + dimension_962da0f3_0cfc_479f_b23f_bbc23496c9ee + document_3f322924_735f_4bef_b903_9521d2f25444 + glossary_cee356e0_5be5_4d87_ac2b_e8e8967c4032 + graph_node_2cd9eee8_46e2_401c_87f7_8b40d9d6260e + import_0343eb12_592e_4fd0_8380_51f4d62b6a56 + indicator_18ba18bf_0390_45a3_8edd_1cc049e8a251 + layername_1b984aea_510b_4f33_b961_7b83868d7ee3 + observation_bcc90162_47c8_4097_bc24_a31af92d2708 + project_f42a5660_8aba_49f5_a9e7_92abb64e339e + project_view_c10ae5f5_e011_4223_a08c_903108ad41d2 + protocol_5507f1c8_1802_4df0_a273_8e9b7f52c352 + r_graph_edge_f2eb47e9_728b_4c85_a839_3b488e132e06 + r_indicator_node_2ca83116_e69f_4dcb_abcb_de5bdf44b2be + series_04a7414a_ab6d_4611_8a60_bcd22071dc22 + spatial_layer_18215d6d_1f4c_40d2_ba83_f2c9a9694e84 + + + 8 + 8 + 8 + 8 + 8 + 8 + 8 + 8 + 8 + 8 + 8 + 8 + 8 + 8 + 8 + 8 + 8 + 8 + 8 + 8 + 8 + 8 + 8 + 8 + 8 + + + + + + + + None + false + + + + + + 1 + + -20037508.34279999881982803 + -20037508.34279999881982803 + 20037508.34279999881982803 + 20037508.34279999881982803 + + false + conditions unknown + 90 + + + + 1 + + 8 + false + + + + false + + false + G-Obs administration + 0 + + false + + + + + + + + false + + + + + false + + 5000 + + + + false + + + + + + 10 + + 1024 + singleLayer + 0 + + online + 0 + 0 + + + false + None + folder + /tmp/qgis2web + Canvas extent + false + false + None + false + 28 + None + false + 1 + maintain + false + + false + + #f8f8f8 + #000000 + openlayers + + + + + + + + + + + + + + + + + + + + + + + + + + + + mdouchin + 2019-04-12T09:32:17 + + + + + + + + + + PROJCRS["WGS 84 / Pseudo-Mercator",BASEGEOGCRS["WGS 84",ENSEMBLE["World Geodetic System 1984 ensemble",MEMBER["World Geodetic System 1984 (Transit)"],MEMBER["World Geodetic System 1984 (G730)"],MEMBER["World Geodetic System 1984 (G873)"],MEMBER["World Geodetic System 1984 (G1150)"],MEMBER["World Geodetic System 1984 (G1674)"],MEMBER["World Geodetic System 1984 (G1762)"],MEMBER["World Geodetic System 1984 (G2139)"],ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[2.0]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],ID["EPSG",4326]],CONVERSION["Popular Visualisation Pseudo-Mercator",METHOD["Popular Visualisation Pseudo Mercator",ID["EPSG",1024]],PARAMETER["Latitude of natural origin",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8801]],PARAMETER["Longitude of natural origin",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8802]],PARAMETER["False easting",0,LENGTHUNIT["metre",1],ID["EPSG",8806]],PARAMETER["False northing",0,LENGTHUNIT["metre",1],ID["EPSG",8807]]],CS[Cartesian,2],AXIS["easting (X)",east,ORDER[1],LENGTHUNIT["metre",1]],AXIS["northing (Y)",north,ORDER[2],LENGTHUNIT["metre",1]],USAGE[SCOPE["Web mapping and visualisation."],AREA["World between 85.06°S and 85.06°N."],BBOX[-85.06,-180,85.06,180]],ID["EPSG",3857]] + +proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +wktext +no_defs + 3857 + 3857 + EPSG:3857 + WGS 84 / Pseudo-Mercator + merc + EPSG:7030 + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GEOGCRS["WGS 84",ENSEMBLE["World Geodetic System 1984 ensemble",MEMBER["World Geodetic System 1984 (Transit)"],MEMBER["World Geodetic System 1984 (G730)"],MEMBER["World Geodetic System 1984 (G873)"],MEMBER["World Geodetic System 1984 (G1150)"],MEMBER["World Geodetic System 1984 (G1674)"],MEMBER["World Geodetic System 1984 (G1762)"],MEMBER["World Geodetic System 1984 (G2139)"],ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[2.0]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["geodetic latitude (Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["geodetic longitude (Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],USAGE[SCOPE["Horizontal component of 3D system."],AREA["World."],BBOX[-90,-180,90,180]],ID["EPSG",4326]] + +proj=longlat +datum=WGS84 +no_defs + 3452 + 4326 + EPSG:4326 + WGS 84 + longlat + EPSG:7030 + true + + + + \ No newline at end of file diff --git a/tests/lizmap/instances/tests/gobs_administration.qgs.bak b/tests/lizmap/instances/tests/gobs_administration.qgs.bak new file mode 100644 index 0000000..93b6180 --- /dev/null +++ b/tests/lizmap/instances/tests/gobs_administration.qgs.bak @@ -0,0 +1,8582 @@ + + + + + + + + PROJCRS["WGS 84 / Pseudo-Mercator",BASEGEOGCRS["WGS 84",ENSEMBLE["World Geodetic System 1984 ensemble",MEMBER["World Geodetic System 1984 (Transit)"],MEMBER["World Geodetic System 1984 (G730)"],MEMBER["World Geodetic System 1984 (G873)"],MEMBER["World Geodetic System 1984 (G1150)"],MEMBER["World Geodetic System 1984 (G1674)"],MEMBER["World Geodetic System 1984 (G1762)"],MEMBER["World Geodetic System 1984 (G2139)"],ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[2.0]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],ID["EPSG",4326]],CONVERSION["Popular Visualisation Pseudo-Mercator",METHOD["Popular Visualisation Pseudo Mercator",ID["EPSG",1024]],PARAMETER["Latitude of natural origin",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8801]],PARAMETER["Longitude of natural origin",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8802]],PARAMETER["False easting",0,LENGTHUNIT["metre",1],ID["EPSG",8806]],PARAMETER["False northing",0,LENGTHUNIT["metre",1],ID["EPSG",8807]]],CS[Cartesian,2],AXIS["easting (X)",east,ORDER[1],LENGTHUNIT["metre",1]],AXIS["northing (Y)",north,ORDER[2],LENGTHUNIT["metre",1]],USAGE[SCOPE["Web mapping and visualisation."],AREA["World between 85.06°S and 85.06°N."],BBOX[-85.06,-180,85.06,180]],ID["EPSG",3857]] + +proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +wktext +no_defs + 3857 + 3857 + EPSG:3857 + WGS 84 / Pseudo-Mercator + merc + EPSG:7030 + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + osm_mapnik_73cc9876_fa44_4742_bc09_afe572b57bbe + project_view_c10ae5f5_e011_4223_a08c_903108ad41d2 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + meters + + -12790955.31919470615684986 + -10041799.32541200332343578 + 15012367.76015940494835377 + 18148278.7754305973649025 + + 0 + + + PROJCRS["WGS 84 / Pseudo-Mercator",BASEGEOGCRS["WGS 84",ENSEMBLE["World Geodetic System 1984 ensemble",MEMBER["World Geodetic System 1984 (Transit)"],MEMBER["World Geodetic System 1984 (G730)"],MEMBER["World Geodetic System 1984 (G873)"],MEMBER["World Geodetic System 1984 (G1150)"],MEMBER["World Geodetic System 1984 (G1674)"],MEMBER["World Geodetic System 1984 (G1762)"],MEMBER["World Geodetic System 1984 (G2139)"],ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[2.0]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],ID["EPSG",4326]],CONVERSION["Popular Visualisation Pseudo-Mercator",METHOD["Popular Visualisation Pseudo Mercator",ID["EPSG",1024]],PARAMETER["Latitude of natural origin",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8801]],PARAMETER["Longitude of natural origin",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8802]],PARAMETER["False easting",0,LENGTHUNIT["metre",1],ID["EPSG",8806]],PARAMETER["False northing",0,LENGTHUNIT["metre",1],ID["EPSG",8807]]],CS[Cartesian,2],AXIS["easting (X)",east,ORDER[1],LENGTHUNIT["metre",1]],AXIS["northing (Y)",north,ORDER[2],LENGTHUNIT["metre",1]],USAGE[SCOPE["Web mapping and visualisation."],AREA["World between 85.06°S and 85.06°N."],BBOX[-85.06,-180,85.06,180]],ID["EPSG",3857]] + +proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +wktext +no_defs + 3857 + 3857 + EPSG:3857 + WGS 84 / Pseudo-Mercator + merc + EPSG:7030 + false + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Annotations_239d7cb0_01a6_4a7a_9e12_6651dbd7ecd7 + + + + + + + + + + 0 + 0 + + + + + false + + + + + + + + + + + + + + + + + 0 + 0 + + + + + false + + + + + + 1 + 0 + + + + + actor_5f01a6e5_8205_462f_af40_0ffd7ff0a44f + service='gobs' key='id' estimatedmetadata=true checkPrimaryKeyUnicity='0' table="gobs"."actor" + + + + actor + + + + + 0 + 0 + + + + + false + + + + + + + dataset + + Actors + + + + + + + + + + + + + + + + + 0 + 0 + + + + + true + + + + + + + + + + + + + postgres + + + + + + + + + + + 1 + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + """ +Les formulaires QGIS peuvent avoir une fonction Python qui sera appelée à l'ouverture du formulaire. + +Utilisez cette fonction pour ajouter plus de fonctionnalités à vos formulaires. + +Entrez le nom de la fonction dans le champ "Fonction d'initialisation Python". +Voici un exemple à suivre: +""" +from qgis.PyQt.QtWidgets import QWidget + +def my_form_open(dialog, layer, feature): + geom = feature.geometry() + control = dialog.findChild(QWidget, "MyLineEdit") + + 0 + tablayout + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + a_label + + + + actor_category_8a7edcf8_cb34_4689_b22b_7a8a6a2ab610 + service='gobs' key='id' estimatedmetadata=true checkPrimaryKeyUnicity='0' table="gobs"."actor_category" + + + + actor_category + + + + + 0 + 0 + + + + + true + + + + + + + dataset + + Actors categories + + + + + + + + + + + + + + + + + 0 + 0 + + + + + true + + + + + + + + + + + + + postgres + + + + + + + + + + + 1 + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + """ +Les formulaires QGIS peuvent avoir une fonction Python qui sera appelée à l'ouverture du formulaire. + +Utilisez cette fonction pour ajouter plus de fonctionnalités à vos formulaires. + +Entrez le nom de la fonction dans le champ "Fonction d'initialisation Python". +Voici un exemple à suivre: +""" +from qgis.PyQt.QtWidgets import QWidget + +def my_form_open(dialog, layer, feature): + geom = feature.geometry() + control = dialog.findChild(QWidget, "MyLineEdit") + + 0 + generatedlayout + + + + + + + + + + + + + + + + + + + + "ac_label" + + + + application_a455f2b7_b92d_413b_bb50_b9777b274f84 + service='gobs' key='id' estimatedmetadata=true checkPrimaryKeyUnicity='1' table="gobs"."application" + + + + application + + + + + 0 + 0 + + + + + false + + + + + + + dataset + + List the external applications interacting with G-Obs database with the web API. +This will help storing application specific data such as the default values when creating automatically series, protocols, users, etc. + + + + + + + + + + + + + + + + + 0 + 0 + + + + + false + + + + + + + + + + + + + postgres + + + + + + + + + + + 1 + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + # -*- coding: utf-8 -*- +""" +Les formulaires QGIS peuvent avoir une fonction Python qui sera appelée à l'ouverture du formulaire. + +Utilisez cette fonction pour ajouter plus de fonctionnalités à vos formulaires. + +Entrez le nom de la fonction dans le champ "Fonction d'initialisation Python". +Voici un exemple à suivre: +""" +from qgis.PyQt.QtWidgets import QWidget + +def my_form_open(dialog, layer, feature): + geom = feature.geometry() + control = dialog.findChild(QWidget, "MyLineEdit") + + + 0 + generatedlayout + + + + + + + + + + + + + + + + + + + + + + + + "ap_description" + + + + dimension_962da0f3_0cfc_479f_b23f_bbc23496c9ee + service='gobs' key='id' estimatedmetadata=true checkPrimaryKeyUnicity='1' table="gobs"."dimension" + + + + indicator dimensions + + + + + 0 + 0 + + + + + false + + + + + + + dataset + + Stores the different dimensions characteristics of an indicator + + + + + + + + + + + + + + + + + 0 + 0 + + + + + false + + + + + + + + + + + + + postgres + + + + + + + + + + + 1 + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + # -*- coding: utf-8 -*- +""" +Les formulaires QGIS peuvent avoir une fonction Python qui est appelée lorsque le formulaire est +ouvert. + +Utilisez cette fonction pour ajouter une logique supplémentaire à vos formulaires. + +Entrez le nom de la fonction dans le champ +"Fonction d'initialisation Python". +Voici un exemple: +""" +from qgis.PyQt.QtWidgets import QWidget + +def my_form_open(dialog, layer, feature): + geom = feature.geometry() + control = dialog.findChild(QWidget, "MyLineEdit") + + 0 + generatedlayout + + + + + + + + + + + + + + + + + + + + + + + + + + + "di_label" + + + + document_3f322924_735f_4bef_b903_9521d2f25444 + service='gobs' key='id' estimatedmetadata=true checkPrimaryKeyUnicity='1' table="gobs"."document" + + + + document + + + + + 0 + 0 + + + + + true + + + + + + + dataset + + List of documents for describing indicators. + + + + + + + + + + + + + + + + + 0 + 0 + + + + + true + + + + + + + + + + + + + postgres + + + + + + + + + + + 1 + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + # -*- coding: utf-8 -*- +""" +Les formulaires QGIS peuvent avoir une fonction Python qui sera appelée à l'ouverture du formulaire. + +Utilisez cette fonction pour ajouter plus de fonctionnalités à vos formulaires. + +Entrez le nom de la fonction dans le champ "Fonction d'initialisation Python". +Voici un exemple à suivre: +""" +from qgis.PyQt.QtWidgets import QWidget + +def my_form_open(dialog, layer, feature): + geom = feature.geometry() + control = dialog.findChild(QWidget, "MyLineEdit") + + + 0 + generatedlayout + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + "do_description" + + + + glossary_cee356e0_5be5_4d87_ac2b_e8e8967c4032 + service='gobs' key='id' estimatedmetadata=true checkPrimaryKeyUnicity='0' table="gobs"."glossary" + + + + glossary + + + + + 0 + 0 + + + + + true + + + + + + + dataset + + List of labels and words used as labels for stored data + + + + + + + + + + + + + + + + + 0 + 0 + + + + + true + + + + + + + + + + + + + postgres + + + + + + + + + + + 1 + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + """ +Les formulaires QGIS peuvent avoir une fonction Python qui sera appelée à l'ouverture du formulaire. + +Utilisez cette fonction pour ajouter plus de fonctionnalités à vos formulaires. + +Entrez le nom de la fonction dans le champ "Fonction d'initialisation Python". +Voici un exemple à suivre: +""" +from qgis.PyQt.QtWidgets import QWidget + +def my_form_open(dialog, layer, feature): + geom = feature.geometry() + control = dialog.findChild(QWidget, "MyLineEdit") + + + 0 + generatedlayout + + + + + + + + + + + + + + + + + + + + id + + + + graph_node_2cd9eee8_46e2_401c_87f7_8b40d9d6260e + service='gobs' key='id' estimatedmetadata=true checkPrimaryKeyUnicity='0' table="gobs"."graph_node" + + + + graph_node + + + + + 0 + 0 + + + + + true + + + + + + + dataset + + Graph nodes, to store key words used to find an indicator. + + + + + + + + + + + + + + + + + 0 + 0 + + + + + true + + + + + + + + + + + + + postgres + + + + + + + + + + + 1 + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + """ +Les formulaires QGIS peuvent avoir une fonction Python qui sera appelée à l'ouverture du formulaire. + +Utilisez cette fonction pour ajouter plus de fonctionnalités à vos formulaires. + +Entrez le nom de la fonction dans le champ "Fonction d'initialisation Python". +Voici un exemple à suivre: +""" +from qgis.PyQt.QtWidgets import QWidget + +def my_form_open(dialog, layer, feature): + geom = feature.geometry() + control = dialog.findChild(QWidget, "MyLineEdit") + + + 0 + generatedlayout + + + + + + + + + + + + + + + + + + gn_label + + + + import_0343eb12_592e_4fd0_8380_51f4d62b6a56 + service='gobs' key='id' estimatedmetadata=true checkPrimaryKeyUnicity='0' table="gobs"."import" + + + + import + + + + + 0 + 0 + + + + + true + + + + + + + dataset + + Journal des imports + + + + + + + + + + + + + + + + + 0 + 0 + + + + + true + + + + + + + + + + + + + postgres + + + + + + + + + + + 1 + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + # -*- coding: utf-8 -*- +""" +Les formulaires QGIS peuvent avoir une fonction Python qui sera appelée à l'ouverture du formulaire. + +Utilisez cette fonction pour ajouter plus de fonctionnalités à vos formulaires. + +Entrez le nom de la fonction dans le champ "Fonction d'initialisation Python". +Voici un exemple à suivre: +""" +from qgis.PyQt.QtWidgets import QWidget + +def my_form_open(dialog, layer, feature): + geom = feature.geometry() + control = dialog.findChild(QWidget, "MyLineEdit") + + + 0 + generatedlayout + + + + + + + + + + + + + + + + + + + + + + "id" + + + + indicator_18ba18bf_0390_45a3_8edd_1cc049e8a251 + service='gobs' key='id' estimatedmetadata=true checkPrimaryKeyUnicity='0' table="gobs"."indicator" + + + + indicators + + + + + 0 + 0 + + + + + true + + + + + + + dataset + + Groups of observation data for decisional purpose. + + + + + + + + + + + + + + + + + 0 + 0 + + + + + true + + + + + + + + + + + + + postgres + + + + + + + + + + + 1 + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + """ +QGIS forms can have a Python function that is called when the form is +opened. + +Use this function to add extra logic to your forms. + +Enter the name of the function in the "Python Init function" +field. +An example follows: +""" +from qgis.PyQt.QtWidgets import QWidget + +def my_form_open(dialog, layer, feature): + geom = feature.geometry() + control = dialog.findChild(QWidget, "MyLineEdit") + + 0 + tablayout + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id_label + + + + layername_1b984aea_510b_4f33_b961_7b83868d7ee3 + service='gobs' key='id' estimatedmetadata=true checkPrimaryKeyUnicity='1' table="( SELECT s.id, id_label AS indicator, id_paths AS indicator_paths, a_label AS actor_source, sl_label AS spatial_layer, pr_label AS protocol, count(o.id) AS nb_observation, min(o.ob_start_timestamp) AS min_date, max(Coalesce(o.ob_start_timestamp, o.ob_end_timestamp)) AS max_date FROM gobs.series s INNER JOIN gobs.observation o ON o.fk_id_series = s.id INNER JOIN gobs.actor a ON a.id = s.fk_id_actor INNER JOIN gobs.indicator i ON i.id = s.fk_id_indicator INNER JOIN gobs.spatial_layer sl ON sl.id = s.fk_id_spatial_layer INNER JOIN gobs.protocol p ON p.id = s.fk_id_protocol GROUP BY s.id, id_label, id_paths, a_label, sl_label, pr_label )" + + + + List of series + + + + + 0 + 0 + + + + + false + + + + + + + dataset + + + + + + + + + + 0 + 0 + + + + + false + + + + + postgres + + + + + + + + + + + 1 + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + 0 + generatedlayout + + + + + + "id" + + + + observation_bcc90162_47c8_4097_bc24_a31af92d2708 + service='gobs' key='id' estimatedmetadata=true checkPrimaryKeyUnicity='0' table="gobs"."observation" + + + + observation + + + + + 0 + 0 + + + + + true + + + + + + + dataset + + Les données brutes au format pivot ( indicateur, date, valeurs et entité spatiale, auteur, etc.) + + + + + + + + + + + + + + + + + 0 + 0 + + + + + true + + + + + + + + + + + + + postgres + + + + + + + + + + + 1 + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + """ +Les formulaires QGIS peuvent avoir une fonction Python qui sera appelée à l'ouverture du formulaire. + +Utilisez cette fonction pour ajouter plus de fonctionnalités à vos formulaires. + +Entrez le nom de la fonction dans le champ "Fonction d'initialisation Python". +Voici un exemple à suivre: +""" +from qgis.PyQt.QtWidgets import QWidget + +def my_form_open(dialog, layer, feature): + geom = feature.geometry() + control = dialog.findChild(QWidget, "MyLineEdit") + + 0 + generatedlayout + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + "id" + + + + + -20037508.34278924390673637 + -20037508.34278924763202667 + 20037508.34278924390673637 + 20037508.34278924763202667 + + + -180 + -85.05112877980660357 + 179.99999999999997158 + 85.05112877980660357 + + osm_mapnik_73cc9876_fa44_4742_bc09_afe572b57bbe + crs=EPSG:3857&format&type=xyz&url=http://tile.openstreetmap.org/%7Bz%7D/%7Bx%7D/%7By%7D.png + + + + osm-mapnik + + + PROJCRS["WGS 84 / Pseudo-Mercator",BASEGEOGCRS["WGS 84",ENSEMBLE["World Geodetic System 1984 ensemble",MEMBER["World Geodetic System 1984 (Transit)"],MEMBER["World Geodetic System 1984 (G730)"],MEMBER["World Geodetic System 1984 (G873)"],MEMBER["World Geodetic System 1984 (G1150)"],MEMBER["World Geodetic System 1984 (G1674)"],MEMBER["World Geodetic System 1984 (G1762)"],MEMBER["World Geodetic System 1984 (G2139)"],ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[2.0]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],ID["EPSG",4326]],CONVERSION["Popular Visualisation Pseudo-Mercator",METHOD["Popular Visualisation Pseudo Mercator",ID["EPSG",1024]],PARAMETER["Latitude of natural origin",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8801]],PARAMETER["Longitude of natural origin",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8802]],PARAMETER["False easting",0,LENGTHUNIT["metre",1],ID["EPSG",8806]],PARAMETER["False northing",0,LENGTHUNIT["metre",1],ID["EPSG",8807]]],CS[Cartesian,2],AXIS["easting (X)",east,ORDER[1],LENGTHUNIT["metre",1]],AXIS["northing (Y)",north,ORDER[2],LENGTHUNIT["metre",1]],USAGE[SCOPE["Web mapping and visualisation."],AREA["World between 85.06°S and 85.06°N."],BBOX[-85.06,-180,85.06,180]],ID["EPSG",3857]] + +proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +wktext +no_defs + 3857 + 3857 + EPSG:3857 + WGS 84 / Pseudo-Mercator + merc + EPSG:7030 + false + + + + + + + + + + + + + + + PROJCRS["WGS 84 / Pseudo-Mercator",BASEGEOGCRS["WGS 84",ENSEMBLE["World Geodetic System 1984 ensemble",MEMBER["World Geodetic System 1984 (Transit)"],MEMBER["World Geodetic System 1984 (G730)"],MEMBER["World Geodetic System 1984 (G873)"],MEMBER["World Geodetic System 1984 (G1150)"],MEMBER["World Geodetic System 1984 (G1674)"],MEMBER["World Geodetic System 1984 (G1762)"],MEMBER["World Geodetic System 1984 (G2139)"],ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[2.0]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],ID["EPSG",4326]],CONVERSION["Popular Visualisation Pseudo-Mercator",METHOD["Popular Visualisation Pseudo Mercator",ID["EPSG",1024]],PARAMETER["Latitude of natural origin",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8801]],PARAMETER["Longitude of natural origin",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8802]],PARAMETER["False easting",0,LENGTHUNIT["metre",1],ID["EPSG",8806]],PARAMETER["False northing",0,LENGTHUNIT["metre",1],ID["EPSG",8807]]],CS[Cartesian,2],AXIS["easting (X)",east,ORDER[1],LENGTHUNIT["metre",1]],AXIS["northing (Y)",north,ORDER[2],LENGTHUNIT["metre",1]],USAGE[SCOPE["Web mapping and visualisation."],AREA["World between 85.06°S and 85.06°N."],BBOX[-85.06,-180,85.06,180]],ID["EPSG",3857]] + +proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +wktext +no_defs + 3857 + 3857 + EPSG:3857 + WGS 84 / Pseudo-Mercator + merc + EPSG:7030 + false + + + + + wms + + + + + + + + + 1 + 1 + 0 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + None + WholeRaster + Estimated + 0.02 + 0.98 + 2 + + + + + + resamplingFilter + + 0 + + + project_f42a5660_8aba_49f5_a9e7_92abb64e339e + service='gobs' key='id' estimatedmetadata=true checkPrimaryKeyUnicity='1' table="gobs"."project" + + + + project + + + + + 0 + 0 + + + + + false + + + + + + + dataset + + List of projects, which represents a group of indicators + + + + + + + + + + + + + + + + + 0 + 0 + + + + + false + + + + + + + + + + + + + postgres + + + + + + + + + + + 1 + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + # -*- coding: utf-8 -*- +""" +Les formulaires QGIS peuvent avoir une fonction Python qui sera appelée à l'ouverture du formulaire. + +Utilisez cette fonction pour ajouter plus de fonctionnalités à vos formulaires. + +Entrez le nom de la fonction dans le champ "Fonction d'initialisation Python". +Voici un exemple à suivre: +""" +from qgis.PyQt.QtWidgets import QWidget + +def my_form_open(dialog, layer, feature): + geom = feature.geometry() + control = dialog.findChild(QWidget, "MyLineEdit") + + + 0 + tablayout + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + "pt_description" + + + + + -3.9494532076494302 + 48.33931229146320163 + -3.60112193435469985 + 48.57353478157200044 + + + -3.9494532076494302 + 48.33931229146320163 + -3.60112193435469985 + 48.57353478157200044 + + project_view_c10ae5f5_e011_4223_a08c_903108ad41d2 + service='gobs' sslmode=disable key='id' estimatedmetadata=true srid=4326 type=MultiPolygon checkPrimaryKeyUnicity='1' table="gobs"."project_view" (geom) + + + + project_view + + + GEOGCRS["WGS 84",ENSEMBLE["World Geodetic System 1984 ensemble",MEMBER["World Geodetic System 1984 (Transit)"],MEMBER["World Geodetic System 1984 (G730)"],MEMBER["World Geodetic System 1984 (G873)"],MEMBER["World Geodetic System 1984 (G1150)"],MEMBER["World Geodetic System 1984 (G1674)"],MEMBER["World Geodetic System 1984 (G1762)"],MEMBER["World Geodetic System 1984 (G2139)"],ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[2.0]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["geodetic latitude (Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["geodetic longitude (Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],USAGE[SCOPE["Horizontal component of 3D system."],AREA["World."],BBOX[-90,-180,90,180]],ID["EPSG",4326]] + +proj=longlat +datum=WGS84 +no_defs + 3452 + 4326 + EPSG:4326 + WGS 84 + longlat + EPSG:7030 + true + + + + + + + dataset + + Allow to filter the access on projects and relative data (indicators, observations, etc.) with a spatial object for a given list of user groups + + + + + + + + + + + + + + + GEOGCRS["WGS 84",ENSEMBLE["World Geodetic System 1984 ensemble",MEMBER["World Geodetic System 1984 (Transit)"],MEMBER["World Geodetic System 1984 (G730)"],MEMBER["World Geodetic System 1984 (G873)"],MEMBER["World Geodetic System 1984 (G1150)"],MEMBER["World Geodetic System 1984 (G1674)"],MEMBER["World Geodetic System 1984 (G1762)"],MEMBER["World Geodetic System 1984 (G2139)"],ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[2.0]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["geodetic latitude (Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["geodetic longitude (Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],USAGE[SCOPE["Horizontal component of 3D system."],AREA["World."],BBOX[-90,-180,90,180]],ID["EPSG",4326]] + +proj=longlat +datum=WGS84 +no_defs + 3452 + 4326 + EPSG:4326 + WGS 84 + longlat + EPSG:7030 + true + + + + + + + + + + + + + postgres + + + + + + + + + + + 1 + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + 0 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + # -*- coding: utf-8 -*- +""" +Les formulaires QGIS peuvent avoir une fonction Python qui sera appelée à l'ouverture du formulaire. + +Utilisez cette fonction pour ajouter plus de fonctionnalités à vos formulaires. + +Entrez le nom de la fonction dans le champ "Fonction d'initialisation Python". +Voici un exemple à suivre: +""" +from qgis.PyQt.QtWidgets import QWidget + +def my_form_open(dialog, layer, feature): + geom = feature.geometry() + control = dialog.findChild(QWidget, "MyLineEdit") + + + 0 + generatedlayout + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + "id" + + + + protocol_5507f1c8_1802_4df0_a273_8e9b7f52c352 + service='gobs' key='id' estimatedmetadata=true checkPrimaryKeyUnicity='0' table="gobs"."protocol" + + + + protocol + + + + + 0 + 0 + + + + + true + + + + + + + dataset + + List of protocols + + + + + + + + + + + + + + + + + 0 + 0 + + + + + true + + + + + + + + + + + + + postgres + + + + + + + + + + + 1 + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + """ +Les formulaires QGIS peuvent avoir une fonction Python qui sera appelée à l'ouverture du formulaire. + +Utilisez cette fonction pour ajouter plus de fonctionnalités à vos formulaires. + +Entrez le nom de la fonction dans le champ "Fonction d'initialisation Python". +Voici un exemple à suivre: +""" +from qgis.PyQt.QtWidgets import QWidget + +def my_form_open(dialog, layer, feature): + geom = feature.geometry() + control = dialog.findChild(QWidget, "MyLineEdit") + + 0 + tablayout + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + pr_label + + + + r_graph_edge_f2eb47e9_728b_4c85_a839_3b488e132e06 + service='gobs' key='ge_parent_node,ge_child_node' estimatedmetadata=true checkPrimaryKeyUnicity='0' table="gobs"."r_graph_edge" + + + + r_graph_edge + + + + + 0 + 0 + + + + + true + + + + + + + dataset + + Graph edges: relations between nodes + + + + + + + + 0 + 0 + + + + + true + + + + + postgres + + + + + + + + + + + 1 + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + 0 + generatedlayout + + + + + + + + + + r_indicator_node_2ca83116_e69f_4dcb_abcb_de5bdf44b2be + service='gobs' key='fk_id_indicator,fk_id_node' estimatedmetadata=true checkPrimaryKeyUnicity='0' table="gobs"."r_indicator_node" + + + + r_indicator_node + + + + + 0 + 0 + + + + + true + + + + + + + dataset + + Pivot table between indicators and nodes + + + + + + + + 0 + 0 + + + + + true + + + + + postgres + + + + + + + + + + + 1 + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + 0 + generatedlayout + + + + + + "fk_id_indicator" + + + + series_04a7414a_ab6d_4611_8a60_bcd22071dc22 + service='gobs' key='id' estimatedmetadata=true checkPrimaryKeyUnicity='0' table="gobs"."series" + + + + series + + + + + 0 + 0 + + + + + true + + + + + + + dataset + + Series of data + + + + + + + + + + + + + + + + + 0 + 0 + + + + + true + + + + + + + + + + + + + postgres + + + + + + + + + + + 1 + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + """ +Les formulaires QGIS peuvent avoir une fonction Python qui sera appelée à l'ouverture du formulaire. + +Utilisez cette fonction pour ajouter plus de fonctionnalités à vos formulaires. + +Entrez le nom de la fonction dans le champ "Fonction d'initialisation Python". +Voici un exemple à suivre: +""" +from qgis.PyQt.QtWidgets import QWidget + +def my_form_open(dialog, layer, feature): + geom = feature.geometry() + control = dialog.findChild(QWidget, "MyLineEdit") + + 0 + tablayout + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + "id" + + + + spatial_layer_18215d6d_1f4c_40d2_ba83_f2c9a9694e84 + service='gobs' key='id' estimatedmetadata=true checkPrimaryKeyUnicity='0' table="gobs"."spatial_layer" + + + + spatial_layer + + + + + 0 + 0 + + + + + true + + + + + + + dataset + + List the spatial layers, used to regroup the spatial data. Ex : cities, rivers, stations + + + + + + + + + + + + + + + + + 0 + 0 + + + + + true + + + + + + + + + + + + + postgres + + + + + + + + + + + 1 + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + """ +Les formulaires QGIS peuvent avoir une fonction Python qui sera appelée à l'ouverture du formulaire. + +Utilisez cette fonction pour ajouter plus de fonctionnalités à vos formulaires. + +Entrez le nom de la fonction dans le champ "Fonction d'initialisation Python". +Voici un exemple à suivre: +""" +from qgis.PyQt.QtWidgets import QWidget + +def my_form_open(dialog, layer, feature): + geom = feature.geometry() + control = dialog.findChild(QWidget, "MyLineEdit") + + 0 + tablayout + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + sl_label + + + + + + + + + + + 2 + + + 255 + 255 + 255 + 255 + 0 + 255 + 255 + + + false + + + + + + NONE + + + m2 + meters + + + 0 + 0 + + + 50 + 5 + 16 + 30 + 2.5 + false + false + 0 + 0 + false + false + true + 0 + 255,0,0,255 + + + false + + + true + 2 + MU + + + + DCIM + + + false + + 1 + + + + gobs_connection_name + gobs_is_admin + gobs_is_admin_project + lizmap_repository + lizmap_user + lizmap_user_groups + + + gobs_connection_name_value + yes + yes + + + + + + + + + actor_5f01a6e5_8205_462f_af40_0ffd7ff0a44f + actor_category_8a7edcf8_cb34_4689_b22b_7a8a6a2ab610 + application_a455f2b7_b92d_413b_bb50_b9777b274f84 + dimension_962da0f3_0cfc_479f_b23f_bbc23496c9ee + document_3f322924_735f_4bef_b903_9521d2f25444 + glossary_cee356e0_5be5_4d87_ac2b_e8e8967c4032 + graph_node_2cd9eee8_46e2_401c_87f7_8b40d9d6260e + import_0343eb12_592e_4fd0_8380_51f4d62b6a56 + indicator_18ba18bf_0390_45a3_8edd_1cc049e8a251 + layername_1b984aea_510b_4f33_b961_7b83868d7ee3 + observation_bcc90162_47c8_4097_bc24_a31af92d2708 + project_f42a5660_8aba_49f5_a9e7_92abb64e339e + project_view_c10ae5f5_e011_4223_a08c_903108ad41d2 + protocol_5507f1c8_1802_4df0_a273_8e9b7f52c352 + r_graph_edge_f2eb47e9_728b_4c85_a839_3b488e132e06 + r_indicator_node_2ca83116_e69f_4dcb_abcb_de5bdf44b2be + series_04a7414a_ab6d_4611_8a60_bcd22071dc22 + spatial_layer_18215d6d_1f4c_40d2_ba83_f2c9a9694e84 + + + 8 + 8 + 8 + 8 + 8 + 8 + 8 + 8 + 8 + 8 + 8 + 8 + 8 + 8 + 8 + 8 + 8 + 8 + 8 + 8 + 8 + 8 + 8 + 8 + 8 + + + + + + + + None + false + + + + + + 1 + + -20037508.34279999881982803 + -20037508.34279999881982803 + 20037508.34279999881982803 + 20037508.34279999881982803 + + false + conditions unknown + 90 + + + + 1 + + 8 + false + + + + false + + false + G-Obs administration + 0 + + false + + + + + + + + false + + + + + false + + 5000 + + + + false + + + + + + 10 + + 1024 + singleLayer + 0 + + online + 0 + 0 + + + false + None + folder + /tmp/qgis2web + Canvas extent + false + false + None + false + 28 + None + false + 1 + maintain + false + + false + + #f8f8f8 + #000000 + openlayers + + + + + + + + + + + + + + + + + + + + + + + + + + + + mdouchin + 2019-04-12T09:32:17 + + + + + + + + + + PROJCRS["WGS 84 / Pseudo-Mercator",BASEGEOGCRS["WGS 84",ENSEMBLE["World Geodetic System 1984 ensemble",MEMBER["World Geodetic System 1984 (Transit)"],MEMBER["World Geodetic System 1984 (G730)"],MEMBER["World Geodetic System 1984 (G873)"],MEMBER["World Geodetic System 1984 (G1150)"],MEMBER["World Geodetic System 1984 (G1674)"],MEMBER["World Geodetic System 1984 (G1762)"],MEMBER["World Geodetic System 1984 (G2139)"],ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[2.0]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],ID["EPSG",4326]],CONVERSION["Popular Visualisation Pseudo-Mercator",METHOD["Popular Visualisation Pseudo Mercator",ID["EPSG",1024]],PARAMETER["Latitude of natural origin",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8801]],PARAMETER["Longitude of natural origin",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8802]],PARAMETER["False easting",0,LENGTHUNIT["metre",1],ID["EPSG",8806]],PARAMETER["False northing",0,LENGTHUNIT["metre",1],ID["EPSG",8807]]],CS[Cartesian,2],AXIS["easting (X)",east,ORDER[1],LENGTHUNIT["metre",1]],AXIS["northing (Y)",north,ORDER[2],LENGTHUNIT["metre",1]],USAGE[SCOPE["Web mapping and visualisation."],AREA["World between 85.06°S and 85.06°N."],BBOX[-85.06,-180,85.06,180]],ID["EPSG",3857]] + +proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +wktext +no_defs + 3857 + 3857 + EPSG:3857 + WGS 84 / Pseudo-Mercator + merc + EPSG:7030 + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GEOGCRS["WGS 84",ENSEMBLE["World Geodetic System 1984 ensemble",MEMBER["World Geodetic System 1984 (Transit)"],MEMBER["World Geodetic System 1984 (G730)"],MEMBER["World Geodetic System 1984 (G873)"],MEMBER["World Geodetic System 1984 (G1150)"],MEMBER["World Geodetic System 1984 (G1674)"],MEMBER["World Geodetic System 1984 (G1762)"],MEMBER["World Geodetic System 1984 (G2139)"],ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[2.0]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["geodetic latitude (Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["geodetic longitude (Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],USAGE[SCOPE["Horizontal component of 3D system."],AREA["World."],BBOX[-90,-180,90,180]],ID["EPSG",4326]] + +proj=longlat +datum=WGS84 +no_defs + 3452 + 4326 + EPSG:4326 + WGS 84 + longlat + EPSG:7030 + true + + + + \ No newline at end of file diff --git a/tests/lizmap/instances/tests/gobs_administration.qgs.cfg b/tests/lizmap/instances/tests/gobs_administration.qgs.cfg new file mode 100644 index 0000000..199e4ce --- /dev/null +++ b/tests/lizmap/instances/tests/gobs_administration.qgs.cfg @@ -0,0 +1,1169 @@ +{ + "metadata": { + "qgis_desktop_version": 32814, + "lizmap_plugin_version_str": "4.2.2", + "lizmap_plugin_version": 40202, + "lizmap_web_client_target_version": 30500, + "lizmap_web_client_target_status": "Retired", + "instance_target_url": "http://localhost:9095/" + }, + "warnings": { + "ogc_validity": 1 + }, + "options": { + "projection": { + "proj4": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +wktext +no_defs", + "ref": "EPSG:3857" + }, + "bbox": [ + "-20037508.34279999881982803", + "-20037508.34279999881982803", + "20037508.34279999881982803", + "20037508.34279999881982803" + ], + "mapScales": [ + 10000, + 25000, + 50000, + 100000, + 250000, + 500000, + 1000000, + 2500000, + 5000000, + 10000000, + 25000000, + 50000000 + ], + "minScale": 10000, + "maxScale": 50000000, + "use_native_zoom_levels": false, + "hide_numeric_scale_value": true, + "acl": [ + "admins" + ], + "initialExtent": [ + -12790955.3192, + -11332755.366, + 15012367.7602, + 19439234.816 + ], + "popupLocation": "dock", + "pointTolerance": 25, + "lineTolerance": 10, + "polygonTolerance": 5, + "tmTimeFrameSize": 10, + "tmTimeFrameType": "seconds", + "tmAnimationFrameLength": 1000, + "datavizLocation": "dock", + "theme": "dark", + "fixed_scale_overview_map": true, + "dataviz_drag_drop": [] + }, + "layers": { + "Tests": { + "id": "Tests", + "name": "Tests", + "type": "group", + "title": "Tests", + "abstract": "", + "link": "", + "minScale": 1, + "maxScale": 1000000000000, + "toggled": "True", + "popup": "False", + "popupSource": "auto", + "popupTemplate": "", + "popupMaxFeatures": 10, + "popupDisplayChildren": "False", + "popup_allow_download": true, + "noLegendImage": "False", + "groupAsLayer": "False", + "baseLayer": "False", + "displayInLegend": "True", + "group_visibility": [], + "singleTile": "True", + "imageFormat": "image/png", + "cached": "False", + "clientCacheExpiration": 300 + }, + "Source data": { + "id": "Source data", + "name": "Source data", + "type": "group", + "title": "Source data", + "abstract": "", + "link": "", + "minScale": 1, + "maxScale": 1000000000000, + "toggled": "True", + "popup": "False", + "popupSource": "auto", + "popupTemplate": "", + "popupMaxFeatures": 10, + "popupDisplayChildren": "False", + "popup_allow_download": true, + "noLegendImage": "False", + "groupAsLayer": "False", + "baseLayer": "False", + "displayInLegend": "True", + "group_visibility": [], + "singleTile": "True", + "imageFormat": "image/png", + "cached": "False", + "clientCacheExpiration": 300 + }, + "Management": { + "id": "Management", + "name": "Management", + "type": "group", + "title": "Management", + "abstract": "", + "link": "", + "minScale": 1, + "maxScale": 1000000000000, + "toggled": "True", + "popup": "False", + "popupSource": "auto", + "popupTemplate": "", + "popupMaxFeatures": 10, + "popupDisplayChildren": "False", + "popup_allow_download": true, + "noLegendImage": "False", + "groupAsLayer": "False", + "baseLayer": "False", + "displayInLegend": "True", + "group_visibility": [], + "singleTile": "True", + "imageFormat": "image/png", + "cached": "False", + "clientCacheExpiration": 300 + }, + "List of series": { + "id": "layername_1b984aea_510b_4f33_b961_7b83868d7ee3", + "name": "List of series", + "type": "layer", + "geometryType": "none", + "extent": [ + 1.7976931348623157e+308, + 1.7976931348623157e+308, + -1.7976931348623157e+308, + -1.7976931348623157e+308 + ], + "crs": "", + "title": "List of series", + "abstract": "", + "link": "", + "minScale": 1, + "maxScale": 1000000000000, + "toggled": "False", + "popup": "False", + "popupSource": "auto", + "popupTemplate": "", + "popupMaxFeatures": 10, + "popupDisplayChildren": "False", + "popup_allow_download": true, + "noLegendImage": "False", + "groupAsLayer": "False", + "baseLayer": "False", + "displayInLegend": "True", + "group_visibility": [], + "singleTile": "True", + "imageFormat": "image/png", + "cached": "False", + "clientCacheExpiration": 300 + }, + "Metadata (administrator can edit)": { + "id": "Metadata (administrator can edit)", + "name": "Metadata (administrator can edit)", + "type": "group", + "title": "Metadata (administrator can edit)", + "abstract": "", + "link": "", + "minScale": 1, + "maxScale": 1000000000000, + "toggled": "True", + "popup": "False", + "popupSource": "auto", + "popupTemplate": "", + "popupMaxFeatures": 10, + "popupDisplayChildren": "False", + "popup_allow_download": true, + "noLegendImage": "False", + "groupAsLayer": "False", + "baseLayer": "False", + "displayInLegend": "True", + "group_visibility": [], + "singleTile": "True", + "imageFormat": "image/png", + "cached": "False", + "clientCacheExpiration": 300 + }, + "actor_category": { + "id": "actor_category_8a7edcf8_cb34_4689_b22b_7a8a6a2ab610", + "name": "actor_category", + "type": "layer", + "geometryType": "none", + "extent": [ + 1.7976931348623157e+308, + 1.7976931348623157e+308, + -1.7976931348623157e+308, + -1.7976931348623157e+308 + ], + "crs": "", + "title": "actor_category", + "abstract": "", + "link": "", + "minScale": 1, + "maxScale": 1000000000000, + "toggled": "False", + "popup": "False", + "popupSource": "auto", + "popupTemplate": "", + "popupMaxFeatures": 10, + "popupDisplayChildren": "False", + "popup_allow_download": true, + "noLegendImage": "False", + "groupAsLayer": "False", + "baseLayer": "False", + "displayInLegend": "True", + "group_visibility": [], + "singleTile": "True", + "imageFormat": "image/png", + "cached": "False", + "clientCacheExpiration": 300 + }, + "actor": { + "id": "actor_5f01a6e5_8205_462f_af40_0ffd7ff0a44f", + "name": "actor", + "type": "layer", + "geometryType": "none", + "extent": [ + 1.7976931348623157e+308, + 1.7976931348623157e+308, + -1.7976931348623157e+308, + -1.7976931348623157e+308 + ], + "crs": "", + "title": "actor", + "abstract": "", + "link": "", + "minScale": 1, + "maxScale": 1000000000000, + "toggled": "False", + "popup": "False", + "popupSource": "auto", + "popupTemplate": "", + "popupMaxFeatures": 10, + "popupDisplayChildren": "False", + "popup_allow_download": true, + "noLegendImage": "False", + "groupAsLayer": "False", + "baseLayer": "False", + "displayInLegend": "True", + "group_visibility": [], + "singleTile": "True", + "imageFormat": "image/png", + "cached": "False", + "clientCacheExpiration": 300 + }, + "spatial_layer": { + "id": "spatial_layer_18215d6d_1f4c_40d2_ba83_f2c9a9694e84", + "name": "spatial_layer", + "type": "layer", + "geometryType": "none", + "extent": [ + 1.7976931348623157e+308, + 1.7976931348623157e+308, + -1.7976931348623157e+308, + -1.7976931348623157e+308 + ], + "crs": "", + "title": "spatial_layer", + "abstract": "", + "link": "", + "minScale": 1, + "maxScale": 1000000000000, + "toggled": "False", + "popup": "False", + "popupSource": "auto", + "popupTemplate": "", + "popupMaxFeatures": 10, + "popupDisplayChildren": "False", + "popup_allow_download": true, + "noLegendImage": "False", + "groupAsLayer": "False", + "baseLayer": "False", + "displayInLegend": "True", + "group_visibility": [], + "singleTile": "True", + "imageFormat": "image/png", + "cached": "False", + "clientCacheExpiration": 300 + }, + "indicators": { + "id": "indicator_18ba18bf_0390_45a3_8edd_1cc049e8a251", + "name": "indicators", + "type": "layer", + "geometryType": "none", + "extent": [ + 1.7976931348623157e+308, + 1.7976931348623157e+308, + -1.7976931348623157e+308, + -1.7976931348623157e+308 + ], + "crs": "", + "title": "indicators", + "abstract": "", + "link": "", + "minScale": 1, + "maxScale": 1000000000000, + "toggled": "False", + "popup": "False", + "popupSource": "auto", + "popupTemplate": "", + "popupMaxFeatures": 10, + "popupDisplayChildren": "False", + "popup_allow_download": true, + "noLegendImage": "False", + "groupAsLayer": "False", + "baseLayer": "False", + "displayInLegend": "True", + "group_visibility": [], + "singleTile": "True", + "imageFormat": "image/png", + "cached": "False", + "clientCacheExpiration": 300 + }, + "indicator dimensions": { + "id": "dimension_962da0f3_0cfc_479f_b23f_bbc23496c9ee", + "name": "indicator dimensions", + "type": "layer", + "geometryType": "none", + "extent": [ + 1.7976931348623157e+308, + 1.7976931348623157e+308, + -1.7976931348623157e+308, + -1.7976931348623157e+308 + ], + "crs": "", + "title": "indicator dimensions", + "abstract": "", + "link": "", + "minScale": 1, + "maxScale": 1000000000000, + "toggled": "False", + "popup": "False", + "popupSource": "auto", + "popupTemplate": "", + "popupMaxFeatures": 10, + "popupDisplayChildren": "False", + "popup_allow_download": true, + "noLegendImage": "False", + "groupAsLayer": "False", + "baseLayer": "False", + "displayInLegend": "True", + "group_visibility": [], + "singleTile": "True", + "imageFormat": "image/png", + "cached": "False", + "clientCacheExpiration": 300 + }, + "document": { + "id": "document_3f322924_735f_4bef_b903_9521d2f25444", + "name": "document", + "type": "layer", + "geometryType": "none", + "extent": [ + 1.7976931348623157e+308, + 1.7976931348623157e+308, + -1.7976931348623157e+308, + -1.7976931348623157e+308 + ], + "crs": "", + "title": "document", + "abstract": "", + "link": "", + "minScale": 1, + "maxScale": 1000000000000, + "toggled": "False", + "popup": "False", + "popupSource": "auto", + "popupTemplate": "", + "popupMaxFeatures": 10, + "popupDisplayChildren": "False", + "popup_allow_download": true, + "noLegendImage": "False", + "groupAsLayer": "False", + "baseLayer": "False", + "displayInLegend": "True", + "group_visibility": [], + "singleTile": "True", + "imageFormat": "image/png", + "cached": "False", + "clientCacheExpiration": 300 + }, + "protocol": { + "id": "protocol_5507f1c8_1802_4df0_a273_8e9b7f52c352", + "name": "protocol", + "type": "layer", + "geometryType": "none", + "extent": [ + 1.7976931348623157e+308, + 1.7976931348623157e+308, + -1.7976931348623157e+308, + -1.7976931348623157e+308 + ], + "crs": "", + "title": "protocol", + "abstract": "", + "link": "", + "minScale": 1, + "maxScale": 1000000000000, + "toggled": "False", + "popup": "False", + "popupSource": "auto", + "popupTemplate": "", + "popupMaxFeatures": 10, + "popupDisplayChildren": "False", + "popup_allow_download": true, + "noLegendImage": "False", + "groupAsLayer": "False", + "baseLayer": "False", + "displayInLegend": "True", + "group_visibility": [], + "singleTile": "True", + "imageFormat": "image/png", + "cached": "False", + "clientCacheExpiration": 300 + }, + "series": { + "id": "series_04a7414a_ab6d_4611_8a60_bcd22071dc22", + "name": "series", + "type": "layer", + "geometryType": "none", + "extent": [ + 1.7976931348623157e+308, + 1.7976931348623157e+308, + -1.7976931348623157e+308, + -1.7976931348623157e+308 + ], + "crs": "", + "title": "series", + "abstract": "", + "link": "", + "minScale": 1, + "maxScale": 1000000000000, + "toggled": "False", + "popup": "False", + "popupSource": "auto", + "popupTemplate": "", + "popupMaxFeatures": 10, + "popupDisplayChildren": "False", + "popup_allow_download": true, + "noLegendImage": "False", + "groupAsLayer": "False", + "baseLayer": "False", + "displayInLegend": "True", + "group_visibility": [], + "singleTile": "True", + "imageFormat": "image/png", + "cached": "False", + "clientCacheExpiration": 300 + }, + "application": { + "id": "application_a455f2b7_b92d_413b_bb50_b9777b274f84", + "name": "application", + "type": "layer", + "geometryType": "none", + "extent": [ + 1.7976931348623157e+308, + 1.7976931348623157e+308, + -1.7976931348623157e+308, + -1.7976931348623157e+308 + ], + "crs": "", + "title": "application", + "abstract": "", + "link": "", + "minScale": 1, + "maxScale": 1000000000000, + "toggled": "False", + "popup": "False", + "popupSource": "auto", + "popupTemplate": "", + "popupMaxFeatures": 10, + "popupDisplayChildren": "False", + "popup_allow_download": true, + "noLegendImage": "False", + "groupAsLayer": "False", + "baseLayer": "False", + "displayInLegend": "True", + "group_visibility": [], + "singleTile": "True", + "imageFormat": "image/png", + "cached": "False", + "clientCacheExpiration": 300 + }, + "project": { + "id": "project_f42a5660_8aba_49f5_a9e7_92abb64e339e", + "name": "project", + "type": "layer", + "geometryType": "none", + "extent": [ + 1.7976931348623157e+308, + 1.7976931348623157e+308, + -1.7976931348623157e+308, + -1.7976931348623157e+308 + ], + "crs": "", + "title": "project", + "abstract": "", + "link": "", + "minScale": 1, + "maxScale": 1000000000000, + "toggled": "False", + "popup": "False", + "popupSource": "auto", + "popupTemplate": "", + "popupMaxFeatures": 10, + "popupDisplayChildren": "False", + "popup_allow_download": true, + "noLegendImage": "False", + "groupAsLayer": "False", + "baseLayer": "False", + "displayInLegend": "True", + "group_visibility": [], + "singleTile": "True", + "imageFormat": "image/png", + "cached": "False", + "clientCacheExpiration": 300 + }, + "project_view": { + "id": "project_view_c10ae5f5_e011_4223_a08c_903108ad41d2", + "name": "project_view", + "type": "layer", + "geometryType": "polygon", + "extent": [ + -3.94945320764943, + 48.3393122914632, + -3.6011219343547, + 48.573534781572 + ], + "crs": "EPSG:4326", + "title": "project_view", + "abstract": "", + "link": "", + "minScale": 1, + "maxScale": 1000000000000, + "toggled": "True", + "popup": "False", + "popupSource": "auto", + "popupTemplate": "", + "popupMaxFeatures": 10, + "popupDisplayChildren": "False", + "popup_allow_download": true, + "noLegendImage": "False", + "groupAsLayer": "False", + "baseLayer": "False", + "displayInLegend": "True", + "group_visibility": [], + "singleTile": "True", + "imageFormat": "image/png", + "cached": "False", + "clientCacheExpiration": 300 + }, + "Data (do not edit)": { + "id": "Data (do not edit)", + "name": "Data (do not edit)", + "type": "group", + "title": "Data (do not edit)", + "abstract": "", + "link": "", + "minScale": 1, + "maxScale": 1000000000000, + "toggled": "True", + "popup": "False", + "popupSource": "auto", + "popupTemplate": "", + "popupMaxFeatures": 10, + "popupDisplayChildren": "False", + "popup_allow_download": true, + "noLegendImage": "False", + "groupAsLayer": "False", + "baseLayer": "False", + "displayInLegend": "True", + "group_visibility": [], + "singleTile": "True", + "imageFormat": "image/png", + "cached": "False", + "clientCacheExpiration": 300 + }, + "observation": { + "id": "observation_bcc90162_47c8_4097_bc24_a31af92d2708", + "name": "observation", + "type": "layer", + "geometryType": "none", + "extent": [ + 1.7976931348623157e+308, + 1.7976931348623157e+308, + -1.7976931348623157e+308, + -1.7976931348623157e+308 + ], + "crs": "", + "title": "observation", + "abstract": "", + "link": "", + "minScale": 1, + "maxScale": 1000000000000, + "toggled": "False", + "popup": "False", + "popupSource": "auto", + "popupTemplate": "", + "popupMaxFeatures": 10, + "popupDisplayChildren": "False", + "popup_allow_download": true, + "noLegendImage": "False", + "groupAsLayer": "False", + "baseLayer": "False", + "displayInLegend": "True", + "group_visibility": [], + "singleTile": "True", + "imageFormat": "image/png", + "cached": "False", + "clientCacheExpiration": 300 + }, + "r_indicator_node": { + "id": "r_indicator_node_2ca83116_e69f_4dcb_abcb_de5bdf44b2be", + "name": "r_indicator_node", + "type": "layer", + "geometryType": "none", + "extent": [ + 1.7976931348623157e+308, + 1.7976931348623157e+308, + -1.7976931348623157e+308, + -1.7976931348623157e+308 + ], + "crs": "", + "title": "r_indicator_node", + "abstract": "", + "link": "", + "minScale": 1, + "maxScale": 1000000000000, + "toggled": "False", + "popup": "False", + "popupSource": "auto", + "popupTemplate": "", + "popupMaxFeatures": 10, + "popupDisplayChildren": "False", + "popup_allow_download": true, + "noLegendImage": "False", + "groupAsLayer": "False", + "baseLayer": "False", + "displayInLegend": "True", + "group_visibility": [], + "singleTile": "True", + "imageFormat": "image/png", + "cached": "False", + "clientCacheExpiration": 300 + }, + "r_graph_edge": { + "id": "r_graph_edge_f2eb47e9_728b_4c85_a839_3b488e132e06", + "name": "r_graph_edge", + "type": "layer", + "geometryType": "none", + "extent": [ + 1.7976931348623157e+308, + 1.7976931348623157e+308, + -1.7976931348623157e+308, + -1.7976931348623157e+308 + ], + "crs": "", + "title": "r_graph_edge", + "abstract": "", + "link": "", + "minScale": 1, + "maxScale": 1000000000000, + "toggled": "False", + "popup": "False", + "popupSource": "auto", + "popupTemplate": "", + "popupMaxFeatures": 10, + "popupDisplayChildren": "False", + "popup_allow_download": true, + "noLegendImage": "False", + "groupAsLayer": "False", + "baseLayer": "False", + "displayInLegend": "True", + "group_visibility": [], + "singleTile": "True", + "imageFormat": "image/png", + "cached": "False", + "clientCacheExpiration": 300 + }, + "import": { + "id": "import_0343eb12_592e_4fd0_8380_51f4d62b6a56", + "name": "import", + "type": "layer", + "geometryType": "none", + "extent": [ + 1.7976931348623157e+308, + 1.7976931348623157e+308, + -1.7976931348623157e+308, + -1.7976931348623157e+308 + ], + "crs": "", + "title": "import", + "abstract": "", + "link": "", + "minScale": 1, + "maxScale": 1000000000000, + "toggled": "False", + "popup": "False", + "popupSource": "auto", + "popupTemplate": "", + "popupMaxFeatures": 10, + "popupDisplayChildren": "False", + "popup_allow_download": true, + "noLegendImage": "False", + "groupAsLayer": "False", + "baseLayer": "False", + "displayInLegend": "True", + "group_visibility": [], + "singleTile": "True", + "imageFormat": "image/png", + "cached": "False", + "clientCacheExpiration": 300 + }, + "graph_node": { + "id": "graph_node_2cd9eee8_46e2_401c_87f7_8b40d9d6260e", + "name": "graph_node", + "type": "layer", + "geometryType": "none", + "extent": [ + 1.7976931348623157e+308, + 1.7976931348623157e+308, + -1.7976931348623157e+308, + -1.7976931348623157e+308 + ], + "crs": "", + "title": "graph_node", + "abstract": "", + "link": "", + "minScale": 1, + "maxScale": 1000000000000, + "toggled": "False", + "popup": "False", + "popupSource": "auto", + "popupTemplate": "", + "popupMaxFeatures": 10, + "popupDisplayChildren": "False", + "popup_allow_download": true, + "noLegendImage": "False", + "groupAsLayer": "False", + "baseLayer": "False", + "displayInLegend": "True", + "group_visibility": [], + "singleTile": "True", + "imageFormat": "image/png", + "cached": "False", + "clientCacheExpiration": 300 + }, + "glossary": { + "id": "glossary_cee356e0_5be5_4d87_ac2b_e8e8967c4032", + "name": "glossary", + "type": "layer", + "geometryType": "none", + "extent": [ + 1.7976931348623157e+308, + 1.7976931348623157e+308, + -1.7976931348623157e+308, + -1.7976931348623157e+308 + ], + "crs": "", + "title": "glossary", + "abstract": "", + "link": "", + "minScale": 1, + "maxScale": 1000000000000, + "toggled": "False", + "popup": "False", + "popupSource": "auto", + "popupTemplate": "", + "popupMaxFeatures": 10, + "popupDisplayChildren": "False", + "popup_allow_download": true, + "noLegendImage": "False", + "groupAsLayer": "False", + "baseLayer": "False", + "displayInLegend": "True", + "group_visibility": [], + "singleTile": "True", + "imageFormat": "image/png", + "cached": "False", + "clientCacheExpiration": 300 + }, + "osm-mapnik": { + "id": "osm_mapnik_73cc9876_fa44_4742_bc09_afe572b57bbe", + "name": "osm-mapnik", + "type": "layer", + "extent": [ + -20037508.342789244, + -20037508.342789248, + 20037508.342789244, + 20037508.342789248 + ], + "crs": "EPSG:3857", + "title": "osm-mapnik", + "abstract": "", + "link": "", + "minScale": 1, + "maxScale": 1000000000000, + "toggled": "True", + "popup": "False", + "popupSource": "auto", + "popupTemplate": "", + "popupMaxFeatures": 10, + "popupDisplayChildren": "False", + "popup_allow_download": true, + "noLegendImage": "False", + "groupAsLayer": "False", + "baseLayer": "False", + "displayInLegend": "True", + "group_visibility": [], + "singleTile": "True", + "imageFormat": "image/png", + "cached": "False", + "clientCacheExpiration": 300 + } + }, + "atlas": { + "layers": [] + }, + "locateByLayer": {}, + "attributeLayers": { + "actor": { + "layerId": "actor_5f01a6e5_8205_462f_af40_0ffd7ff0a44f", + "primaryKey": "id", + "pivot": "False", + "hideAsChild": "False", + "hideLayer": "False", + "custom_config": "True", + "order": 0 + }, + "actor_category": { + "layerId": "actor_category_8a7edcf8_cb34_4689_b22b_7a8a6a2ab610", + "primaryKey": "id", + "pivot": "False", + "hideAsChild": "False", + "hideLayer": "False", + "custom_config": "False", + "order": 1 + }, + "spatial_layer": { + "layerId": "spatial_layer_18215d6d_1f4c_40d2_ba83_f2c9a9694e84", + "primaryKey": "id", + "pivot": "False", + "hideAsChild": "False", + "hideLayer": "False", + "custom_config": "True", + "order": 2 + }, + "indicators": { + "layerId": "indicator_18ba18bf_0390_45a3_8edd_1cc049e8a251", + "primaryKey": "id", + "pivot": "False", + "hideAsChild": "False", + "hideLayer": "False", + "custom_config": "True", + "order": 3 + }, + "indicator dimensions": { + "layerId": "dimension_962da0f3_0cfc_479f_b23f_bbc23496c9ee", + "primaryKey": "id", + "pivot": "False", + "hideAsChild": "False", + "hideLayer": "False", + "custom_config": "False", + "order": 4 + }, + "document": { + "layerId": "document_3f322924_735f_4bef_b903_9521d2f25444", + "primaryKey": "id", + "pivot": "False", + "hideAsChild": "False", + "hideLayer": "False", + "custom_config": "False", + "order": 5 + }, + "protocol": { + "layerId": "protocol_5507f1c8_1802_4df0_a273_8e9b7f52c352", + "primaryKey": "id", + "pivot": "False", + "hideAsChild": "False", + "hideLayer": "False", + "custom_config": "False", + "order": 6 + }, + "series": { + "layerId": "series_04a7414a_ab6d_4611_8a60_bcd22071dc22", + "primaryKey": "id", + "pivot": "False", + "hideAsChild": "False", + "hideLayer": "False", + "custom_config": "False", + "order": 7 + }, + "application": { + "layerId": "application_a455f2b7_b92d_413b_bb50_b9777b274f84", + "primaryKey": "id", + "pivot": "False", + "hideAsChild": "False", + "hideLayer": "False", + "custom_config": "False", + "order": 8 + }, + "project": { + "layerId": "project_f42a5660_8aba_49f5_a9e7_92abb64e339e", + "primaryKey": "id", + "pivot": "False", + "hideAsChild": "False", + "hideLayer": "False", + "custom_config": "False", + "order": 9 + }, + "project_view": { + "layerId": "project_view_c10ae5f5_e011_4223_a08c_903108ad41d2", + "primaryKey": "id", + "pivot": "False", + "hideAsChild": "False", + "hideLayer": "False", + "custom_config": "False", + "order": 10 + } + }, + "tooltipLayers": {}, + "editionLayers": { + "actor": { + "layerId": "actor_5f01a6e5_8205_462f_af40_0ffd7ff0a44f", + "snap_vertices": "False", + "snap_segments": "False", + "snap_intersections": "False", + "snap_vertices_tolerance": 10, + "snap_segments_tolerance": 10, + "snap_intersections_tolerance": 10, + "provider": "postgres", + "capabilities": { + "createFeature": "True", + "allow_without_geom": "False", + "modifyAttribute": "True", + "modifyGeometry": "False", + "deleteFeature": "True" + }, + "geometryType": "none", + "order": 0 + }, + "actor_category": { + "layerId": "actor_category_8a7edcf8_cb34_4689_b22b_7a8a6a2ab610", + "snap_vertices": "False", + "snap_segments": "False", + "snap_intersections": "False", + "snap_vertices_tolerance": 10, + "snap_segments_tolerance": 10, + "snap_intersections_tolerance": 10, + "provider": "postgres", + "capabilities": { + "createFeature": "True", + "allow_without_geom": "False", + "modifyAttribute": "True", + "modifyGeometry": "False", + "deleteFeature": "True" + }, + "geometryType": "none", + "order": 1 + }, + "spatial_layer": { + "layerId": "spatial_layer_18215d6d_1f4c_40d2_ba83_f2c9a9694e84", + "snap_vertices": "False", + "snap_segments": "False", + "snap_intersections": "False", + "snap_vertices_tolerance": 10, + "snap_segments_tolerance": 10, + "snap_intersections_tolerance": 10, + "provider": "postgres", + "capabilities": { + "createFeature": "True", + "allow_without_geom": "False", + "modifyAttribute": "True", + "modifyGeometry": "False", + "deleteFeature": "True" + }, + "geometryType": "none", + "order": 2 + }, + "indicators": { + "layerId": "indicator_18ba18bf_0390_45a3_8edd_1cc049e8a251", + "snap_vertices": "False", + "snap_segments": "False", + "snap_intersections": "False", + "snap_vertices_tolerance": 10, + "snap_segments_tolerance": 10, + "snap_intersections_tolerance": 10, + "provider": "postgres", + "capabilities": { + "createFeature": "True", + "allow_without_geom": "False", + "modifyAttribute": "True", + "modifyGeometry": "False", + "deleteFeature": "True" + }, + "geometryType": "none", + "order": 3 + }, + "indicator dimensions": { + "layerId": "dimension_962da0f3_0cfc_479f_b23f_bbc23496c9ee", + "snap_vertices": "False", + "snap_segments": "False", + "snap_intersections": "False", + "snap_vertices_tolerance": 10, + "snap_segments_tolerance": 10, + "snap_intersections_tolerance": 10, + "provider": "postgres", + "capabilities": { + "createFeature": "True", + "allow_without_geom": "False", + "modifyAttribute": "True", + "modifyGeometry": "False", + "deleteFeature": "True" + }, + "geometryType": "none", + "order": 4 + }, + "document": { + "layerId": "document_3f322924_735f_4bef_b903_9521d2f25444", + "snap_vertices": "False", + "snap_segments": "False", + "snap_intersections": "False", + "snap_vertices_tolerance": 10, + "snap_segments_tolerance": 10, + "snap_intersections_tolerance": 10, + "provider": "postgres", + "capabilities": { + "createFeature": "True", + "allow_without_geom": "False", + "modifyAttribute": "True", + "modifyGeometry": "False", + "deleteFeature": "True" + }, + "geometryType": "none", + "order": 5 + }, + "protocol": { + "layerId": "protocol_5507f1c8_1802_4df0_a273_8e9b7f52c352", + "snap_vertices": "False", + "snap_segments": "False", + "snap_intersections": "False", + "snap_vertices_tolerance": 10, + "snap_segments_tolerance": 10, + "snap_intersections_tolerance": 10, + "provider": "postgres", + "capabilities": { + "createFeature": "True", + "allow_without_geom": "False", + "modifyAttribute": "True", + "modifyGeometry": "False", + "deleteFeature": "True" + }, + "geometryType": "none", + "order": 6 + }, + "series": { + "layerId": "series_04a7414a_ab6d_4611_8a60_bcd22071dc22", + "snap_vertices": "False", + "snap_segments": "False", + "snap_intersections": "False", + "snap_vertices_tolerance": 10, + "snap_segments_tolerance": 10, + "snap_intersections_tolerance": 10, + "provider": "postgres", + "capabilities": { + "createFeature": "True", + "allow_without_geom": "False", + "modifyAttribute": "True", + "modifyGeometry": "False", + "deleteFeature": "True" + }, + "geometryType": "none", + "order": 7 + }, + "application": { + "layerId": "application_a455f2b7_b92d_413b_bb50_b9777b274f84", + "snap_vertices": "False", + "snap_segments": "False", + "snap_intersections": "False", + "snap_vertices_tolerance": 10, + "snap_segments_tolerance": 10, + "snap_intersections_tolerance": 10, + "provider": "postgres", + "capabilities": { + "createFeature": "True", + "allow_without_geom": "False", + "modifyAttribute": "True", + "modifyGeometry": "False", + "deleteFeature": "True" + }, + "geometryType": "none", + "order": 8 + }, + "project": { + "layerId": "project_f42a5660_8aba_49f5_a9e7_92abb64e339e", + "snap_vertices": "False", + "snap_segments": "False", + "snap_intersections": "False", + "snap_vertices_tolerance": 10, + "snap_segments_tolerance": 10, + "snap_intersections_tolerance": 10, + "provider": "postgres", + "capabilities": { + "createFeature": "True", + "allow_without_geom": "False", + "modifyAttribute": "True", + "modifyGeometry": "False", + "deleteFeature": "True" + }, + "geometryType": "none", + "order": 9 + }, + "project_view": { + "layerId": "project_view_c10ae5f5_e011_4223_a08c_903108ad41d2", + "snap_vertices": "False", + "snap_segments": "False", + "snap_intersections": "False", + "snap_vertices_tolerance": 10, + "snap_segments_tolerance": 10, + "snap_intersections_tolerance": 10, + "provider": "postgres", + "capabilities": { + "createFeature": "True", + "allow_without_geom": "False", + "modifyAttribute": "True", + "modifyGeometry": "True", + "deleteFeature": "True" + }, + "geometryType": "polygon", + "order": 10 + } + }, + "loginFilteredLayers": {}, + "timemanagerLayers": {}, + "datavizLayers": {}, + "filter_by_polygon": { + "config": { + "polygon_layer_id": "project_view_c10ae5f5_e011_4223_a08c_903108ad41d2", + "group_field": "id", + "filter_by_user": false + }, + "layers": [] + }, + "formFilterLayers": {} +} diff --git a/tests/lizmap/instances/tests/gobs_administration_attachments.zip b/tests/lizmap/instances/tests/gobs_administration_attachments.zip new file mode 100644 index 0000000000000000000000000000000000000000..66c509835a87913b02e2f5befa015e0e1c5e56db GIT binary patch literal 1992 zcmWIWW@Zs#U}E54xKX1QzGT0lQZ6$C1495Kg8-1q$_nyutBfx$smw_&)=Noxd(+on z*iquZ$JoZ$Uvc*~DSAXaVwCFieR||z!cktwO2M4w2@;#Ocpu!dWlQ(Uk6X<5_jHyg zKf1d0`YLs8^sK1c#+xji z&!^7Mm8#la`*F>R{G8`KrOE#FTeokVde{0wycE0l^R%OvijU2{6SO%fPdrFmc-1to zljqiOd|Fr(qpL5TyE()#``@i4_A}n!OL|@Ogmc&4$(Of(o;}<9-EAB5;P=NubMySl zDwf9qndE?b_eu9Bv3?0%i^5BLA}|MT*XpHJ>GGgOS< z@poI@BlGGvyJLc<3w~s;dlbF&ooUtcQ*Umso_GJ=jkD5oVOu= /dev/null && pwd ) + +# Delete the previous demo data +echo "=== Drop the existing demo schema and data" +psql service=lizmap-gobsapi -c "DROP SCHEMA IF EXISTS gobs CASCADE;" + +# Import data +echo "=== Add the gobs schema with test data" +psql service=lizmap-gobsapi -f "$SCRIPT_DIR"/test_data.sql diff --git a/tests/sql/test_data.sql b/tests/sql/test_data.sql index de42907..df77596 100644 --- a/tests/sql/test_data.sql +++ b/tests/sql/test_data.sql @@ -3,7 +3,7 @@ -- -- Dumped from database version 11.13 (Debian 11.13-1.pgdg100+1) --- Dumped by pg_dump version 14.8 (Ubuntu 14.8-0ubuntu0.22.04.1) +-- Dumped by pg_dump version 11.13 (Debian 11.13-1.pgdg100+1) SET statement_timeout = 0; SET lock_timeout = 0; @@ -23,34 +23,6 @@ SET row_security = off; CREATE SCHEMA gobs; --- --- Name: postgis; Type: EXTENSION; Schema: -; Owner: - --- - -CREATE EXTENSION IF NOT EXISTS postgis WITH SCHEMA public; - - --- --- Name: EXTENSION postgis; Type: COMMENT; Schema: -; Owner: - --- - -COMMENT ON EXTENSION postgis IS 'PostGIS geometry, geography, and raster spatial types and functions'; - - --- --- Name: uuid-ossp; Type: EXTENSION; Schema: -; Owner: - --- - -CREATE EXTENSION IF NOT EXISTS "uuid-ossp" WITH SCHEMA public; - - --- --- Name: EXTENSION "uuid-ossp"; Type: COMMENT; Schema: -; Owner: - --- - -COMMENT ON EXTENSION "uuid-ossp" IS 'generate universally unique identifiers (UUIDs)'; - - -- -- Name: find_observation_with_wrong_spatial_object(integer); Type: FUNCTION; Schema: gobs; Owner: - -- @@ -426,6 +398,8 @@ $$; SET default_tablespace = ''; +SET default_with_oids = false; + -- -- Name: actor; Type: TABLE; Schema: gobs; Owner: - -- @@ -7083,14 +7057,6 @@ COPY gobs.spatial_object (id, so_unique_id, so_unique_label, geom, fk_id_spatial \. --- --- Data for Name: spatial_ref_sys; Type: TABLE DATA; Schema: public; Owner: - --- - -COPY public.spatial_ref_sys (srid, auth_name, auth_srid, srtext, proj4text) FROM stdin; -\. - - -- -- Name: actor_category_id_seq; Type: SEQUENCE SET; Schema: gobs; Owner: - --