이 프로그램은 기상정보 open api인 open weather map api를 가져와 간단하게 사용할 수 있도록 만든 프로그램입니다.
3가지 기능을 구현했으며, [1. 현재 날씨 2. 일기 예보 3. 미세 먼지] 세가지 기능이 있습니다.
현재 날씨는 3가지 정보로 검색이 가능합니다. 위도와 경도, 도시 이름, 우편 번호로 현재 날씨를 검색합니다.
일기 예보와 미세 먼지는 도시 이름으로만 검색이 가능합니다.
open geocoding API https://nominatim.org/
oepn weather map API https://openweathermap.org/
Licence: Data © OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright
리눅스
1. 파일 다운
$ wget [원하는 버전의 파일 다운로드 링크]
2. libcurl 설치
$ apt-get install libcurl4-openssl-dev
3. 압축 해제
tar.gz 파일
$ tar -zxvf [다운 받은 tar 파일]
zip 파일
$ unzip [다운 받은 zip 파일]
4. 실행 파일 만들기
$ g++ -o weather main.cpp -lcurl
5. 실행
$ ./weather
-
현재 날씨
a. 위도, 경도 : 위도, 경도 정보를 입력하면 현재 날씨 정보를 반환받는다.
b. 도시 이름 : 도시 이름을 입력하면 현재 날씨 정보를 반환받는다.
c. 우편 번호 : 우편 번호를 입력하면 현재 날씨 정보를 반환받는다.
-
5일치 일기 예보 : 도시 이름을 입력하면 5일치 일기 예보를 반환받는다.
-
미세먼지 : 도시 이름을 입력하면 현재 미세먼지 정보를 반환받는다.
-
종료 : 프로그램을 종료시킨다.
This project is licensed under the MIT license. Please see the LICENSE file distributed with this source code for further information regarding copyright and licensing.
Be aware that the OpenWeatherMap data is not licensed under the MIT. Check out the following official links to read about the terms, pricing and license of OpenWeatherMap before using their service: