Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Number of points requested cannot exceed 200 #1

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

alliejanoch
Copy link

NOAA will only process weather requests for 200 points at a time. This breaks the list of lat/lon's into batches of 200.

(http://graphical.weather.gov/xml/ about 1/2 way down there is a note about this)

@thataustin - if you want, I can take over this library. Up to you.

var options = _.extend({}, forecastDetails, { listLatLon: listLatLon});
var url = this._convertOptionsToUrlString('data', options);
return this._makeCall(url);
return this._getForecastPerPoint(geoBusinessObjects, forecastDetails, chunkSize);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the chunkSize could be an internal detail to the getForecastPerPoint function. That function should fetch in chunks and return a flattened version of the results. The next function in the chain doesn't have to know or care that there's a chunk limitation in the _getForecastPerPoint process.

@thataustin
Copy link
Owner

Sorry, I just saw this! Holy cow, time to quit using the "Mark all as read" button in Github alerts.

@alliejanoch alliejanoch deleted the batches-of-200 branch October 15, 2016 01:23
@alliejanoch alliejanoch restored the batches-of-200 branch October 15, 2016 01:29
gracefully handle sites outside of the usa
print url when there is an error

handle bad lat lng being first in batch of 200

handle bad lat lng being first in batch of 200

handle bad lat lng being first in batch of 200

handle bad lat lng being first in batch of 200

handle bad lat lng being first in batch of 200
@alliejanoch alliejanoch reopened this Oct 17, 2016
@alliejanoch
Copy link
Author

@thataustin - good idea with moving chunk size. I did that but I've also added some other stuff since this pull request was originally created: locations outside the NOAA's coverage were causing errors, so I now remove them from the list of lat/lng pairs being processed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants