Skip to content

lologhi/MassAPI

Repository files navigation

MassAPI

SensioLabsInsight

Starting with France, and based on ÉgliseInfo / MessesInfo data, trying to improve the mass schedules visualisations.

  1. Retrieving mass schedules and places (For France, through ÉgliseInfo / MessesInfo GWT API (example here)
  2. Working on nice visualisations, maps, nearest mass...

Using: Schema.org, Platform API, SyliusResourceBundle

Thinking it might become a wordwide platform, here are listed other information sources.

OSM POI retrieval

i.e. OpenStreetMap Point of Interest

Overpass API

Presentation is here, and an online tester and request generator is here (Overpass Turbo)). And there is an interesting PHP tool: mediasuitenz/Overpass2Geojson

Overpass Turbo export for church search :

[out:json][timeout:25];
// gather results
(
  // query part for: “church”
  node["amenity"="place_of_worship"]["religion"="christian"]({{bbox}});
  way["amenity"="place_of_worship"]["religion"="christian"]({{bbox}});
  relation["amenity"="place_of_worship"]["religion"="christian"]({{bbox}});
);
// print results
out body;
>;
out skel qt;

With this export, query example:

http://overpass.osm.rambler.ru/cgi/interpreter?data=[out:json][timeout:25];(node[%22amenity%22=%22place_of_worship%22][%22religion%22=%22christian%22](48.853900969160016,2.318415641784668,48.879618718790276,2.358026504516601);way[%22amenity%22=%22place_of_worship%22][%22religion%22=%22christian%22](48.853900969160016,2.318415641784668,48.879618718790276,2.358026504516601);relation[%22amenity%22=%22place_of_worship%22][%22religion%22=%22christian%22](48.853900969160016,2.318415641784668,48.879618718790276,2.358026504516601););out;

Returning something like:

...
{
  "type": "way",
  "id": 69226577,
  "nodes": [
    1198731739,
    ...
    1198731739
  ],
  "tags": {
    "amenity": "place_of_worship",
    "architect": "Alexandre-Théodore Brongniart",
    "architect:wikipedia": "fr:Alexandre-Théodore Brongniart",
    "building": "church",
    "denomination": "catholic",
    "name": "Église Saint-Louis-d'Antin",
    "ref:FR:CEF": "75109_03",
    "religion": "christian",
    "source": "cadastre-dgi-fr source : Direction Générale des Impôts - Cadastre. Mise à jour : 2010",
    "start_date": "1780",
    "wheelchair": "no",
    "wheelchair_toilet": "unknown",
    "wikipedia": "fr:Église Saint-Louis-d'Antin"
  }
},
...

Planet.osm and Osmosis

"Planet.osm is the OpenStreetMap data in one file: all the nodes, ways and relations that make up our map." (here) There are sub-regions files available, but for example France is still 3.2Go compressed file.

Osmosis is the Java tool to manipulate and filter .osm files. Documentation here

After retrieving a compressed .osm.bz2 file, use bzip2 -d filename.osm.bz2 command to get the full set. Then, to filter :

osmosis --read-xml france-latest.osm --node-key-value keyValueList="amenity.place_of_worship" --write-xml placeOfWorkship-node.osm

Output XML file looks like:

<?xml version='1.0' encoding='UTF-8'?>
<osm version="0.6" generator="Osmosis 0.45">
  <node id="251869088" version="3" timestamp="2012-02-29T13:51:07Z" uid="26687" user="Rouni" changeset="10827909" lat="49.0339231" lon="2.4744152">
    <tag k="name" v="Église Saint-Michel"/>
    <tag k="amenity" v="place_of_worship"/>
    <tag k="religion" v="christian"/>
    <tag k="created_by" v="JOSM"/>
  </node>

But it's only node (1.9Mo file from a 82Go file for France POI...), and no ways. But churches can be the two of them so I also tried :

osmosis --read-xml france-latest.osm --way-key-value  keyValueList="amenity.place_of_worship" --write-xml placeOfWorkship-way.osm
osmosis --read-xml france-latest.osm --tf accept-nodes amenity=place_of_worship --write-xml placeOfWorkship-way.osm

But the result was so huge (~27Go) that it might not be good. 32% POI in France being place_of_worship is too much!

Also tried osmcode/osmium-tool but it seems not made to filter data.

About

MessesInfo replacement

[Work in progress]

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published