RSS Feeds, GeoRSS, Long/Lat, parsing to a map

If you have something to say that just doesn't fit into any of the forums above, then post it here, remember to keep it PG rated for the kids
Post Reply
User avatar
Blake
Registered User
Posts: 175
Joined: Tue Jan 26, 2016 9:25 am
Location: VIC

RSS Feeds, GeoRSS, Long/Lat, parsing to a map

Post by Blake »

I honestly couldn't think which category to put this into, so it's here.

Well, i've just been informed, that the VicEmergency website won't notify you of incident via email.
Long story, I won't go into details unless asked for :|

Anyway, i've currently got a desktop RSS Reader that's subscribed to the CFA Incidents feed.(https://data.emergency.vic.gov.au/Show? ... ncidentRSS).
Nice, it works fine, but it receives the whole state.

I'm wondering if anyone has done, know how to, or has any ideas regarding:

Receiving the Incident RSS Feed,
than parsing the long/lat info out of the body,
then comparing this to a database, which contain longs/lats in a radius from a certain location,
then if it matches, plotting it on a map, and activating an external action (i.e. Notification Centre alert).

I know i'm asking for a lot, but any ideas?

Cheers blokes.


Oh, and I did come accross this: http://www.geonames.org/rss-to-georss-converter.html
And, you can retrieve the EMV incidents map via text here: http://emergency.vic.gov.au/public/textonly.html, however it does not contain the specific long/lat info.
Bass Junkie
Registered User
Posts: 55
Joined: Mon Jan 12, 2009 1:45 am

Re: RSS Feeds, GeoRSS, Long/Lat, parsing to a map

Post by Bass Junkie »

Not sure how familiar you are with scripting, but the parsing that you speak of would be fairly trivial. Consider that your lat/long area is a rectangle - there are only 4 points you care about. You strip out the lat and long into variables, then just say if lat is greater than 'a' and less than 'b', and if long is greater than 'x' and less than 'y', trigger alert.

There are a lot of easier ways to skin this cat though - pager decoder, one of the many mobile apps, etc.

RSS probably isn't the most efficient way to do it since it's a "pull" not a "push" mechanism.
User avatar
Blake
Registered User
Posts: 175
Joined: Tue Jan 26, 2016 9:25 am
Location: VIC

Re: RSS Feeds, GeoRSS, Long/Lat, parsing to a map

Post by Blake »

Ok, cool.
Cheers for that. :)

I'm a complete noob when it comes to coding / scripting. :?
I can sorta do the basics, but nothing special.

I went for the RSS because it:
a) Easy - all ready operational.
b) Reliable - as opposed to pager decoding, which requires a lot of setup to be 100% reliable.
c) It all ready contains lat/long info in plain text.

Turns out, that after consultation with the EMV Help Desk, that the VicEmergency map will only notify you of incidents when using the app on a smartphone (of which I don't have, yeah I know, i'm old hat :roll: ).
Which, I thought was very cleverly obfuscated from all information, FAQs and guides.
It does not and will not work to notify you via email of an incident in your watch zone.
It will only notify you of 'Watch & Act' messages or 'Evacuate' messages.
Which is completely and utterly BS. :x
Upon inquiry, they are not planning to add that functionality any time soon either.
Maybe if enough people request it they'll think about it.

I'm not mad about the lack of functionality, that I can deal with, i'm mad about the fact that it was deliberately obfuscated, that is, left out in order to mislead.
Whether it was deliberate or accidental, I don't know.
But it needs to be fixed and made clear to all.

[Rant/=off] :D
Bass Junkie
Registered User
Posts: 55
Joined: Mon Jan 12, 2009 1:45 am

Re: RSS Feeds, GeoRSS, Long/Lat, parsing to a map

Post by Bass Junkie »

Personally I'd just buy a cheap android phone or a used pager, but it would be a pretty cool geek-project :D

If you do want to go down the scripting route, I'd look at either python or ruby for this task, simply due to the large number of libraries out there.

You could use something like this: https://docs.ruby-lang.org/en/2.2.0/RSS.html to turn the RSS entries into array entries, then iterate through them finding the right string ("Latitude:</strong> ") and chomping characters after that string into another variable, which you then compare to your search area. If it matches, fire off another function that sends the email.

It's a bit of using a sledgehammer to put in a screw, but it'd get the job done.
Post Reply