Recent Posts

Pages: [1] 2 3 ... 10
1
Weather Website PHP/AJAX scripting / Re: advforecast2.php
« Last post by saratogaWX on Today at 01:14:55 AM »
Hmmm... hadn't seen that one before.

Lines 600-602 are
Code: [Select]
if (isset($FCSTJSON['geometry']) and
    strlen($FCSTJSON['geometry']) > 6 and
   strpos($FCSTJSON['geometry'], 'POINT') !== false) { // got a point forecast

Your cache file for that forecast shows
Code: [Select]
{
    "@context": {
        "wx": "https://api.weather.gov/ontology#",
        "geo": "http://www.opengis.net/ont/geosparql#",
        "unit": "http://codes.wmo.int/common/unit/",
        "@vocab": "https://api.weather.gov/ontology#"
    },
    "geometry": {},
    "updated": "2018-05-25T03:30:17+00:00",
    "units": "us",
    "forecastGenerator": "BaselineForecastGenerator",
    "generatedAt": "2018-05-25T04:57:46+00:00",
    "updateTime": "2018-05-25T03:30:17+00:00",
    "validTimes": "2018-05-24T21:00:00+00:00/P7DT17H",
    "elevation": {
        "value": 9.1440000000000001,
        "unitCode": "unit:m"
    },
    "periods": [
so the "geometry" entry is an empty array.  I also note that your point-forecast is not currently available, and you're getting a zone forecast instead.  I'd never seen an empty "geometry" entry in the zone forecast.. A normal one looks like
Code: [Select]
"geometry": "GEOMETRYCOLLECTION (POINT (-93.337348681493 45.019380528644), POLYGON ((-93.352280551998 45.030196194185, -93.352647981926 45.008824953451, -93.322420181345 45.008562878332, -93.32204601069 45.029934099997, -93.352280551998 45.030196194185)))",
Maybe it's a new wrinkle to have an empty "geometry" be an empty array...

Try changing those three lines to be
Code: [Select]
if (isset($FCSTJSON['geometry']) and !is_array($FCSTJSON['geometry']) and
    strlen($FCSTJSON['geometry']) > 6 and
   strpos($FCSTJSON['geometry'], 'POINT') !== false) { // got a point forecast
since we are really expecting a string from the JSON.

Let me know how that works out...
2
Weather Website PHP/AJAX scripting / Re: advforecast2.php
« Last post by n7xrd on Today at 12:33:14 AM »
I'm getting this error with the New Advforecast2 installed?????

Warning: strlen() expects parameter 1 to be string, array given in /home/****/public_html/advforecast2.php on line 601
3
Weather Conditions Discussion / Re: Spring/Summer '18
« Last post by ValentineWeather on Yesterday at 11:21:12 PM »
Funnel cloud today from cemetery. Not my photo there is also a video.
 [ You are not allowed to view attachments ]
4
My last comment on this - honestly.  Yes, you do not understand ODBC.  Common misunderstanding.  ODBC is not restricted to just SQL databases; you can use CSV, text files, etc.  Info here:  https://en.wikipedia.org/wiki/Open_Database_Connectivity

Back in the day I worked with Borland, MicroRim, etc. on all of this stuff and even with proprietary databases, you could usually have an API to access the data directly.  Proprietary compressed databases are nothing but a headache. I still have some clients who use them now and  what they gain in speed (like you really need that for Davis weather data??) they lose in interoperability.  BTW when I used WLK I had all sorts of neat routines to regular extract until J Ruys came up with the SQL interface.  Sadly, that was an unsupported, one-off.  Nice work though.

Like I said - I'm done.  WLK files are archaic, as is the software.  IMHO of course.

Sorry, I can't resist answering your "you do not understand" comment.....

I understand ODBC.  I never said SQL.  I did say "database management systemS"

And, an ODBC driver could easily be written to access any .WLK file (singular).  Any single .WLK file can be viewed as a database management system. 

I do quite agree with your comment about proprietary systems.  And that .wlk is archaic.  And yes, hanging onto them for too long is a big headache.  [But I never said that compressed files like .WLK were needed for speed in a weather system]

Footnote: not that it matters, but I have an MS in Computer Science, hold a CCP in Systems Programming, and spent most of my career in IT management and QA.  So, like you, I have "been there and done that".

Enough of this nit-picky off-topic stuff.  Alternatives are available for the choosing.
5
Davis Instruments Weather Stations / Re: Weatherlink software not reporting
« Last post by eyecue on Yesterday at 10:21:01 PM »
Do you have the virtual port software installed for the usb to serial conversion?  Serial ports are notorious for being hogged by one app and not being released for another app to use or share.
6
This comment, like several others misses the point:  there is no easy connection to .WLK files.  Heck, ODBC was available before WLK was the Davis storage format.

Not wishing to prolong this mostly-off-topic discussion - but I don't understand your point. 

ODBC is a standard application programming interface (API) for accessing database management systems (DBMS).
WLK is a file format.  It's not a database.

Are you suggesting that WeatherLink software should have used a database (rather than files with compressed content), and have provided an ODBC driver? 

As johnd pointed out, databases require a lot of disk space and a lot of physical memory.  With a target market of personal weather enthusiasts (in those days), perhaps using Windows 95 or Windows 98......

I think my decision would have been to go with proprietary compressed storage files.  But of course, that's a tradeoff decision.

My last comment on this - honestly.  Yes, you do not understand ODBC.  Common misunderstanding.  ODBC is not restricted to just SQL databases; you can use CSV, text files, etc.  Info here:  https://en.wikipedia.org/wiki/Open_Database_Connectivity

Back in the day I worked with Borland, MicroRim, etc. on all of this stuff and even with proprietary databases, you could usually have an API to access the data directly.  Proprietary compressed databases are nothing but a headache. I still have some clients who use them now and  what they gain in speed (like you really need that for Davis weather data??) they lose in interoperability.  BTW when I used WLK I had all sorts of neat routines to regular extract until J Ruys came up with the SQL interface.  Sadly, that was an unsupported, one-off.  Nice work though.

Like I said - I'm done.  WLK files are archaic, as is the software.  IMHO of course.
7
Weather Website PHP/AJAX scripting / Re: Missing point forecasts
« Last post by ValentineWeather on Yesterday at 10:10:09 PM »
Same problem with the newer version I was having.
Now using V4.05 - 21-May-2018 and only stringing out 4 decimals like Ken suggested on location and using the preferred location instead of my own in Settings.php and all is well going on 30+ hours without forecast hang requiring a force update.
8
Weather Website PHP/AJAX scripting / Re: Missing point forecasts
« Last post by jgillett on Yesterday at 10:02:57 PM »
It may all be fine for the NWS person, but the gridpoint forecast for PSR was not available on api.weather.gov .. that's something they should address.  It's why I added the verbiage to make it easy to contact them (as the docs say on the weather.gov site).  Perhaps they missed a memo somewhere...
Apparently so. I actually read the complete message to him including what to look at - guess it went the same place the point forecasts did.

Thanks, Ken.
9
Weather Website PHP/AJAX scripting / Re: Missing point forecasts
« Last post by saratogaWX on Yesterday at 09:59:33 PM »
It may all be fine for the NWS person, but the gridpoint forecast for PSR was not available on api.weather.gov .. that's something they should address.  It's why I added the verbiage to make it easy to contact them (as the docs say on the weather.gov site).  Perhaps they missed a memo somewhere...
10
What Weather Station Should I Buy? / Re: What Mast To Use?
« Last post by ValentineWeather on Yesterday at 09:49:25 PM »
Very cool.. =D>
Pages: [1] 2 3 ... 10
anything