Git Product home page Git Product logo

Comments (7)

lpofredc avatar lpofredc commented on June 16, 2024 1

Le champ municipality du geojson des observations d'un programme contient maintenant deux informations sur la commune:

  • name > son nom
  • code > son code insee
{
  "type": "FeatureCollection",
  "features": [{
    "properties": {
      "comment": "",
      "image": null,
      "timestamp_create": "2019-04-09 22:15:38.962272",
      "obs_txt": "Anonyme",
      "count": 1,
      "date": "2019-04-09",
      "common_name": "Merle noir",
      "id_observation": 185,
      "cd_nom": 4117,
      "sci_name": "Turdus merula",
      "municipality": {
        "code": "38185",
        "name": "Grenoble"
      }
    },
    "type": "Feature",
      "geometry": {
        "coordinates": [
          5.73486328125,
          45.16751538623502
        ],
      "type": "Point"
      }
      ...

from geonature-citizen.

orovellotti avatar orovellotti commented on June 16, 2024

C'est un gros chantier:

1/ Créer la fonction générique qui récupère la municipalité a partir d'un point
2/ Mettre en place un trigger en écriture sur ajout d'une observation
3/ Mettre a jour les routes coté Backend
4/ Adapter le front

from geonature-citizen.

camillemonchicourt avatar camillemonchicourt commented on June 16, 2024

Mais non, c'est juste un trigger intersect et la fonction générique existe déjà dans GeoNature.

from geonature-citizen.

orovellotti avatar orovellotti commented on June 16, 2024

Donc c'est juste écrire le trigger qui utilise la fonction générique pour ajouter la "municipality" en base sans faire de modif front ?

from geonature-citizen.

lpofredc avatar lpofredc commented on June 16, 2024

Oui, 2 possibilités:

  • Géré directement en bdd avec un trigger (comme dans geonature) > Complexifie le processus d'installation avec la nécessité d'éxécution d'un sql pas encore nécessaire) mais simple à mettre en oeuvre.
  • Géré côté backend au moment de l'enregistrement de la donnée d'après la géométrie saisie.

Personnellement, j'aurai tendance à privilégier la seconde solution en ajoutant également flask-migrate aux modules du backend, permettant une gestion des évolutions des models par le backend (à la django).

from geonature-citizen.

orovellotti avatar orovellotti commented on June 16, 2024

@camillemonchicourt @gildeluermoz
Est ce que tu peux nous donner plus d'info sur comment récupérer tout ca de geonature ? Merci

from geonature-citizen.

lpofredc avatar lpofredc commented on June 16, 2024

Ajouté dans cette PR #91

from geonature-citizen.

Related Issues (20)

Recommend Projects

  • React photo React

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

  • Vue.js photo Vue.js

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

  • Typescript photo Typescript

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

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

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

Recommend Topics

  • javascript

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

  • web

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

  • server

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

  • Machine learning

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

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

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

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.