
{"id":798,"date":"2007-08-17T12:53:00","date_gmt":"2007-08-17T12:53:00","guid":{"rendered":"https:\/\/www.starcoder.com\/wordpress\/?p=798"},"modified":"2026-05-09T02:39:34","modified_gmt":"2026-05-09T02:39:34","slug":"90-meter-elevation-data","status":"publish","type":"post","link":"https:\/\/www.starcoder.com\/wordpress\/2007\/08\/90-meter-elevation-data\/","title":{"rendered":"90 Meter Elevation Data"},"content":{"rendered":"\n<p>To generate an international forecast for Seasonality, I take in a GeoPoint and find the 4 closest surrounding data points from the GFS Forecast model. The GFS data is 0.5 degree resolution, so if I had a location at point 50.2\u00b0 latitude, 30.8\u00b0 longitude, I would use the following data points when generating the forecast: (50\u00b0, 30.5\u00b0), (50\u00b0, 31\u00b0), (50.5\u00b0, 30.5\u00b0), and (50.5\u00b0, 31\u00b0). The problem is that these surrounding points could be fairly distant from the weather location being queried, so depending on the terrain a forecast can vary widely. However, the forecast could be made more accurate if the elevations of each GeoPoint is taken into account.<\/p>\n\n\n\n<p>So where does the 90 meter data come from? Well, the&nbsp;SRTM&nbsp;mission a few years back captured this level of detail for the area from -60\u00b0 to 60\u00b0 latitude, which includes almost all the land masses. Outside that range, a lower resolution dataset is used to fill in the gaps. A data point every 90 meters doesn&#8217;t sound like much; after all that&#8217;s elevation points about a football field away from each other. I imagine in some terrain where you have a lot of quick elevation changes, such as canyons or cliffs, this wouldn&#8217;t be enough. However, do not underestimate the amount of data here. The&nbsp;compressed download&nbsp;is around 1.2 gigabytes, and it expands to a ~7 gigabyte data file. The entire dataset is 86400&#215;43200 data points, or 3,732,480,000 GeoPoints. Multiply that by 2 bytes per data point and you have a 7 gigabyte file.<\/p>\n\n\n\n<p>Fortunately, this file is easy to parse. There is no header, just the raw data. The map projection is a simple&nbsp;equirectangular projection, giving equal distance across latitude and longitude. The location starts at (90\u00b0, -180\u00b0) and continues across an entire 86400 point row before moving South to the next row. The final GeoPoint is (-90\u00b0, 180\u00b0). Each data point is a signed &#8220;short&#8221; integer (2 bytes long). Perl&#8217;s unpack function works wonders here to get a short value from the binary data.This data is going to be perfect for taking elevation into account while forecasting. Its resolution is over 14000x (!) more detailed than my 0.5 degree GFS dataset, giving 120 GeoPoints between each GFS GeoPoint in each dimension. This should be plenty of data to work with. Maybe I&#8217;ll talk about how I use elevation to make more accurate forecasts in a future article.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>To generate an international forecast for Seasonality, I take in a GeoPoint and find the 4 closest surrounding data points from the GFS Forecast model. The GFS data is 0.5 degree resolution, so if I had a location at point 50.2\u00b0 latitude, 30.8\u00b0 longitude, I would use the following data points when generating the forecast: [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-798","post","type-post","status-publish","format-standard","hentry","category-uncategorized","post-preview"],"_links":{"self":[{"href":"https:\/\/www.starcoder.com\/wordpress\/wp-json\/wp\/v2\/posts\/798","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.starcoder.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.starcoder.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.starcoder.com\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.starcoder.com\/wordpress\/wp-json\/wp\/v2\/comments?post=798"}],"version-history":[{"count":1,"href":"https:\/\/www.starcoder.com\/wordpress\/wp-json\/wp\/v2\/posts\/798\/revisions"}],"predecessor-version":[{"id":801,"href":"https:\/\/www.starcoder.com\/wordpress\/wp-json\/wp\/v2\/posts\/798\/revisions\/801"}],"wp:attachment":[{"href":"https:\/\/www.starcoder.com\/wordpress\/wp-json\/wp\/v2\/media?parent=798"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.starcoder.com\/wordpress\/wp-json\/wp\/v2\/categories?post=798"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.starcoder.com\/wordpress\/wp-json\/wp\/v2\/tags?post=798"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}