After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 682730 - Adjust the location for two italian cities: Ancona and Bologna
Adjust the location for two italian cities: Ancona and Bologna
Status: RESOLVED FIXED
Product: libgweather
Classification: Core
Component: locations
3.5.x
Other All
: Normal normal
: future
Assigned To: libgweather-maint
libgweather-maint
Depends on:
Blocks:
 
 
Reported: 2012-08-26 16:09 UTC by g.trentalancia
Modified: 2012-08-27 17:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch for git master to adjust the location for two italian cities: Ancona and Bologna (1.71 KB, patch)
2012-08-26 16:09 UTC, g.trentalancia
none Details | Review
Patch to adjust the location for two italian cities (1.20 KB, patch)
2012-08-27 10:40 UTC, g.trentalancia
committed Details | Review

Description g.trentalancia 2012-08-26 16:09:00 UTC
The following patch (against git master)adjusts the location for two italian cities: Ancona and Bologna:

Adjust the location for two italian locations: Ancona
and Bologna.

Signed-off-by: Guido Trentalancia <guido@trentalancia.com>
---
 data/Locations.xml.in |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

--- libgweather-git-master-26082012/data/Locations.xml.in	2012-08-26 18:00:30.399582307 +0200
+++ libgweather-git-master-26082012-updated-locations-IT/data/Locations.xml.in	2012-08-26 18:02:46.635886449 +0200
@@ -63655,11 +63655,11 @@
       &lt;city&gt;
         &lt;!-- A city in Italy --&gt;
         &lt;_name&gt;Bologna&lt;/_name&gt;
-        &lt;coordinates&gt;44.483333 11.333333&lt;/coordinates&gt;
+        &lt;coordinates&gt;44.493850 11.342400&lt;/coordinates&gt;
         &lt;location&gt;
           &lt;name&gt;Borgo Panigale Airport&lt;/name&gt;
           &lt;code&gt;LIPE&lt;/code&gt;
-          &lt;coordinates&gt;44.533333 11.300000&lt;/coordinates&gt;
+          &lt;coordinates&gt;44.527800 11.294370&lt;/coordinates&gt;
         &lt;/location&gt;
       &lt;/city&gt;
       &lt;city&gt;
@@ -63988,12 +63988,12 @@
       &lt;/city&gt;
       &lt;city&gt;
         &lt;!-- A city in Italy --&gt;
-        &lt;_name&gt;Molino di Ancona&lt;/_name&gt;
-        &lt;coordinates&gt;43.616667 13.366667&lt;/coordinates&gt;
+        &lt;_name&gt;Ancona&lt;/_name&gt;
+        &lt;coordinates&gt;43.616530 13.518780&lt;/coordinates&gt;
         &lt;location&gt;
-          &lt;name&gt;Falconara&lt;/name&gt;
+          &lt;name&gt;Falconara Airport&lt;/name&gt;
           &lt;code&gt;LIPY&lt;/code&gt;
-          &lt;coordinates&gt;43.616667 13.366667&lt;/coordinates&gt;
+          &lt;coordinates&gt;43.605950 13.354360&lt;/coordinates&gt;
         &lt;/location&gt;
       &lt;/city&gt;
       &lt;city&gt;
Comment 1 g.trentalancia 2012-08-26 16:09:47 UTC
Created attachment 222477 [details] [review]
Patch for git master to adjust the location for two italian cities: Ancona and Bologna
Comment 2 Giovanni Campagna 2012-08-26 16:19:08 UTC
While the patch itself is pretty straightforward, there seems to be an XML escaping problem.
If possible, try to upload it again.
Comment 3 g.trentalancia 2012-08-27 10:39:16 UTC
Yes, I bet it didn't apply... Here is it, very simple:

--- libgweather-git-master-27082012/data/Locations.xml.in	Mon Aug 27 10:34:26 2012
+++ libgweather-git-master-27082012-adjust-IT-locations/data/Locations.xml.in	Mon Aug 27 10:36:40 2012
@@ -15735,11 +15735,11 @@
       <city>
         <!-- A city in Italy -->
         <_name>Bologna</_name>
-        <coordinates>44.483333 11.333333</coordinates>
+        <coordinates>44.493850 11.342400</coordinates>
         <location>
           <name>Borgo Panigale Airport</name>
           <code>LIPE</code>
-          <coordinates>44.533333 11.300000</coordinates>
+          <coordinates>44.527800 11.294370</coordinates>
         </location>
       </city>
       <city>
@@ -16068,12 +16068,12 @@
       </city>
       <city>
         <!-- A city in Italy -->
-        <_name>Molino di Ancona</_name>
-        <coordinates>43.616667 13.366667</coordinates>
+        <_name>Ancona</_name>
+        <coordinates>43.616530 13.518780</coordinates>
         <location>
-          <name>Falconara</name>
+          <name>Falconara Airport</name>
           <code>LIPY</code>
-          <coordinates>43.616667 13.366667</coordinates>
+          <coordinates>43.605950 13.354360</coordinates>
         </location>
       </city>
       <city>
Comment 4 g.trentalancia 2012-08-27 10:40:08 UTC
Created attachment 222523 [details] [review]
Patch to adjust the location for two italian cities
Comment 5 Giovanni Campagna 2012-08-27 11:30:28 UTC
Review of attachment 222523 [details] [review]:

Thank you for the patch, it's good to go!
Tell me if you don't have commit access, and I'll push it.
Comment 6 g.trentalancia 2012-08-27 12:42:07 UTC
Review of attachment 222523 [details] [review]:

The accuracy is not an issue, I suppose, since it's used for weather conditions.

The main problem was the naming as "Molino di Ancona" did not get picked up when "Ancona" was being typed in the box.

I didn't check the rest of the locations, maybe if time allows, next time...

I do not have commit access, as I'm not a libgweather developer, I was just using it and discovered that issue - that's it.
So, I think, you'll have to push it. Thanks.
Comment 7 Giovanni Campagna 2012-08-27 14:04:04 UTC
Actually, coordinates are used for sun and moon calculations, primarily.
Only in the US they're used for weather.

In any case, thanks for patch, pushed!

PS: if you know a way to access structured data from Aeronautics or
the regional environment agencies, that would be extra cool. So far, weather
forecast in Italy is absent.
Comment 8 g.trentalancia 2012-08-27 17:32:29 UTC
Well, if it is for sun/moon set/rise time calculations then the location accuracy is even less important than for weather.

Almost every country in the world is probably publishing weather data on the web or at least on the Internet nowadays.

The main problem with weather data is licensing, I suppose. But if some agency or private company publishes such information through an Internet resource which does not require a password or login, it usually means that it is freely licensed at least for personal use, which applies to the case (problems usually arise with data replication).

In Italy, for example, I think you can gather weather data at major national civil airports from the web resources of Aereonautica Miliare as follows:

http://www.meteoam.it/?q=ta/infoStazione/ICAO

where "ICAO" in the URL above is the ICAO code for the airport (which is exactly what you are already using in the libgweather location database).

Since it's plain HTML, you can then process such data as you prefer.

Such resource provides: temperature, humidity, atmospheric pressure, wind direction and speed, visibility as well as an icon (from a predefined set of icons) and a brief textual description of the current meteorological situation.

I think it is updated at least every hour.

Otherwise, a more general data resource that I can think of is http://worldweather.wmo.int (data for Italy is based on the same original resource mentioned above, with much less detail and number of locations).