It is currently May 26th, 2020, 7:21 pm

WEATHER RADAR

Help with creating, editing & fixing problems with skins
Tracidas-2020
Posts: 11
Joined: May 13th, 2020, 11:15 am

WEATHER RADAR

Post by Tracidas-2020 »

Is it possible to make a weather radar skin. Please help.

The website is this: https://m.meteo.lt/faktine-informacija/radaras/14

The map is static : https://m.meteo.lt/?act=js/map_image&t=main

The weather data is more complicated:

https://m.meteo.lt/?act=js/map_image&t=radar&d=2020-05-13+12%3A45%3A00

https://m.meteo.lt/?act=js/map_image&t=radar&d=2020-05-13+12%3A30%3A00

https://m.meteo.lt/?act=js/map_image&t=radar&d=2020-05-13+12%3A15%3A00

As you can se the date is specified in the link and a specific time interval every 15 min (f.ex. date 2020-05-13 + time 12%3A45%3A00 (12:45)
User avatar
balala
Rainmeter Sage
Posts: 10599
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: WEATHER RADAR

Post by balala »

Tracidas-2020 wrote:
May 13th, 2020, 11:56 am
Is it possible to make a weather radar skin. Please help.
But what should be done, because I'm not quite sure? Would you like to get the static map and over it to get an animation composed by the three posted images (taken each at 15 minutes difference)?
Tracidas-2020
Posts: 11
Joined: May 13th, 2020, 11:15 am

Re: WEATHER RADAR

Post by Tracidas-2020 »

Animation not necessary. A static map and last image of radar would be great.
User avatar
balala
Rainmeter Sage
Posts: 10599
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: WEATHER RADAR

Post by balala »

Tracidas-2020 wrote:
May 13th, 2020, 9:39 pm
Animation not necessary. A static map and last image of radar would be great.
Alright, this probably makes things easier, however I have a question: is there a site where the address of the last image can be got? I mean how do we know which is the last image?
Tracidas-2020
Posts: 11
Joined: May 13th, 2020, 11:15 am

Re: WEATHER RADAR

Post by Tracidas-2020 »

the website is this https://m.meteo.lt/faktine-informacija/radaras/14

In the right bottom corner you can find the local time and the highlited in blue time of the last image.

The image itself i download like this:
view image info > media > and the image in the bottom of the list.

https://imgur.com/53kmCS1
User avatar
balala
Rainmeter Sage
Posts: 10599
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: WEATHER RADAR

Post by balala »

Tracidas-2020 wrote:
May 14th, 2020, 9:00 am
In the right bottom corner you can find the local time and the highlited in blue time of the last image.
Although it indeed was there, it seems right now it disappeared. Please check if I'm right, because as far as I can tell the source code of the website changed.
Am I right?
Tracidas-2020
Posts: 11
Joined: May 13th, 2020, 11:15 am

Re: WEATHER RADAR

Post by Tracidas-2020 »

https://imgur.com/TqoAy4R

https://imgur.com/PVvNizm

as you can see in the source page, the link of the radar image changes according to date and time.

The image changes every fiften minutes. For example: 13:00 then 13:15, 13:45, 14:00.

I can't figure it out, is it possible to make a code or something. Like an IF command, that if the date is 2020.05.20 and time is 13:30 , the image link is https://m.meteo.lt/?act=js/map_image&t=radar&d=2020-05-20+13%3A30%3A00
than download that image.

and view that image together with a map that is static link https://m.meteo.lt/?act=js/map_image&t=main

:???:
Tracidas-2020
Posts: 11
Joined: May 13th, 2020, 11:15 am

Re: WEATHER RADAR

Post by Tracidas-2020 »

one more thing. The image does not update exactly on time...for example if the time is 13:45, the latest updated image may be 13:30 or even 13:15...

https://m.meteo.lt/?act=js/map_image&t=radar&d=2020-05-20+13%3A15%3A00

AND it looks like these images are available not more than a week..
User avatar
balala
Rainmeter Sage
Posts: 10599
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: WEATHER RADAR

Post by balala »

Tracidas-2020 wrote:
May 20th, 2020, 10:32 am
The image changes every fiften minutes. For example: 13:00 then 13:15, 13:45, 14:00.
Yep, this is clear. But yesterday, when I posted my reply, the time you were talking about:
Tracidas-2020 wrote:
May 14th, 2020, 9:00 am
In the right bottom corner you can find the local time and the highlited in blue time of the last image.
was not there, for a short period. Now it is.
So, I'm working on it, but I faced a lot of problems, which has to be fixed. As said working on them...
User avatar
balala
Rainmeter Sage
Posts: 10599
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: WEATHER RADAR

Post by balala »

balala wrote:
May 20th, 2020, 2:04 pm
but I faced a lot of problems, which has to be fixed. As said working on them...
Ok, finally I hope I succeeded fixing all issues. Now I have a working code, here it is. Please check it and let me know if it does work.
There is one variable into the [Variables] section, the ImageSize. This is the size of the image shown into the skin. You can adjust this as you wish.
The code:

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1

[Variables]
ImageSize=300

[MeasureMap]
Measure=WebParser
Url=https://m.meteo.lt/?act=js/map_image&t=main
Download=1
DownloadFile=Map.png

[MeasureSite]
Measure=WebParser
UpdateRate=900
Url=https://m.meteo.lt/faktine-informacija/radaras/14
RegExp=(?si)<div class="hour" data-time=".*" data-full-date="Gegužės .* d.">(.*)</div>
DecodeCharacterReference=3
FinishAction=[!SetVariable Hour "[MeasureHour]"][!SetVariable Minute "[MeasureMinute]"][!SetVariable Date "[MeasureDate]"][!UpdateMeasure "MeasureImage"][!EnableMeasure "MeasureImage"][!CommandMeasure "MeasureImage" "Update"]

[MeasureHour]
Measure=WebParser
Url=[MeasureSite]
DecodeCharacterReference=3
StringIndex=1
RegExpSubstitute=1
Substitute="\r\n":"","^(..):(..).*$":"\1"

[MeasureMinute]
Measure=WebParser
Url=[MeasureSite]
DecodeCharacterReference=3
StringIndex=1
RegExpSubstitute=1
Substitute="\r\n":"","^(..):(..).*$":"\2"

[MeasureDate]
Measure=Time
Format=%Y-%m-%d

[MeasureImage]
Measure=WebParser
Url=https://m.meteo.lt/?act=js/map_image&t=radar&d=#Date#+#Hour#%3A#Minute#%3A00
DynamicVariables=1
Download=1
Disabled=1
DownloadFile=Static.png
FinishAction=[!ShowMeter "MeterStatic"][!Redraw]
UpdateRate=30

[MeterMap]
Meter=Image
MeasureName=MeasureMap
X=0
Y=0
W=#ImageSize#
DynamicVariables=1
SolidColor=255,255,255

[MeterStatic]
Meter=Image
MeasureName=MeasureImage
X=0r
Y=0r
W=#ImageSize#
DynamicVariables=1
Hidden=1