Coder Social home page Coder Social logo

Comments (5)

PanierAvide avatar PanierAvide commented on June 13, 2024

La commande psql à utiliser pour faire un fichier CSV propre et utilisable facilement (en changeant bien sûr les infos de connexion à la base) :

psql -U covid19_fr_6909 -d covid19_fr_6909 -p 10000 -h localhost -c "\copy (SELECT CASE WHEN fid LIKE 'n%' THEN concat('node/', substring(fid, 2)) WHEN fid LIKE 'w%' THEN concat('way/', substring(fid, 2)) WHEN fid LIKE 'r%' THEN concat('relation/', substring(fid, 2)) END AS osm_id, name, cat, brand, brand_wikidata AS wikidata, brand_hours AS url_hours, brand_infos AS infos, status, opening_hours, ST_X(ST_Transform(geom, 4326))::real AS lon, ST_Y(ST_Transform(geom, 4326))::real AS lat FROM poi_osm) TO '/tmp/poi_osm.csv' CSV HEADER"

Tu peux intégrer ça dans un cron sur la machine + rendre dispo via une URL le fichier produit ? On part sur un export par heure ou par jour ?

from caresteouvert.

PanierAvide avatar PanierAvide commented on June 13, 2024

Structure du fichier en sortie

osm_id,name,cat,brand,wikidata,url_hours,infos,status,opening_hours,lon,lat
node/872470130,Pharmacie Bories,pharmacy,,,,,inconnu,,1.5797248,44.47849
node/872470226,Le Fournil de Saint-Géry,bakery,,,,,inconnu,,1.5807782,44.47803
node/1381848018,,bakery,,,,,inconnu,,1.5808399,44.5687
node/5807621969,,convenience,,,,,inconnu,,1.5619853,44.68736

from caresteouvert.

francois2metz avatar francois2metz commented on June 13, 2024

C'est en place toute les heures a cette adresse: https://download.osmontrouge.fr/caresteouvert/

On peut le mettre sur un domaine associé a ca reste ouvert.

from caresteouvert.

PanierAvide avatar PanierAvide commented on June 13, 2024

Tant que ça marche c'est l'essentiel

from caresteouvert.

PanierAvide avatar PanierAvide commented on June 13, 2024

C'est publié sur data.gouv.fr, merci !

from caresteouvert.

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.