緣起
問題
可能方法
階段性目標 - 1
將台北市 AirBox 感測點與台北的寺廟,分兩類顯示在 google map 上,方法公開, code 上傳 LASS, 讓大家也能做
利用openstreetmap 資料結取功能
Data Flow
快速驗證可行性
{"schemaname":"AirBoxProfile","entries":[{"device_id":"28C2DDDD3FFA","vendor":"1","ver_format":"3","fmt_opt":"1","app":"AirBox","ver_app":"1.0","device":"Aa","gps_lat":25.04,"gps_lon":121.612,"gps_fix":1,"gps_num":9,"gps_alt":2.0},{"device_id":"28C2DDDD47D5","vendor":"1","ver_format":"3","fmt_opt":"1","app":"AirBox","ver_app":"1.0","device":"MoLa","gps_lat":24.806,"gps_lon":121.01,"gps_fix":1,"gps_num":9,"gps_alt":2.0}]}
<GARDENREC>
<SNO><![CDATA[R0001]]></SNO>
<RELIGION_TYPE><![CDATA[財團法人寺廟]]></RELIGION_TYPE>
<CB_NAME><![CDATA[財團法人台北市松山慈祐宮]]></CB_NAME>
<CB_SNAME><![CDATA[媽祖廟]]></CB_SNAME>
<PTNAME1><![CDATA[松山區]]></PTNAME1>
<V_NAME><![CDATA[慈祐里]]></V_NAME>
<CB_REG_TITLE><![CDATA[道教]]></CB_REG_TITLE>
<PRESIDENT_NAME><![CDATA[陳玉峰]]></PRESIDENT_NAME>
<CB_TEL><![CDATA[27669212]]></CB_TEL>
<TOTAL_ADDR><![CDATA[八德路4段761號]]></TOTAL_ADDR>
<R_STREET><![CDATA[八德路]]></R_STREET>
<R_SECTION><![CDATA[4段]]></R_SECTION>
<R_LANE/>
<R_ALLEY/>
<R_NO><![CDATA[761號]]></R_NO>
<R_OTHER/>
<TM97_X><![CDATA[308291.278]]></TM97_X>
<TM97_Y><![CDATA[2771557.324]]></TM97_Y>
<DATA_STR><![CDATA[農曆3月23日(天上聖母聖誕)|]]></DATA_STR>
<REG_NO><![CDATA[100證他字第789號登記簿第19冊第13頁第272號]]></REG_NO>
</GARDENREC>
300M 內有宗教團體與其數量
device_id | device | gps_lat | gps_lon | 數量 |
28C2DDDD4243 | SSPSAIRBOX | 25.05 | 121.577 | 5 |
28C2DDDD436F | TYES | 25.023 | 121.498 | 4 |
28C2DDDD4371 | tpesairbox | 25.061 | 121.512 | 4 |
28C2DDDD4598 | ylpsPM25 | 25.061 | 121.51 | 4 |
28C2DDDD477E | lungshan | 25.051 | 121.511 | 4 |
28C2DDDD455E | wtps | 25.023 | 121.499 | 3 |
28C2DDDD4566 | FDPS | 25.038 | 121.586 | 3 |
28C2DDDD458F | clpsbox | 25.036 | 121.532 | 3 |
28C2DDDD41EB | LnesAir | 25.119 | 121.505 | 2 |
28C2DDDD4236 | ZHPSpm25 | 25.054 | 121.517 | 2 |
28C2DDDD434C | SHUANGLIAN | 25.057 | 121.521 | 2 |
28C2DDDD455C | PtesPM25 | 25.134 | 121.5 | 2 |
28C2DDDD4572 | chespm2525 | 25.042 | 121.531 | 2 |
28C2DDDD457E | slesAirBox | 25.061 | 121.517 | 2 |
28C2DDDD45A9 | R119PM25senseA9 | 25.064 | 121.517 | 2 |
28C2DDDD4618 | Realtek18 | 25.053 | 121.615 | 2 |
28C2DDDD47AF | PM25 | 25.085 | 121.553 | 2 |
28C2DDDD4229 | AirBox | 25.115 | 121.512 | 1 |
28C2DDDD4230 | TAESpm25 | 25.02 | 121.549 | 1 |
28C2DDDD4234 | Pm25 | 25.002 | 121.552 | 1 |
28C2DDDD4246 | airbox | 25.126 | 121.507 | 1 |
28C2DDDD4346 | 4346 | 25.025 | 121.513 | 1 |
28C2DDDD434E | RHLab | 25.041 | 121.522 | 1 |
28C2DDDD434F | WSESPM25 | 25.045 | 121.541 | 1 |
28C2DDDD4357 | Airdetect | 24.987 | 121.55 | 1 |
28C2DDDD4360 | Jtes | 25.08 | 121.522 | 1 |
28C2DDDD436C | LSESPM25 | 25.036 | 121.496 | 1 |
28C2DDDD4376 | kjes | 25.021 | 121.5 | 1 |
28C2DDDD437D | Haps | 25.034 | 121.533 | 1 |
28C2DDDD43E5 | klpspm25 | 25.08 | 121.595 | 1 |
28C2DDDD43ED | Cupsair | 25.033 | 121.528 | 1 |
28C2DDDD4404 | hdps | 25.002 | 121.551 | 1 |
28C2DDDD4414 | zzesairpm | 25.039 | 121.62 | 1 |
28C2DDDD4505 | chps | 24.996 | 121.548 | 1 |
28C2DDDD4534 | hulu | 25.084 | 121.507 | 1 |
28C2DDDD4559 | Pm25 | 25.029 | 121.558 | 1 |
28C2DDDD456A | PM25 | 25.035 | 121.551 | 1 |
28C2DDDD456C | PM25 | 25.056 | 121.516 | 1 |
28C2DDDD4571 | WfAirBox01 | 25.005 | 121.537 | 1 |
28C2DDDD457C | SLPSPM2501 | 25.093 | 121.524 | 1 |
28C2DDDD4599 | TLPSPM25 | 25.031 | 121.492 | 1 |
28C2DDDD45A1 | pm25 | 25.105 | 121.482 | 1 |
airbox "SSPSAIRBOX"監測點 周圍300M內的宗教團體
參考 中研院QGIS GIS 資訊網中 提供的openstreetmap 資料截取功能介紹
"使用Overpass API攫取OpenStreetMap的向量資料"
在http://harrywood.co.uk/maps/uixapi/xapi.html 網頁中在node 擷取過程中將內容設定為 amenity=place_of_worship
也可以截取出宗教團體的空間坐標資訊api 範例 ,但內容可能需要清一下。
可以透過 overpass turbo 存取 overpass api ,能匯出 geoJSON, GPX, KML
https://overpass.nchc.org.tw/overpass-turbo/?q=LyoKVGhpcyBoYcSGYmVlbiBnxI1lcmF0ZWQgYnkgdGhlIG92xJJwxIlzLXR1cmJvIHdpemFyZC7EgsSdxJ9yaWdpbmFsIHNlxLBjaMSsxIk6CsOiwoDCnGFtxI1pdHk9cGxhY2Vfb2Zfd29yc8SEcCDEuiDDpcKPwrDDp8KBwqPFiMKdCiovCltvdXQ6anNvbl1bdGnFjMWxxbMyNV07Ci8vIGZldMWCIMSwxYAgxYjCnMWkxabFqMWqxJvEq8S_xYHFg8S6Cnt7xJBvY29kZUFyxYA6xpLFp8KjfX0tPi7GmHLFgsalxYDGg8aFxI_ElMSdciDGpnN1bHRzCigKICDGt3F1xJLEmsSjcnTGh8WcOsaPxYnFi8WNxY_FkcWTxZXFl8WZxZvFncWfxarHhSBuxqJlWyLHlW7FjnkiPSLFksWUxZbFmMWaxZzFnmlwIl0oxo1hxrDFgMayaMa0YSnGg8eGd2F5x6bHqMeqx6zHrseZx7HHnMe0xZ_HuMe6xqbHvMaxxrPIlciDx6HGpsWTxbvFt8iJxYzHqcWPyIzHr8eax7LHnce1x7fHuce7x73GmciByJrImsa3cMS3bsePxr3Gv8eBCsW-xJjGonnGgz7Gg8i7c2tlxL1xdDs&c=B7C9vwsRtI&R
成果如下
<node id="470241905" lat="25.0185490" lon="121.5331553">
<tag k="addr:housenumber" v="86"/>
<tag k="addr:street" v="新生南路三段"/>
<tag k="amenity" v="place_of_worship"/>
<tag k="denomination" v="lutheran"/>
<tag k="name" v="台北真理堂"/>
<tag k="name:en" v="Taipei Truth Lutheran Church"/>
<tag k="name:zh" v="台北真理堂"/>
<tag k="religion" v="christian"/>
<tag k="wheelchair" v="yes"/>
</node>
<node id="698446646" lat="24.9957874" lon="121.5522614">
<tag k="amenity" v="place_of_worship"/>
<tag k="name" v="福安宮"/>
</node>
<node id="848228075" lat="24.9779788" lon="121.5926536">
<tag k="amenity" v="place_of_worship"/>
<tag k="name" v="指南宮大成殿"/>
<tag k="religion" v="buddhist"/>
</node>
<node id="848228193" lat="24.9798780" lon="121.5866610">
<tag k="amenity" v="place_of_worship"/>
<tag k="name" v="指南宮"/>
<tag k="religion" v="buddhist"/>
</node>
<node id="848228335" lat="24.9803640" lon="121.5886960">
<tag k="amenity" v="place_of_worship"/>
<tag k="name" v="指南宮凌霄寶殿"/>
<tag k="religion" v="buddhist"/>
</node>