You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tdetoys/kweather
Slávek Banko 93f97fe140
Remove unwanted end spaces in kweather-stations.desktop.
3 years ago
..
data Resolve ambiguous station names 4 years ago
graphics Fix invalid headers in PNG files and optimize for size 8 years ago
AUTHORS Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
CMakeL10n.txt kweather: Improve station list processing 4 years ago
CMakeLists.txt KWeather Konqueror sidebar revival 3 years ago
Makefile.am LIB_QT -> LIB_TQT conversion to align to updated admin module 6 years ago
README.txt kweather: Improve station list processing 4 years ago
configure.in.in Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
dockwidget.cpp KWeather Konqueror sidebar revival 3 years ago
dockwidget.h Removed code formatting modelines. 4 years ago
genstations.pl kweather: Improve station list processing 4 years ago
hi16-app-kweather.png Fix invalid headers in PNG files and optimize for size 8 years ago
hi32-app-kweather.png Fix invalid headers in PNG files and optimize for size 8 years ago
hi48-app-kweather.png Fix invalid headers in PNG files and optimize for size 8 years ago
kcmweather.cpp Rename additional header files to avoid conflicts with KDE4 12 years ago
kcmweather.desktop Desktop file translations: 5 years ago
kcmweather.h Fix FTBFS resulting from KCModule rename 12 years ago
kcmweatherservice.cpp Rename additional header files to avoid conflicts with KDE4 12 years ago
kcmweatherservice.desktop Desktop file translations: 5 years ago
kcmweatherservice.h Fix FTBFS resulting from KCModule rename 12 years ago
kweather.cpp KWeather Konqueror sidebar revival 3 years ago
kweather.desktop Desktop file translations: 5 years ago
kweather.h Rename a number of classes to enhance compatibility with KDE4 12 years ago
kweather.kdevprj Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
kweatherreport.desktop Update XDG information in support of bug report 892. 13 years ago
kweatherservice.desktop Desktop file translations: 5 years ago
main.cpp Rename additional header files to avoid conflicts with KDE4 12 years ago
metar_parser.cpp Rename KLocale to enhance compatibility with KDE4 12 years ago
metar_parser.h Rename additional header files to avoid conflicts with KDE4 12 years ago
metar_parser_test.cpp Rename KLocale to enhance compatibility with KDE4 12 years ago
prefdialogdata.ui Add includes to UI files to resolve FTBFS 6 years ago
reportmain.cpp Rename additional header files to avoid conflicts with KDE4 12 years ago
reportview.cpp Removed code formatting modelines. 4 years ago
reportview.h Rename kiobuffer and KHTML 12 years ago
serviceconfigdata.ui Add includes to UI files to resolve FTBFS 6 years ago
serviceconfigwidget.cpp Rename additional header files to avoid conflicts with KDE4 12 years ago
serviceconfigwidget.h Remove spurious TQ_OBJECT instances 13 years ago
sidebarwidget.cpp KWeather Konqueror sidebar revival 3 years ago
sidebarwidget.h KWeather Konqueror sidebar revival 3 years ago
stationdatabase.cpp rename the following methods: 13 years ago
stationdatabase.h Rename additional header files to avoid conflicts with KDE4 12 years ago
stationdatabase_test.cpp Rename KDEHOME and KDEDIR 13 years ago
sun.cpp rename the following methods: 13 years ago
sun.h Rename old tq methods that no longer need a unique name 13 years ago
sun_test.cpp Trinity Qt initial conversion 15 years ago
test.sh Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
weatherIface.h Trinity Qt initial conversion 15 years ago
weather_stations.desktop.in Remove unwanted end spaces in kweather-stations.desktop. 3 years ago
weatherbar.cpp KWeather Sidebar: timer fixes 3 years ago
weatherbar.desktop KWeather Konqueror sidebar revival 3 years ago
weatherbar.h KWeather Sidebar: timer fixes 3 years ago
weatherbar_add.desktop KWeather Konqueror sidebar revival 3 years ago
weatherbutton.cpp Removed code formatting modelines. 4 years ago
weatherbutton.h Removed code formatting modelines. 4 years ago
weatherlib.cpp Update METAR URL 8 years ago
weatherlib.h Rename KCModule, KConfig, KIO, KServer, and KSocket to avoid conflicts with KDE4 12 years ago
weatherlog.sh Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
weatherservice.cpp KWeather Konqueror sidebar revival 3 years ago
weatherservice.h KWeather Konqueror sidebar revival 3 years ago
weathersig.sh Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago

README.txt

January 2021
====================
Stations are retrieved from https://tgftp.nws.noaa.gov/data/nsd_cccc.txt

wget -O data/nsd_cccc.txt https://tgftp.nws.noaa.gov/data/nsd_cccc.txt

dos2unix data/nsd_cccc.txt

data/station_names.txt is used to provide correct orthography of the area
where the station is located, which is used in the configuration dialog 
of kweather applet.

The format of station_names.txt is ICAO;status;region_state;name;INFO1;INFO2

If status is one of none|false|na|decomissioned the station is ignored.
INFO1 is what was previously the 5th position in weather_stations.desktop
makred with ------
INFO2 is what was previously the 6th position in weather_stations.desktop
makred with ---

The source nsd_cccc.txt has illed information and structure that needs to be
corrected in the files used in kweather. Some of the problems are:
1. decomissioned stations
2. names of station locations

The genstations.pl is based on following idea

Based on the input nsd_cccc.txt and the station_names.txt file we can 
generate stations.dat like following:

  for each station in nsd_cccc.txt do
	check if station ID matches one in station_names.txt
	if it matches then
    	use the name of the station
    else
    	use the name from nsd_cccc.txt
    write entry/line in stations.dat
    
Based on stations.dat and weather_stations.desktop.in we can generate 
weather_stations.desktop.
weather_stations.desktop will be updated with the names from stations.dat 
and the additional information will be preserved like following.
  for each station in stations.dat 
	for each region from weather_stations.desktop.in 
		if state is provided in stations.dat
			use the state to build a key with region and state
		else
			for each state in the states of the region
				use the state to build a key
				if section for this key exists
				    and
					if name of the section matches
						stop processing
						proper section was found
						we add the station here
                        write entry for the station 

There are few problems with this approach and the ill provided nsd_cccc.txt data

1. States are missing and thus correlation between station and state can not be done
2. When State is missing, based on the country/state name some entries are ambig
	Example Georgia and US state of Georgia

Country list seemed to be used for the country names and as convention here
wget ftp://ftp.ncdc.noaa.gov/pub/data/noaa/country-list.txt but the FIPS notation was 
dropped in 2008 as a standard, however continiues to be used.

    "The Census Bureau decided that, based on decades of using the terminology FIPS to
    describe its codes, it would continue to use the FIPS name for its updated codes, 
    where FIPS now stood for FIP "Series", since there no longer existed an official 
    FIP "Standard". [https://en.wikipedia.org/wiki/FIPS_county_code]

A mapping to ISO 3166 ALPHA-2 https://laendercode.net/en/2-letter-list.html
seems more appropriate.

TODO: check the country code mapping in weather_stations.desktop.in