From 00788bc85dd09152c067ad0cbe326e925514fc87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Siffert?= Date: Sun, 28 Jun 2026 23:50:07 +0200 Subject: [PATCH] [CI] geospatial: satisfy pre-commit across all addons MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The migration branch was pushed directly (never via PR), so the pre-commit workflow — which only runs on pull_request events — had never gated it. Running `pre-commit run --all-files` surfaces the accumulated lint debt. This commit applies the fixes: - prettier (incl. plugin-xml) and eslint --fix autoformatting across base_geoengine / geoengine_swisstopo / geoengine_drone_ortho and BRANCHES.md - eslint no-use-before-define: reorder _doRegister() above ensureProjectionsRegistered() in geoengine_swisstopo proj4_setup - whool: add missing geoengine_tools/pyproject.toml - oca-gen-addon-readme: generate the missing README.rst / static/description for geoengine_drone_ortho, geoengine_drone_ortho_swisstopo, geoengine_swisstopo, geoengine_tools and refresh the stale ones Co-Authored-By: Claude Opus 4.8 --- BRANCHES.md | 172 +++---- .../field_geoengine_edit_map.esm.js | 4 +- geoengine_drone_ortho/README.rst | 87 ++++ .../static/description/index.html | 434 +++++++++++++++++ .../src/js/geoengine_renderer_patch.esm.js | 6 +- .../views/geo_raster_layer_view.xml | 6 +- geoengine_drone_ortho_swisstopo/README.rst | 89 ++++ .../static/description/index.html | 435 +++++++++++++++++ geoengine_swisstopo/README.rst | 52 +- .../static/description/index.html | 433 +++++++++++++++++ .../src/js/geoengine_renderer_patch.esm.js | 9 +- .../static/src/js/proj4_setup.esm.js | 28 +- geoengine_tools/README.rst | 109 ++++- geoengine_tools/pyproject.toml | 3 + geoengine_tools/static/description/index.html | 451 ++++++++++++++++++ .../src/js/geoengine_renderer_tools.esm.js | 3 +- 16 files changed, 2168 insertions(+), 153 deletions(-) create mode 100644 geoengine_drone_ortho/README.rst create mode 100644 geoengine_drone_ortho/static/description/index.html create mode 100644 geoengine_drone_ortho_swisstopo/README.rst create mode 100644 geoengine_drone_ortho_swisstopo/static/description/index.html create mode 100644 geoengine_swisstopo/static/description/index.html create mode 100644 geoengine_tools/pyproject.toml create mode 100644 geoengine_tools/static/description/index.html diff --git a/BRANCHES.md b/BRANCHES.md index aa2ec7ae5..500800282 100644 --- a/BRANCHES.md +++ b/BRANCHES.md @@ -1,27 +1,29 @@ # Gestion des branches — leNeo/geospatial > Documentation interne du workflow de contribution multi-modules vers OCA/geospatial. -> Dernière mise à jour : 2026-05-16 (ajout module pont `geoengine_drone_ortho_swisstopo`) +> Dernière mise à jour : 2026-05-16 (ajout module pont +> `geoengine_drone_ortho_swisstopo`) ## 1. Vue d'ensemble -Ce dépôt est un **fork** de [OCA/geospatial](https://github.com/OCA/geospatial). -Il contient plusieurs modules Odoo migrés vers la 19.0. La contribution à OCA suit la règle : +Ce dépôt est un **fork** de [OCA/geospatial](https://github.com/OCA/geospatial). Il +contient plusieurs modules Odoo migrés vers la 19.0. La contribution à OCA suit la règle +: > **1 PR = 1 module** -Pour respecter cette règle tout en gardant un environnement de développement -cohérent (où tous les modules cohabitent), on adopte un **workflow hybride**. +Pour respecter cette règle tout en gardant un environnement de développement cohérent +(où tous les modules cohabitent), on adopte un **workflow hybride**. ## 2. Architecture des branches -| Branche | Rôle | Contenu | Destination | -|---|---|---|---| -| `19.0-mig-base_geoengine` | **Branche de dev** (intégration) | Tous les modules ensemble | Jamais poussée vers OCA | -| `19.0` | OCA-ready — `base_geoengine` | base_geoengine seul | PR OCA #446 | -| `19.0-geoengine_swisstopo` | OCA-ready — `geoengine_swisstopo` | base_geoengine + swisstopo | Future PR OCA | -| `19.0-geoengine_drone_ortho` | OCA-ready — `geoengine_drone_ortho` | base_geoengine + drone_ortho | Future PR OCA | -| `19.0-geoengine_drone_ortho_swisstopo` | OCA-ready — **module pont** | base + swisstopo + drone_ortho + pont | Future PR OCA (après les 2 dépendances) | +| Branche | Rôle | Contenu | Destination | +| -------------------------------------- | ----------------------------------- | ------------------------------------- | --------------------------------------- | +| `19.0-mig-base_geoengine` | **Branche de dev** (intégration) | Tous les modules ensemble | Jamais poussée vers OCA | +| `19.0` | OCA-ready — `base_geoengine` | base_geoengine seul | PR OCA #446 | +| `19.0-geoengine_swisstopo` | OCA-ready — `geoengine_swisstopo` | base_geoengine + swisstopo | Future PR OCA | +| `19.0-geoengine_drone_ortho` | OCA-ready — `geoengine_drone_ortho` | base_geoengine + drone_ortho | Future PR OCA | +| `19.0-geoengine_drone_ortho_swisstopo` | OCA-ready — **module pont** | base + swisstopo + drone_ortho + pont | Future PR OCA (après les 2 dépendances) | ### Schéma @@ -54,7 +56,7 @@ refactor(base_geoengine): chargement dynamique des libs JS [ADD] geoengine_drone_ortho: module initial XYZ/TMS pour orthos drones ``` -**Règle d'or :** *1 commit ne touche qu'à 1 seul module* (sauf cas exceptionnel +**Règle d'or :** _1 commit ne touche qu'à 1 seul module_ (sauf cas exceptionnel documenté en message de commit). ## 4. Workflow quotidien @@ -88,9 +90,8 @@ git push origin 19.0 ### 4.3 Mettre à jour les branches OCA-ready des modules dépendants -Quand on modifie `base_geoengine`, il faut **propager** la mise à jour aux -branches `…_swisstopo-clean` et `…_drone_ortho`, qui contiennent toutes deux -`base_geoengine` : +Quand on modifie `base_geoengine`, il faut **propager** la mise à jour aux branches +`…_swisstopo-clean` et `…_drone_ortho`, qui contiennent toutes deux `base_geoengine` : ```bash git checkout 19.0-geoengine_swisstopo-clean @@ -100,8 +101,8 @@ git push origin 19.0-geoengine_swisstopo-clean Idem pour `19.0-geoengine_drone_ortho`. -> **Pourquoi `pull --rebase` et pas `merge` ?** -> Pour garder un historique linéaire propre, exigé par OCA. +> **Pourquoi `pull --rebase` et pas `merge` ?** Pour garder un historique linéaire +> propre, exigé par OCA. ## 5. Création d'une nouvelle branche OCA-ready @@ -134,10 +135,11 @@ https://github.com/leNeo/geospatial/compare/19.0...19.0-geoengine_xyz ## 6. Création d'une PR vers OCA -> ⚠️ Soumettre une PR uniquement quand le module précédent est mergé sur OCA -> (sinon la diff inclura les fichiers du module en attente). +> ⚠️ Soumettre une PR uniquement quand le module précédent est mergé sur OCA (sinon la +> diff inclura les fichiers du module en attente). -1. Aller sur `https://github.com/OCA/geospatial/compare/19.0...leNeo:geospatial:19.0-geoengine_xyz` +1. Aller sur + `https://github.com/OCA/geospatial/compare/19.0...leNeo:geospatial:19.0-geoengine_xyz` 2. Cliquer "Create pull request" 3. Titre : `[19.0][ADD] geoengine_xyz: description courte` 4. Description : suivre le template OCA (Summary, Changes, Test plan) @@ -145,39 +147,40 @@ https://github.com/leNeo/geospatial/compare/19.0...19.0-geoengine_xyz ## 7. État courant des PRs OCA -| Module | PR OCA | Statut | -|---|---|---| -| `base_geoengine` | [#465](https://github.com/OCA/geospatial/pull/465) | 🟢 Open — **PR consolidée**, CI verte, en review | -| `geoengine_swisstopo` | _(pas encore créée)_ | ⏳ Attend merge **#465** | -| `geoengine_drone_ortho` | _(pas encore créée)_ | ⏳ Attend merge `geoengine_swisstopo` (par sécurité, ordre logique) | -| `geoengine_drone_ortho_swisstopo` | _(pas encore créée)_ | ⏳ Attend merge des deux dépendances | +| Module | PR OCA | Statut | +| --------------------------------- | -------------------------------------------------- | ------------------------------------------------------------------- | +| `base_geoengine` | [#465](https://github.com/OCA/geospatial/pull/465) | 🟢 Open — **PR consolidée**, CI verte, en review | +| `geoengine_swisstopo` | _(pas encore créée)_ | ⏳ Attend merge **#465** | +| `geoengine_drone_ortho` | _(pas encore créée)_ | ⏳ Attend merge `geoengine_swisstopo` (par sécurité, ordre logique) | +| `geoengine_drone_ortho_swisstopo` | _(pas encore créée)_ | ⏳ Attend merge des deux dépendances | > **Convergence base_geoengine (consolidation #465).** Il y avait 3 migrations -> parallèles : [#414](https://github.com/OCA/geospatial/pull/414) (weinni2000), -> notre [#446](https://github.com/OCA/geospatial/pull/446), et la PR -> [weinni2000/geospatial#7](https://github.com/weinni2000/geospatial/pull/7) -> (juppe : montée libs OL/Chroma/Geostats, fix WKB, cherry-pick #431). -> weinni2000 a proposé de passer la main → nous avons **consolidé le tout en -> [#465](https://github.com/OCA/geospatial/pull/465)** : base #414 + improvements -> de juppe + notre **fix sécurité `ir.rule`** (voir §8.3). Crédits préservés -> (`Co-authored-by` / historique par commit). -> Suites : **#446 fermée** (superseded), #414 à fermer par weinni2000, PR#7 intégrée. +> parallèles : [#414](https://github.com/OCA/geospatial/pull/414) (weinni2000), notre +> [#446](https://github.com/OCA/geospatial/pull/446), et la PR +> [weinni2000/geospatial#7](https://github.com/weinni2000/geospatial/pull/7) (juppe : +> montée libs OL/Chroma/Geostats, fix WKB, cherry-pick #431). weinni2000 a proposé de +> passer la main → nous avons **consolidé le tout en +> [#465](https://github.com/OCA/geospatial/pull/465)** : base #414 + improvements de +> juppe + notre **fix sécurité `ir.rule`** (voir §8.3). Crédits préservés +> (`Co-authored-by` / historique par commit). Suites : **#446 fermée** (superseded), +> #414 à fermer par weinni2000, PR#7 intégrée. **Ordre de soumission** : + 1. `base_geoengine` — **#465** (consolidée) 2. `geoengine_swisstopo` -3. `geoengine_drone_ortho` *(plus de dépendance JS bloquante — voir §8.1)* -4. `geoengine_drone_ortho_swisstopo` *(module pont, dépend des deux précédents)* +3. `geoengine_drone_ortho` _(plus de dépendance JS bloquante — voir §8.1)_ +4. `geoengine_drone_ortho_swisstopo` _(module pont, dépend des deux précédents)_ ## 8. Points d'attention / Dette technique ### 8.1 Dépendance JS croisée — `geoengine_drone_ortho` ✅ RÉSOLU -**État précédent** : `geoengine_drone_ortho/static/src/js/geoengine_renderer_patch.esm.js` -importait `SWISSTOPO_EXTENT_2056` et `SWISSTOPO_RESOLUTIONS` depuis -`@geoengine_swisstopo/js/swisstopo_raster.esm`, sans déclarer la dépendance -dans `__manifest__.py`. Incompatible avec la règle OCA "1 PR = 1 module -autonome". +**État précédent** : +`geoengine_drone_ortho/static/src/js/geoengine_renderer_patch.esm.js` importait +`SWISSTOPO_EXTENT_2056` et `SWISSTOPO_RESOLUTIONS` depuis +`@geoengine_swisstopo/js/swisstopo_raster.esm`, sans déclarer la dépendance dans +`__manifest__.py`. Incompatible avec la règle OCA "1 PR = 1 module autonome". **Solution retenue** : pattern **module pont** (bridge module). @@ -195,62 +198,61 @@ autonome". `SWISSTOPO_EXTENT_2056` + `SWISSTOPO_RESOLUTIONS` quand `srcProjCode === "EPSG:2056"`, sinon délègue à `super`. -**Bénéfice** : chaque module est OCA-soumissible indépendamment, et la grille -Swisstopo s'active automatiquement quand les deux modules sont installés -ensemble. +**Bénéfice** : chaque module est OCA-soumissible indépendamment, et la grille Swisstopo +s'active automatiquement quand les deux modules sont installés ensemble. ### 8.2 Workflow `test.yml` / PostGIS ⚠️ TRANSITOIRE (patch manuel) -Le workflow CI `.github/workflows/test.yml` a été modifié **manuellement** pour -utiliser `postgis/postgis:14-3.5` (nécessaire aux tests de `base_geoengine`). -Cette modification est conforme aux migrations 17.0 et 18.0 précédentes. +Le workflow CI `.github/workflows/test.yml` a été modifié **manuellement** pour utiliser +`postgis/postgis:14-3.5` (nécessaire aux tests de `base_geoengine`). Cette modification +est conforme aux migrations 17.0 et 18.0 précédentes. -> ⚠️ **C'est un patch manuel d'un fichier généré par Copier.** Il sera écrasé -> à chaque `copier update`. Il doit être réappliqué tant que le template OCA -> du dépôt n'a pas été régénéré avec le support natif de l'image PostgreSQL -> (voir solution propre ci-dessous). +> ⚠️ **C'est un patch manuel d'un fichier généré par Copier.** Il sera écrasé à chaque +> `copier update`. Il doit être réappliqué tant que le template OCA du dépôt n'a pas été +> régénéré avec le support natif de l'image PostgreSQL (voir solution propre +> ci-dessous). **Solution propre (à venir) — paramètre `postgres_image` du template OCA** -La PR [OCA/oca-addons-repo-template#355](https://github.com/OCA/oca-addons-repo-template/pull/355) -(mergée le 2026-05-29) ajoute un paramètre `postgres_image` au template : -on peut désormais déclarer l'image PostgreSQL dans `.copier-answers.yml` au -lieu de patcher `test.yml` à la main. +La PR +[OCA/oca-addons-repo-template#355](https://github.com/OCA/oca-addons-repo-template/pull/355) +(mergée le 2026-05-29) ajoute un paramètre `postgres_image` au template : on peut +désormais déclarer l'image PostgreSQL dans `.copier-answers.yml` au lieu de patcher +`test.yml` à la main. -Migration prévue, en **2 temps** (opérations **niveau dépôt**, hors PR de -module — ne PAS inclure dans la PR #446 de `base_geoengine`) : +Migration prévue, en **2 temps** (opérations **niveau dépôt**, hors PR de module — ne +PAS inclure dans la PR #446 de `base_geoengine`) : -1. Attendre que OCA/geospatial bumpe le template à un tag **> v1.35** incluant - la PR #355 (`copier update` lancé centralement par les mainteneurs / le bot). +1. Attendre que OCA/geospatial bumpe le template à un tag **> v1.35** incluant la PR + #355 (`copier update` lancé centralement par les mainteneurs / le bot). 2. Renseigner dans `.copier-answers.yml` : ```yaml postgres_image: postgis/postgis:14-3.5 ``` - puis régénérer. Le `test.yml` produit contiendra alors PostGIS nativement, - et le patch manuel ci-dessus pourra être **supprimé de toutes les branches**. + puis régénérer. Le `test.yml` produit contiendra alors PostGIS nativement, et le + patch manuel ci-dessus pourra être **supprimé de toutes les branches**. -> Tant que le template n'est pas bumpé, garder le patch manuel : sans lui, plus -> de PostGIS en CI → les tests de `base_geoengine` échouent. +> Tant que le template n'est pas bumpé, garder le patch manuel : sans lui, plus de +> PostGIS en CI → les tests de `base_geoengine` échouent. ### 8.3 Régression sécurité `ir.rule` sur geo-opérateurs indirects ✅ CORRIGÉ (#465) -**Problème** : la migration 19.0 (#414) a remplacé `self._apply_ir_rules(rel_query, "read")` -(API supprimée en 19.0) par `model._check_field_access(current_field, "read")` -dans `base_geoengine/expressions.py`. Ce n'est **pas équivalent** : les record -rules (`ir.rule`) n'étaient plus appliquées à la **sous-requête spatiale** des -geo-opérateurs indirects (forme `dict`, ex. `{"dummy.zip.the_geom": [...]}`). -→ Un utilisateur non-admin pouvait matcher des enregistrements liés qu'il n'a -pas le droit de voir (contournement row-level security). +**Problème** : la migration 19.0 (#414) a remplacé +`self._apply_ir_rules(rel_query, "read")` (API supprimée en 19.0) par +`model._check_field_access(current_field, "read")` dans `base_geoengine/expressions.py`. +Ce n'est **pas équivalent** : les record rules (`ir.rule`) n'étaient plus appliquées à +la **sous-requête spatiale** des geo-opérateurs indirects (forme `dict`, ex. +`{"dummy.zip.the_geom": [...]}`). → Un utilisateur non-admin pouvait matcher des +enregistrements liés qu'il n'a pas le droit de voir (contournement row-level security). -**Pourquoi non détecté** : tous les tests tournent en **superuser** -(`TransactionCase` = `SUPERUSER_ID`), donc les `ir.rule` ne filtrent rien. +**Pourquoi non détecté** : tous les tests tournent en **superuser** (`TransactionCase` = +`SUPERUSER_ID`), donc les `ir.rule` ne filtrent rien. -**Fix (#465)** : `where_calc()` applique désormais les record rules comme le -fait `BaseModel._search` (bloc `# security access domain`), garde sur -`model.env.su`. Ligne `_check_field_access` erronée retirée. Test de -non-régression ajouté (`test_geo_search_indirect_respects_record_rules` : -utilisateur non-admin + `ir.rule` scoping un groupe → la sous-requête respecte -la règle). Validé en CI OCA. +**Fix (#465)** : `where_calc()` applique désormais les record rules comme le fait +`BaseModel._search` (bloc `# security access domain`), garde sur `model.env.su`. Ligne +`_check_field_access` erronée retirée. Test de non-régression ajouté +(`test_geo_search_indirect_respects_record_rules` : utilisateur non-admin + `ir.rule` +scoping un groupe → la sous-requête respecte la règle). Validé en CI OCA. ## 9. Commandes utiles @@ -276,8 +278,8 @@ git push origin --delete # supprime aussi sur GitHub ### Réinitialiser une branche OCA-ready à partir de zéro -Si une branche OCA-ready est devenue trop "sale" (mauvais commits, doublons), -la recréer depuis `19.0` : +Si une branche OCA-ready est devenue trop "sale" (mauvais commits, doublons), la recréer +depuis `19.0` : ```bash git checkout 19.0 @@ -295,6 +297,8 @@ git push origin 19.0-geoengine_xyz-clean - [ ] GitHub indique "Able to merge" - [ ] `pre-commit run --all-files` ✅ - [ ] Tests passent : `odoo-bin -d test_db -i --test-enable --stop-after-init` -- [ ] Pas de dépendance JS/Python cachée vers un autre module non déclaré dans `__manifest__.py` +- [ ] Pas de dépendance JS/Python cachée vers un autre module non déclaré dans + `__manifest__.py` - [ ] Headers de license OCA présents (`# Copyright …` + `# License AGPL-3.0`) -- [ ] `readme/` complet (DESCRIPTION, CONTRIBUTORS, HISTORY, USAGE, INSTALL si nécessaire) \ No newline at end of file +- [ ] `readme/` complet (DESCRIPTION, CONTRIBUTORS, HISTORY, USAGE, INSTALL si + nécessaire) diff --git a/base_geoengine/static/src/js/widgets/geoengine_edit_map/field_geoengine_edit_map.esm.js b/base_geoengine/static/src/js/widgets/geoengine_edit_map/field_geoengine_edit_map.esm.js index 9c74c32fa..87930fcb9 100644 --- a/base_geoengine/static/src/js/widgets/geoengine_edit_map/field_geoengine_edit_map.esm.js +++ b/base_geoengine/static/src/js/widgets/geoengine_edit_map/field_geoengine_edit_map.esm.js @@ -20,9 +20,7 @@ export class FieldGeoEngineEditMap extends Component { this.id = `map_${this.props.id}`; this.orm = useService("orm"); - onWillStart(() => - loadMapLibs() - ); + onWillStart(() => loadMapLibs()); // Is executed when component is mounted. onMounted(async () => { diff --git a/geoengine_drone_ortho/README.rst b/geoengine_drone_ortho/README.rst new file mode 100644 index 000000000..513ada426 --- /dev/null +++ b/geoengine_drone_ortho/README.rst @@ -0,0 +1,87 @@ +.. image:: https://odoo-community.org/readme-banner-image + :target: https://odoo-community.org/get-involved?utm_source=readme + :alt: Odoo Community Association + +================================== +GeoEngine - Drone Orthophoto Tiles +================================== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:b668032c694d6242393a287cb5cba3d76b586683a5cc97946f0ba0ec83ba137d + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fgeospatial-lightgray.png?logo=github + :target: https://github.com/OCA/geospatial/tree/19.0/geoengine_drone_ortho + :alt: OCA/geospatial +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/geospatial-19-0/geospatial-19-0-geoengine_drone_ortho + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/geospatial&target_branch=19.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +Adds XYZ/TMS tile layer support to the GeoEngine map renderer, enabling +drone orthophotos and custom tile sources as raster backgrounds. + +This module provides: + +- New "XYZ Tiles" raster layer type for GeoEngine views +- Support for TiTiler, MapProxy, or any XYZ/TMS tile server +- Configurable zoom levels, tile extent, and projection +- On-the-fly reprojection when tile projection differs from map + projection +- Extension hook ``_buildXyzTileGrid`` for companion modules to provide + custom tile grids (e.g. Swiss LV95 — see + ``geoengine_drone_ortho_swisstopo``) + +**Table of contents** + +.. contents:: + :local: + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +------- + +* Caravanes Treyvaud S.A. + +Maintainers +----------- + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +This module is part of the `OCA/geospatial `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/geoengine_drone_ortho/static/description/index.html b/geoengine_drone_ortho/static/description/index.html new file mode 100644 index 000000000..98394868b --- /dev/null +++ b/geoengine_drone_ortho/static/description/index.html @@ -0,0 +1,434 @@ + + + + + +README.rst + + + +
+ + + +Odoo Community Association + +
+

GeoEngine - Drone Orthophoto Tiles

+ +

Beta License: AGPL-3 OCA/geospatial Translate me on Weblate Try me on Runboat

+

Adds XYZ/TMS tile layer support to the GeoEngine map renderer, enabling +drone orthophotos and custom tile sources as raster backgrounds.

+

This module provides:

+
    +
  • New “XYZ Tiles” raster layer type for GeoEngine views
  • +
  • Support for TiTiler, MapProxy, or any XYZ/TMS tile server
  • +
  • Configurable zoom levels, tile extent, and projection
  • +
  • On-the-fly reprojection when tile projection differs from map +projection
  • +
  • Extension hook _buildXyzTileGrid for companion modules to provide +custom tile grids (e.g. Swiss LV95 — see +geoengine_drone_ortho_swisstopo)
  • +
+

Table of contents

+ +
+

Bug Tracker

+

Bugs are tracked on GitHub Issues. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • Caravanes Treyvaud S.A.
  • +
+
+
+

Maintainers

+

This module is maintained by the OCA.

+ +Odoo Community Association + +

OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use.

+

This module is part of the OCA/geospatial project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+
+ + diff --git a/geoengine_drone_ortho/static/src/js/geoengine_renderer_patch.esm.js b/geoengine_drone_ortho/static/src/js/geoengine_renderer_patch.esm.js index 5ea51fae4..a67782879 100644 --- a/geoengine_drone_ortho/static/src/js/geoengine_renderer_patch.esm.js +++ b/geoengine_drone_ortho/static/src/js/geoengine_renderer_patch.esm.js @@ -129,11 +129,7 @@ patch(GeoengineRenderer.prototype, { const srcProjCode = background.xyz_tile_projection || "EPSG:3857"; const srcProj = ol.proj.get(srcProjCode); - const tileGrid = this._buildXyzTileGrid( - srcProjCode, - srcProj, - background - ); + const tileGrid = this._buildXyzTileGrid(srcProjCode, srcProj, background); const sourceOpts = { url: background.url, diff --git a/geoengine_drone_ortho/views/geo_raster_layer_view.xml b/geoengine_drone_ortho/views/geo_raster_layer_view.xml index aa800e2d5..2227428e0 100644 --- a/geoengine_drone_ortho/views/geo_raster_layer_view.xml +++ b/geoengine_drone_ortho/views/geo_raster_layer_view.xml @@ -11,11 +11,7 @@ - + diff --git a/geoengine_drone_ortho_swisstopo/README.rst b/geoengine_drone_ortho_swisstopo/README.rst new file mode 100644 index 000000000..e669cbac6 --- /dev/null +++ b/geoengine_drone_ortho_swisstopo/README.rst @@ -0,0 +1,89 @@ +.. image:: https://odoo-community.org/readme-banner-image + :target: https://odoo-community.org/get-involved?utm_source=readme + :alt: Odoo Community Association + +================================================== +GeoEngine - Drone Orthophoto + Swisstopo Tile Grid +================================================== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:eb5ab79ab152ee878785a6a0d34728618209737e736c370559c508f7428c4a0d + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fgeospatial-lightgray.png?logo=github + :target: https://github.com/OCA/geospatial/tree/19.0/geoengine_drone_ortho_swisstopo + :alt: OCA/geospatial +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/geospatial-19-0/geospatial-19-0-geoengine_drone_ortho_swisstopo + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/geospatial&target_branch=19.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +Bridge module connecting ``geoengine_drone_ortho`` and +``geoengine_swisstopo``. + +When both modules are installed, this module is auto-installed and +enables Swiss LV95 (EPSG:2056) tile grid support for XYZ tile layers: + +- Uses Swisstopo's official tile origin ``[2420000, 1350000]`` and the + WMTS resolution set from ``geoengine_swisstopo`` +- Activated automatically when an XYZ tile layer is configured with + ``Tile Projection = EPSG:2056`` +- Falls back to the default WebMercator XYZ grid for all other + projections + +Without this bridge, drone orthophoto layers in EPSG:2056 would request +tiles using a generic XYZ grid, producing incorrect z/x/y coordinates. + +**Table of contents** + +.. contents:: + :local: + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +------- + +* Caravanes Treyvaud S.A. + +Maintainers +----------- + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +This module is part of the `OCA/geospatial `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/geoengine_drone_ortho_swisstopo/static/description/index.html b/geoengine_drone_ortho_swisstopo/static/description/index.html new file mode 100644 index 000000000..5dbf1bf0c --- /dev/null +++ b/geoengine_drone_ortho_swisstopo/static/description/index.html @@ -0,0 +1,435 @@ + + + + + +README.rst + + + +
+ + + +Odoo Community Association + +
+

GeoEngine - Drone Orthophoto + Swisstopo Tile Grid

+ +

Beta License: AGPL-3 OCA/geospatial Translate me on Weblate Try me on Runboat

+

Bridge module connecting geoengine_drone_ortho and +geoengine_swisstopo.

+

When both modules are installed, this module is auto-installed and +enables Swiss LV95 (EPSG:2056) tile grid support for XYZ tile layers:

+
    +
  • Uses Swisstopo’s official tile origin [2420000, 1350000] and the +WMTS resolution set from geoengine_swisstopo
  • +
  • Activated automatically when an XYZ tile layer is configured with +Tile Projection = EPSG:2056
  • +
  • Falls back to the default WebMercator XYZ grid for all other +projections
  • +
+

Without this bridge, drone orthophoto layers in EPSG:2056 would request +tiles using a generic XYZ grid, producing incorrect z/x/y coordinates.

+

Table of contents

+ +
+

Bug Tracker

+

Bugs are tracked on GitHub Issues. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • Caravanes Treyvaud S.A.
  • +
+
+
+

Maintainers

+

This module is maintained by the OCA.

+ +Odoo Community Association + +

OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use.

+

This module is part of the OCA/geospatial project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+
+ + diff --git a/geoengine_swisstopo/README.rst b/geoengine_swisstopo/README.rst index aecddebea..ebc530325 100644 --- a/geoengine_swisstopo/README.rst +++ b/geoengine_swisstopo/README.rst @@ -1,33 +1,47 @@ -=================================== +.. image:: https://odoo-community.org/readme-banner-image + :target: https://odoo-community.org/get-involved?utm_source=readme + :alt: Odoo Community Association + +======================================== GeoEngine - Swisstopo & Multi-Projection -=================================== +======================================== -.. +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:7649090219b8aebcfc6b96c5c53f394b198cec43e1973c4d2e3d0cfeb3787be3 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png :target: https://odoo-community.org/page/development-status :alt: Beta -.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png +.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fgeospatial-lightgray.png?logo=github :target: https://github.com/OCA/geospatial/tree/19.0/geoengine_swisstopo :alt: OCA/geospatial +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/geospatial-19-0/geospatial-19-0-geoengine_swisstopo + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/geospatial&target_branch=19.0 + :alt: Try me on Runboat -|badge1| |badge2| |badge3| +|badge1| |badge2| |badge3| |badge4| |badge5| -Adds proj4js support for non-standard SRIDs (EPSG:2056, EPSG:21781, etc.) -and fixes projection handling in the GeoEngine map renderer. +Adds proj4js support for non-standard SRIDs (EPSG:2056, EPSG:21781, +etc.) and fixes projection handling in the GeoEngine map renderer. This module provides: - Swisstopo raster layer type for Swiss national map backgrounds -- Automatic SRID detection from geo fields for correct projection handling -- proj4js-based coordinate transformation between projections (e.g., EPSG:3857 to EPSG:2056) +- Automatic SRID detection from geo fields for correct projection + handling +- proj4js-based coordinate transformation between projections (e.g., + EPSG:3857 to EPSG:2056) - Patched GeoEngine renderer to support multi-projection workflows **Table of contents** @@ -40,17 +54,33 @@ Bug Tracker Bugs are tracked on `GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. Credits ======= Authors -~~~~~~~ +------- * Camptocamp * Caravanes Treyvaud S.A. Maintainers -~~~~~~~~~~~ +----------- + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. This module is part of the `OCA/geospatial `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/geoengine_swisstopo/static/description/index.html b/geoengine_swisstopo/static/description/index.html new file mode 100644 index 000000000..15e036a9b --- /dev/null +++ b/geoengine_swisstopo/static/description/index.html @@ -0,0 +1,433 @@ + + + + + +README.rst + + + +
+ + + +Odoo Community Association + +
+

GeoEngine - Swisstopo & Multi-Projection

+ +

Beta License: AGPL-3 OCA/geospatial Translate me on Weblate Try me on Runboat

+

Adds proj4js support for non-standard SRIDs (EPSG:2056, EPSG:21781, +etc.) and fixes projection handling in the GeoEngine map renderer.

+

This module provides:

+
    +
  • Swisstopo raster layer type for Swiss national map backgrounds
  • +
  • Automatic SRID detection from geo fields for correct projection +handling
  • +
  • proj4js-based coordinate transformation between projections (e.g., +EPSG:3857 to EPSG:2056)
  • +
  • Patched GeoEngine renderer to support multi-projection workflows
  • +
+

Table of contents

+ +
+

Bug Tracker

+

Bugs are tracked on GitHub Issues. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • Camptocamp
  • +
  • Caravanes Treyvaud S.A.
  • +
+
+
+

Maintainers

+

This module is maintained by the OCA.

+ +Odoo Community Association + +

OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use.

+

This module is part of the OCA/geospatial project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+
+ + diff --git a/geoengine_swisstopo/static/src/js/geoengine_renderer_patch.esm.js b/geoengine_swisstopo/static/src/js/geoengine_renderer_patch.esm.js index 272942822..e27602ce1 100644 --- a/geoengine_swisstopo/static/src/js/geoengine_renderer_patch.esm.js +++ b/geoengine_swisstopo/static/src/js/geoengine_renderer_patch.esm.js @@ -74,8 +74,7 @@ patch(GeoengineRenderer.prototype, { } this._dataSrid = getMainGeoFieldSrid(this); - const shouldUse2056View = - this._dataSrid === 2056 || this._usesSrid2056Layer(); + const shouldUse2056View = this._dataSrid === 2056 || this._usesSrid2056Layer(); if (shouldUse2056View) { const proj2056 = ol.proj.get("EPSG:2056"); @@ -97,7 +96,7 @@ patch(GeoengineRenderer.prototype, { new ol.View({ projection: proj2056, resolutions: SWISSTOPO_VIEW_RESOLUTIONS, - // maxZoom is NOT derived from resolutions.length in OL; + // MaxZoom is NOT derived from resolutions.length in OL; // without this it stays at the default (28) and the // finest resolution levels are unreachable. maxZoom: SWISSTOPO_VIEW_RESOLUTIONS.length - 1, @@ -150,9 +149,7 @@ patch(GeoengineRenderer.prototype, { * super would shadow downstream patches depending on the patch order). */ createBackgroundLayers(backgrounds) { - const nonSwisstopo = backgrounds.filter( - (bg) => bg.raster_type !== "swisstopo" - ); + const nonSwisstopo = backgrounds.filter((bg) => bg.raster_type !== "swisstopo"); return super.createBackgroundLayers(nonSwisstopo); }, diff --git a/geoengine_swisstopo/static/src/js/proj4_setup.esm.js b/geoengine_swisstopo/static/src/js/proj4_setup.esm.js index 77a9cbdc3..c2174b55e 100644 --- a/geoengine_swisstopo/static/src/js/proj4_setup.esm.js +++ b/geoengine_swisstopo/static/src/js/proj4_setup.esm.js @@ -9,20 +9,6 @@ const PROJ4_PATH = "/geoengine_swisstopo/static/lib/proj4js/proj4.js"; let _registered = false; let _registerPromise = null; -/** - * Register commonly used projections with proj4 and OpenLayers. - * Safe to call multiple times — only runs once. - */ -export async function ensureProjectionsRegistered() { - if (_registered) { - return; - } - if (!_registerPromise) { - _registerPromise = _doRegister(); - } - return _registerPromise; -} - async function _doRegister() { if (!window.proj4) { await loadJS(PROJ4_PATH); @@ -74,6 +60,20 @@ async function _doRegister() { _registered = true; } +/** + * Register commonly used projections with proj4 and OpenLayers. + * Safe to call multiple times — only runs once. + */ +export async function ensureProjectionsRegistered() { + if (_registered) { + return; + } + if (!_registerPromise) { + _registerPromise = _doRegister(); + } + return _registerPromise; +} + /** * Read a GeoJSON geometry and transform it from data SRID to map projection. * diff --git a/geoengine_tools/README.rst b/geoengine_tools/README.rst index c13d0380b..4cede6d88 100644 --- a/geoengine_tools/README.rst +++ b/geoengine_tools/README.rst @@ -1,43 +1,106 @@ +.. image:: https://odoo-community.org/readme-banner-image + :target: https://odoo-community.org/get-involved?utm_source=readme + :alt: Odoo Community Association + =============== GeoEngine Tools =============== +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:a63d5bcb6bbd7f03f5e4f03ef25de47853da097ace9768029a5f98ffa71fe113 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fgeospatial-lightgray.png?logo=github + :target: https://github.com/OCA/geospatial/tree/19.0/geoengine_tools + :alt: OCA/geospatial +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/geospatial-19-0/geospatial-19-0-geoengine_tools + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/geospatial&target_branch=19.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + Reusable helpers and UX extensions for the GeoEngine map renderer -(``base_geoengine``), kept out of the core module so the OCA migration stays -faithful to upstream. +(``base_geoengine``), kept out of the core module so the OCA migration +stays faithful to upstream. This module provides: -* reusable renderer helpers ``getGeometryFieldName()`` and - ``startDrawInteraction({onDrawStart, onDrawEnd})``, a stable extension point - to drive the OpenLayers draw interaction; -* a draw control that writes geometry through ``this.format`` so - projection-aware modules (e.g. ``geoengine_swisstopo``) get correct - coordinates without re-implementing the control; -* record-level geometry editing: a pencil button in the records list to - redraw the geometry of an existing record (``drawOnRecord``); -* generic geometry / SRID utilities (``geo_utils``): WKB hex decoding, - Polygon to MultiPolygon normalization and SRID resolution helpers. +- Reusable renderer helpers: ``getGeometryFieldName()`` and + ``startDrawInteraction({onDrawStart, onDrawEnd})``, a stable extension + point for modules that need to drive the OpenLayers draw interaction. +- A draw control that writes the new geometry through ``this.format``, + so projection-aware modules (e.g. ``geoengine_swisstopo``) get correct + coordinates without re-implementing the control. +- Record-level geometry editing: a pencil button in the records list + that lets a user redraw the geometry of an existing record + (``drawOnRecord``). +- Generic geometry / SRID utilities (``geo_utils``): WKB hex decoding, + Polygon → MultiPolygon normalization and SRID resolution helpers. -Configuration -============= +**Table of contents** -No extra configuration is required. Install the module and the helpers become -available to ``base_geoengine`` and any module depending on it. +.. contents:: + :local: Usage ===== -Open a GeoEngine view. To edit the geometry of an existing record, expand it in -the **Records** panel and click the pencil button: the record switches to edit -mode, draw the new geometry on the map and it is saved when the drawing ends. +Open any GeoEngine view. + +To edit the geometry of an existing record, expand it in the **Records** +panel and click the pencil button: the record switches to edit mode and +you can draw its new geometry on the map; it is saved automatically when +the drawing ends. For developers, the module patches ``GeoengineRenderer`` and exposes -``startDrawInteraction``, ``getGeometryFieldName`` and ``drawOnRecord`` on the -prototype, plus generic helpers importable from +``startDrawInteraction``, ``getGeometryFieldName`` and ``drawOnRecord`` +on the prototype, plus generic helpers importable from ``@geoengine_tools/js/geo_utils.esm``. -License +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits ======= -AGPL-3 +Authors +------- + +* Caravanes Treyvaud S.A. + +Maintainers +----------- + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +This module is part of the `OCA/geospatial `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/geoengine_tools/pyproject.toml b/geoengine_tools/pyproject.toml new file mode 100644 index 000000000..4231d0ccc --- /dev/null +++ b/geoengine_tools/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/geoengine_tools/static/description/index.html b/geoengine_tools/static/description/index.html new file mode 100644 index 000000000..ccc28011c --- /dev/null +++ b/geoengine_tools/static/description/index.html @@ -0,0 +1,451 @@ + + + + + +README.rst + + + +
+ + + +Odoo Community Association + +
+

GeoEngine Tools

+ +

Beta License: AGPL-3 OCA/geospatial Translate me on Weblate Try me on Runboat

+

Reusable helpers and UX extensions for the GeoEngine map renderer +(base_geoengine), kept out of the core module so the OCA migration +stays faithful to upstream.

+

This module provides:

+
    +
  • Reusable renderer helpers: getGeometryFieldName() and +startDrawInteraction({onDrawStart, onDrawEnd}), a stable extension +point for modules that need to drive the OpenLayers draw interaction.
  • +
  • A draw control that writes the new geometry through this.format, +so projection-aware modules (e.g. geoengine_swisstopo) get correct +coordinates without re-implementing the control.
  • +
  • Record-level geometry editing: a pencil button in the records list +that lets a user redraw the geometry of an existing record +(drawOnRecord).
  • +
  • Generic geometry / SRID utilities (geo_utils): WKB hex decoding, +Polygon → MultiPolygon normalization and SRID resolution helpers.
  • +
+

Table of contents

+ +
+

Usage

+

Open any GeoEngine view.

+

To edit the geometry of an existing record, expand it in the Records +panel and click the pencil button: the record switches to edit mode and +you can draw its new geometry on the map; it is saved automatically when +the drawing ends.

+

For developers, the module patches GeoengineRenderer and exposes +startDrawInteraction, getGeometryFieldName and drawOnRecord +on the prototype, plus generic helpers importable from +@geoengine_tools/js/geo_utils.esm.

+
+
+

Bug Tracker

+

Bugs are tracked on GitHub Issues. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • Caravanes Treyvaud S.A.
  • +
+
+
+

Maintainers

+

This module is maintained by the OCA.

+ +Odoo Community Association + +

OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use.

+

This module is part of the OCA/geospatial project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+
+ + diff --git a/geoengine_tools/static/src/js/geoengine_renderer_tools.esm.js b/geoengine_tools/static/src/js/geoengine_renderer_tools.esm.js index e9ce3e382..ed1f35fc5 100644 --- a/geoengine_tools/static/src/js/geoengine_renderer_tools.esm.js +++ b/geoengine_tools/static/src/js/geoengine_renderer_tools.esm.js @@ -69,8 +69,7 @@ patch(GeoengineRenderer.prototype, { */ async drawOnRecord(record) { const rec = - this.props.data.records.find((val) => val.resId === record.resId) || - record; + this.props.data.records.find((val) => val.resId === record.resId) || record; if (!rec) { return; }