如何用php处理GRIB文件
有谁知道是否有一个 php 库可以处理 GRIB 文件?我想使用加拿大环境部提供的 GRIB(或 GRIB 2)文件在我的网站上显示全球天气。我使用php来开发,这就是我正在寻找这个的原因。谢谢....
Does anyone know if there's a php library out there that process GRIB files? I'd like to show global weather on my website using the GRIB (or GRIB 2) files that are available at Environment Canada. I use php to develop, which is why I'm looking for this. Thanks....
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
文件格式在 NCEP Office Note 388 中有明确定义,但创建图像地理定位的任务可能要困难得多。无论如何,http://www.cpc 上有各种有用的链接。 ncep.noaa.gov/products/wesley/ 查找 grib 库(本机 C 源代码),然后您可以通过 PHP 中的共享对象调用来调用该代码。
最好在客户端访问您的网站之前对图像进行预处理并使其可用,因为从 grib 生成图像可能需要一些时间。
有关 GRIB2 的信息和库也可以通过 NCEP 找到。
The file format is well defined in NCEP Office Note 388 but creating images that are geo-located can be significantly more difficult. Regardless, there are a variety of links that are useful at http://www.cpc.ncep.noaa.gov/products/wesley/ Look for the grib library (Native C source code) and then you can call that code through a shared object call in PHP.
It may be better to preprocess the images and have them available before the client hits your website as generating images from grib can take a little time.
Information and libaries on GRIB2 can also be found through NCEP.