GNOME Bugzilla – Bug 549942
Spain locations
Last modified: 2021-06-09 21:03:25 UTC
I would like to have some more cities in libgweather: Álava Albacete Ávila Badajoz Burgos Cáceres Cádiz Castellón Ciudad Real Cuenca Gijón Guadalajara Huelva Huesca Jaén La Rioja Lérida Lugo Murcia Orense Oviedo Pamplona Pontevedra Segovia Sevilla Soria Tarragona Teruel Toledo Zamora All of these are cities in Spain. may I provide more info? Thanks.
Below is the format to use. -One per city. -Do not change the format, but only the content. -City and Airport name should be the American version (since the list is in that language). -The airport code is the ICAO code. If the city doesn't have an airport with an ICAO code, then do not include it. If you wish to create the patch yourself, this is a fragment of the libgweather/data/Locations.xml.in file. If you'd like help creating the patch, then attach (don't paste) the finished list to this bug report. <city> <!-- Translators: this is a city in Spain --> <_name>Barcelona</_name> <coordinates>41.383333 2.183333</coordinates> <location> <name>Barcelona Airport</name> <code>LEBL</code> <coordinates>41.283333 2.066667</coordinates> </location> </city>
er, no, Locations.xml.in is generated from other data. we don't want patches to it directly. there'll be more info about how to fix locations once we're ready to deal with that, which will hopefully be soon
Please see http://live.gnome.org/LibGWeather/ImprovingLocations
Dan, so you say not to add a patch to Locations.xml.in but the link you provide says the opposite. Plus, the link says to add major cities to major-cities.txt but it only has cities of the USA. Then, what should I do? Add a patch to Locations.xml.in only with the cities that have airport? no patch at all and wait?
Sorry, I've clarified the page a little now; you should examine Locations.xml.in to see what cities are missing, but you can't fix the problem by patching Locations.xml.in; you need to patch major-cities.txt instead, and the changes you make there will get propagated to Locations.xml.in when we rebuild it. major-cities.txt currently only has US cities because that's the only country we've added major cities for yet. Spain can be second if you hurry! ;-) Also, as noted more explicitly in the wiki now, please also look for "junk" cities that should be removed, to help reduce the overall size of the database.
Ok Dan, following the instructions on the wiki I created the list. This list contains "big cities" as such (pop => 100.000) and capital of provinces. The comments are referred to the province in which the city is. # Spain. Source: Wikipedia. "Incorporated Places of # 100,000 or More, Ranked by Population, and Province capitals" ES 40.433 -003.683 3 Madrid # Madrid ES 41.383 002.166 2 Barcelona # Barcelona ES 39.470 -000.376 2 Valencia # Valencia ES 37.366 -005.983 2 Sevilla # Sevilla ES 41.650 -000.883 2 Zaragoza # Zaragoza ES 36.719 -004.420 2 Málaga # Málaga ES 37.986 -001.130 2 Murcia # Murcia ES 39.566 002.650 2 Palma de Mallorca # Mallorca ES 28.150 -105.416 2 Las Palmas de Gran Canaria # Las Palmas ES 43.256 -002.923 2 Bilbao # Vizcaya ES 38.345 -000.483 2 Alicante # Alicante ES 37.883 -004.766 2 Córdoba # Córdoba ES 41.633 -004.716 2 Valladolid # Valladolid ES 42.236 -008.726 1 Vigo # Pontevedra ES 43.533 -005.700 1 Gijón # Asturias ES 41.358 002.099 1 Hospitalet de Llobregat # Barcelona ES 43.366 -008.383 2 A Coruña # A Coruña ES 37.178 -003.600 2 Granada # Granada ES 42.850 -002.683 2 Vitoria-Gasteiz # Álava ES 38.266 -000.698 1 Elche # Alicante ES 28.466 -016.250 2 Santa Cruz de Tenerife # Tenerife ES 43.360 -005.845 2 Oviedo # Asturias ES 41.433 002.233 1 Badalona # Barcelona ES 37.600 000.983 1 Cartagena # Murcia ES 40.316 -003.850 1 Móstoles # Madrid ES 41.561 002.008 1 Terrasa # Barcelona ES 36.700 -006.116 1 Jerez de la Frontera # Cádiz ES 41.548 002.107 1 Sabadell # Barcelona ES 40.466 -003.366 1 Alcalá de Henares # Madrid ES 42.818 -001.644 2 Pamplona # Navarra ES 40.283 -003.800 1 Fuenlabrada # Madrid ES 36.833 -002.450 2 Almería # Almería ES 43.321 -001.985 2 Donostia-San Sebastián # Guipúzcoa ES 40.316 -003.750 1 Leganés # Madrid ES 43.450 -003.800 2 Santander # Cantabria ES 39.983 -000.033 2 Castellón de la Plana # Castellón ES 42.350 -003.700 2 Burgos # Burgos ES 40.350 -003.833 1 Alcorcón # Madrid ES 38.995 -001.855 2 Albacete # Albacete ES 40.300 -003.716 1 Getafe # Madrid ES 40.966 -005.666 2 Salamanca # Salamanca ES 42.464 -002.445 2 Logroño # La Rioja ES 28.483 -016.300 1 San Cristóbal de la Laguna # Tenerife ES 37.250 -006.950 2 Huelva # Huelva ES 38.883 -006.966 2 Badajoz # Badajoz ES 41.115 001.249 2 Tarragona # Tarragona ES 42.600 -005.583 2 León # León ES 41.613 000.625 2 Lleida # Lleida ES 36.500 -004.883 1 Marbella # Málaga ES 36.533 -006.283 2 Cádiz # Cádiz ES 37.283 -005.922 1 Dos Hermanas # Sevilla ES 41.533 002.450 1 Mataró # Barcelona ES 41.453 002.211 1 Santa Coloma de Gramenet # Barcelona ES 40.450 -003.483 1 Torrejón de Ardoz # Madrid ES 37.766 -003.783 2 Jaén # Jaén ES 36.133 -005.450 1 Algeciras # Cádiz ES 40.233 -003.266 1 Parla # Madrid ES 41.155 001.108 1 Reus # Tarragona ES 40.533 -003.633 1 Alcobendas # Madrid ES 42.336 -007.863 2 Ourense # Ourense ES 37.977 -000.683 1 Torrevieja # Alicante ES 43.016 -007.550 2 Lugo # Lugo ES 41.984 002.821 2 Girona # Girona ES 42.866 -008.550 2 Santiago de Compostela # A Coruña ES 39.473 -006.371 2 Cáceres # Cáceres ES 42.016 -004.533 2 Palencia # Palencia ES 40.633 -003.166 2 Guadalajara # Guadalajara ES 39.856 -004.025 2 Toledo # Toledo ES 42.433 -008.647 2 Pontevedra # Pontevedra ES 35.888 -005.316 2 Ceuta # Ceuta ES 38.983 -003.916 2 Ciudad Real # Ciudad Real ES 35.291 -002.938 2 Melilla # Melilla ES 41.500 -005.750 2 Zamora # Zamora ES 40.950 -004.166 2 Segovia # Segovia ES 40.650 -004.683 2 Ávila # Ávila ES 40.066 -002.150 2 Cuenca # Cuenca ES 42.133 -000.416 2 Huesca # Huesca ES 41.766 -002.466 2 Soria # Soria ES 40.343 -001.107 2 Teruel # Teruel I'm also attaching a patch with the info. Anything else is needed?
Created attachment 128736 [details] [review] Patch containing major cities of Spain
Hi, I've just checked the data/major-cities.txt and the changes Jorge had proposed aren't yet there. I've also noticed that some of those Spanish cities are already in the data/Locations.xml.in but they have the city name changed. For example, Sevilla now is like this: <city> <!-- A city in Spain --> <_name>San Pablo</_name> <coordinates>37.416667 -5.883333</coordinates> <location> <name>Sevilla Airport</name> <code>LEZL</code> <coordinates>37.416667 -5.900000</coordinates> </location> </city> And should be like this: <city> <!-- A city in Spain --> <_name>Sevilla</_name> <coordinates>37.416667 -5.883333</coordinates> <location> <name>Sevilla Airport, San Pablo</name> <code>LEZL</code> <coordinates>37.416667 -5.900000</coordinates> </location> </city> So people could find it like they did in earlier versions. My question is. This kind of things should be fidex also by adding to the list on data/major-cities.txt as Jorge did or it should be fixed in the data/Locations.xml.in itself? I not totally sure from where that info was taken but I guess that adding the new list it doesn't fix nothing, just add duplicated cities but with one wrong. I did made a try fixing one (actually, the Sevilla one) directly into the Locations.xml.in, then I generated the libgweather and the changed was in all the generated Locations.[??].xml. Well, I hope this help and we can get soon a proper list (as we did before) of Spanish cities in this module :-) Cheers
Sorry, the last bit we need is for you to go through the existing cities and figure out which ones are useless junk that should just be removed; the wiki page (http://live.gnome.org/LibGWeather/ImprovingLocations) describes what constitutes "junk". This is important because we want to reduce the total number of translatable strings in the file.
Juanje: the documentation says the cities must be added to other document, since the plan is to use only major-cities.txt, that's why I added all the major cities in Spain. Plus, the list I'm suggesting does not have any errors, is just a plain list of major cities. Dan: I can check out the old list and remove junk, in fact, as I understood all the cities in the old list could be removed if we are to use major-cities.txt. However my list is probably bigger than the actual one, since it's a bit outdated, nevermind that's the list the docs ask for.
Dan, Jorge: I just wanted to point out that probably a lot of the missing cities weren't missig, just bad renamed (because once there were already fine). And my question was because I saw as different thing to add new cities that are not yet there than fix names of cities that are well geotaged but with the wrong city name. Anyway, I also see better to clean up all those Spanish cities from the Locations.xml.in and add the Jorge's major-cities.txt list. I can help with any of those task if you need it. Just one more question. From where the end Locations.xml get the weather station? I can't see that information at the major-cities.txt. Thanks and cheers
(In reply to comment #10) > Dan: I can check out the old list and remove junk, in fact, as I understood all > the cities in the old list could be removed if we are to use major-cities.txt. That's possible. If it's easier, just indicate which (if any) existing cities should be *kept*. (In reply to comment #11) > Just one more question. From where the end Locations.xml get the weather > station? I can't see that information at the major-cities.txt. The list of weather stations comes from somewhere else, and we use latitude and longitude to automatically assign the closest weather station to each city.
I have read this post and this page http://live.gnome.org/LibGWeather/ImprovingLocations. I would like to say what I think should be the list of cities from Spain if you wan't it short, clean and complete. I made a search in wikipedia (es) to get a list of the capitals of province in Spain (http://es.wikipedia.org/wiki/Categoría:Capitales_de_provincia_de_España) I got the same list in english (http://en.wikipedia.org/wiki/Provinces_of_Spain) Then I got the list of airports in Spain (http://www.aena.es/csee/Satellite?SiteName=Aeropuertos&c=Page&cid=1042648537487&pagename=subHome) (There is a dropdown menu on the left to select airports) The list should never be less than the list of the capitals of province. It could be the sum of cities in these two list. But I'm not sure it should include more than the sum of cities in these two lists. Let me tell you why. Even if you leave out some cities with more than 100,000 people. It has to be noted that most of those cities are very close to each other. In fact some are so close that you only have to cross the street to go from one to another. Check this: http://es.wikipedia.org/wiki/Lista_de_municipios_de_Espa%C3%B1a_por_poblaci%C3%B3n#Distribuci.C3.B3n_de_los_municipios_de_m.C3.A1s_de_50.000_habitantes_por_comunidades_aut.C3.B3nomas Cataluña: Having 4 provinces, has 10 cities with more than 100,000 people. (And some of them are touching each other) Com. de Madrid: Having only 1 province, has 10 cities with more than 100,000 people. (and the distance between them is only a few miles) Com. de Valencia: Having 3 provinces, has 5 cities with more than 100,000 people. So, to summarize, if you get the list of cities with airports, you already have a good list of weather stations including most of the capitals of province and all the places in spain with enough people to be worth it having an airport, is it possible to have a better criteria to build the list? Then you only need to find weather stations for the capitals without an airport (must be very few). I'm sure they are all here: http://www.nws.noaa.gov/tg/siteloc.shtml I can help finding the information needed for these cities, in fact, I live in Huesca near the Pirineos, and it was very easy to find all the information about Huesca (the capital) and its airport. I won't ask you to add Santa Cilia (with an aerodrome and several weather stations around) but Huesca is one of the 50 capitals in Spain and has an airport, even if it's less than 100,000 people, it should be added instead of Colmenar Viejo, Getafe or some others. Regards. http://gc.kls2.com/airport/LEHC http://weather.noaa.gov/weather/current/LEHC.html http://en.wikipedia.org/wiki/Huesca_Airport City Name Huesca City Position Latitude: 42°08'N (42.133333) Longitude: 0°25'W (-0.416667) Airport Name Huesca-Pirineos Airport ICAO code LEHC Airport IATA code HSK Airport Position Latitude: 42°04'51"N (42.080927) Longitude: 0°19'24"W (-0.323469) Weather NOAA WMO Index Number: 08094 METAR: LEHC 071700Z 26004KT 8000 -DZ VV020 03/02 Q0997
Quoting Pedro: "Even if you leave out some cities with more than 100,000 people. It has to be noted that most of those cities are very close to each other. In fact some are so close that you only have to cross the street to go from one to another." That's a point, especially when we wan't to get rid of some cities and leave just the more important ones. However what we're trying to do here is to add more cities of Spain, not to remove them, so it's clear we want all the capital cities to be in, that's out of the question.
Ok. Sorry, for my long post. I was going to post a new bug with a request for new cities when I've seen this one. So I just copied the elaborated comment I had written, modified a couple of things to fit in this post and pasted it. So, to explain it a little better, what I read in the 'ImproveLocations' page is that one of the requirements is to remove 'junk' data. That's why I wrote my idea of what would be a short yet useful list. Of course the population of a city is basic to select it to be on the list, but in my opinion there are other conditions that are more important. Like having an airport nearby (which is already stated as 'sine qua non' codition to be on the list in this same post) which would make Reus elegible for the list before Terrasa or Badalona (bigger cities) and which makes sense to me. So having an usable weather station nearby (be it an airport or not) should be the second most important condition to be on the list. Being capital of a province should be first, probably. Having a big population should be third and should itself be conditioned to not being close to a city which fits in the first or second conditions. How close? I don't know, but do you really think it makes sense to have cities from Comunidad de Madrid other than Madrid itself?
Who should make this into trunk? I can confirm this for gnome 2.30 (Ubuntu Lucid), still s/San Pablo/Sevilla San Pablo/g.
*** Bug 657205 has been marked as a duplicate of this bug. ***
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/libgweather/-/issues/96.