Author Topic: Saratoga icon problems and questions  (Read 176 times)

0 Members and 1 Guest are viewing this topic.

Offline kds

  • Member
  • *
  • Posts: 8
    • Urbandale Weather
Saratoga icon problems and questions
« on: April 08, 2018, 03:12:04 PM »
Some of my NWS forecast and observations icons are not showing. They're trying to point to "na.jpg". How can I resolve this? My site is temporarily at https://sanders.io/weather-saratoga/index.php.

Additionally, how can I use the higher-resolution icons that are in the /saratoga-icons2/forecast/icon-templates/ package? It looks like the old NWS icons are being used that are smaller and lower-resolution.

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 6511
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Saratoga icon problems and questions
« Reply #1 on: April 08, 2018, 03:46:43 PM »
First, a little history about the forecast icons.  The original carterlake script (and the NWS at that time) used fixed JPG 55x58px images in the ./forecast/images directory on their site, and all successor scripts (advforecast2.php both V4.x scraper and V5.x JSON) use the same structure in order to maintain compatibility for updates.

So, your document root (or in your case ./weather-saratoga/ as document root) should have:

./weather-saratoga/forecast/images/*.jpg
./weather-saratoga/forecast/icon-templates/*.png
./weather-saratoga/cache  (for storing the cached files)
./weather-saratoga/advforecast2.php  (main forecast script)
./weather-saratoga/DualImage.php (to create the dual-image forecast icons)

If your icons are in
./weather-saratoga/saratoga-icons2/forecast/* then they need to be moved up one directory to be in the directories shown.

Now, about the sizes.. the standard .jpg image size is 55x58 or 55x55 (newer NWS icons).  I do have a 85x85 set of .png images
available at https://saratoga-weather.org/saratoga-icons2-png-86x86.zip BUT they haven't been updated with the new icons that the NWS implemented last year, so use at your own risk.  Some folks have opted for the Meteotriviglio animated .GIF icons, and those too have not been updated to handle the new NWS icons introduced last year.

The icons in ./forecast/icon-templates are ONLY used by DualImage.php to construct a dual-image icon when the NWS calls for it in their forecast.

Hope this helps...
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Boltek-PCI/NexStorm, microSferics ToA, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge/hub
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline kds

  • Member
  • *
  • Posts: 8
    • Urbandale Weather
Re: Saratoga icon problems and questions
« Reply #2 on: April 08, 2018, 04:13:14 PM »
Gotcha, thanks for the quick reply. I do have the folder structure correct on the server.

Do you know why it's trying to call na.jpg for my this afternoon/evening forecast? It's doing the same for a bunch of days on my forecast page: https://sanders.io/weather-saratoga/wxforecast.php

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 6511
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Saratoga icon problems and questions
« Reply #3 on: April 08, 2018, 04:32:46 PM »
Running https://sanders.io/weather-saratoga/check-fetch-times.php?show=info shows
Quote
Settings.php forecast images file directory in $SITE['fcsticonsdir']='./forecast/images/' exists; but does not have .jpg (skc.jpg checked). Be sure to upload contents for proper template operation.
so the icons aren't in the correct location right now in the filesystem.  To be precise, your document root for the entire website is /home/sandersio/sanders.io so given your template is installed in ./weather-saratoga/ directory under your document root.  The filesystem should look like:

/home/sandersio/sanders.io/weather-saratoga/forecast/images/*.jpg
/home/sandersio/sanders.io/weather-saratoga/forecast/icon-templates/*.png
/home/sandersio/sanders.io/weather-saratoga/cache  (for storing the cached files)
/home/sandersio/sanders.io/weather-saratoga/advforecast2.php  (main forecast script)
/home/sandersio/sanders.io/weather-saratoga/DualImage.php (to create the dual-image forecast icons)

If you have the icons in /home/sandersio/sanders.io/weather-saratoga/saratoga-icons2/forecast/images/*.jpg then they need to move to
/home/sandersio/sanders.io/weather-saratoga/forecast/images/*.jpg

I do see that /home/sandersio/sanders.io/weather-saratoga/forecast/icon-templates/*.png seems to be there (and that is why the DualImage.php can generate images dynamically).. it is all the other static images that appear to be missing and that's the cause of the broken images.  Also missing is na.jpg from the images.




Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Boltek-PCI/NexStorm, microSferics ToA, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge/hub
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline kds

  • Member
  • *
  • Posts: 8
    • Urbandale Weather
Re: Saratoga icon problems and questions
« Reply #4 on: April 08, 2018, 04:54:47 PM »
That tool is exactly what I needed to iron out some issues.

OK, it looks like the file transfer for the /images/ folder was interrupted at some point and it was missing a bunch of the forecast images. Got all that sorted out now. Thanks for your patience!

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 6511
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Saratoga icon problems and questions
« Reply #5 on: April 08, 2018, 05:08:23 PM »
Good find.  Thanks for letting me know.  Glad it is sorted out now.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Boltek-PCI/NexStorm, microSferics ToA, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge/hub
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

 

anything