Coder Social home page Coder Social logo

metolib's Introduction

MetOLib

This product has reached end-of-life status and is no longer maintained. For your weather data visualisation needs in JavaScript check out the MetOClient-project.

MetOLib provides implementation of API classes that may be used to request weather data from the Web Feature Service (WFS) server of the Finnish Meteorological Institute INSPIRE Atmospheric Features and Geographical Meteorological Features guidelines compatible WFS Download Service server at https://opendata.fmi.fi.

The response is assumed to the wfs:FeatureCollection with one or more members of PointTimeSeriesObservation or GridSeriesObservation features of namespace http://inspire.ec.europa.eu/schemas/omso/2.0rc3. The WfsRequestParser creates the WFS GetFeature request and parses the XML response into JS response object.

MetOLib folder structure

Root folder contains this README.md and Grunt files that may be used to build different versions of MetOLib.

  • lib contains minified and combined MetOLib files that are provided as content that could be used for release versions. Also, a combined non-minified version is provided here for debugging purposes.
  • doc contains MetOLib documentation files that describe library components and give simple examples:
  • src contains actual MetOClient source files that may be used as a reference and are used to create release content into lib -folder. This repository builds with Webpack; any other bundler that supports ES6 can also be used. Also converting to RequireJS or AMD module syntax is possible.
  • examples contains examples of how to use MetOLib
  • test contains general test files to test lib files
  • testdeps contains thirdparty libraries that are used by MetOClient tests. Jasmine is used for test cases.

Browsers

MetOLib works well with the major browsers.

But notice, Internet Explorer version 8 or greater is required for cross-domain requests to work properly with MetOLib.

Getting started

metolib's People

Contributors

fmi-kemppain avatar fmibeta avatar ilkkarinne avatar masapu avatar mvisa avatar sirviot avatar tervo avatar thekarppinen avatar tituomin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

metolib's Issues

Multiple "observableProperty" loads (metolib 1.1.7)

Add support for fetching lightning data

It looks like fetching lightning strikes doesn't work with metolib. When trying something like this

            var STORED_QUERY_LIGHTNING = "fmi::observations::lightning::multipointcoverage";

            fi.fmi.metoclient.metolib.WfsRequestParser.getData({
                url : url,
                storedQueryId : STORED_QUERY_LIGHTNING,
                requestParameter : "ellipse_major",
                begin : new Date('2015-06-24'),
                end : new Date('2015-06-25'),
                bbox : "20.750000000000014,61.60639637138627,45.00000000000002,66.51326044311185",
                timestep : 60 * 60 * 1000,
                callback : function(data, errors) {
                    handleCallback(data, errors, "strikes");
                }
            });

No data is returned in callback (although server is returning a lot of data). Difference to other multipointcoverage stuff seems to be that there is no target:LocationCollection information in xml, which seems to result in metolib parser ignoring everything.

It would be nice to get this working.

Help with querying radar images from FMI

Hi,

I didn't know where else to ask and you guys seem to have a really good idea of what you're doing.

I'd like to fetch the radar images for the whole of Finland as shown at: http://en.ilmatieteenlaitos.fi/rain-and-cloudiness I'd going to be using these images in my Android application. I have read the documentation on the FMI site for two days now but I haven't been able to understand how to fetch these images.

I'm looking to fetch high-resolution images in PNG/BMP/JPEG format. I'm hoping to get images of 720px width atleast. Could you show me how to make a sample request to fetch the radar image for the whole of Finland for the current moment?

Could you help me get this information? I've already received my API token. I'll be using Java to make the GET requests to fetch the images.

I'm not sure what I should use, the WFS or the WMS service. I'll fetch the images at regular intervals and I'll be caching them on Google App Engine so I'll probably only make 1 request every fifteen minutes or so.

I'd really appreciate if you could help me out. Kiitoksia.

using metolib in serverside/nodejs

Hi guys, i was just wondering if its possible to run this library in server side using nodejs? i ran quick experiment wrapping metolib-combined into node module and giving refs to jquery port, lodash and async, and i got xml parse problem. The unofficial node jQuery port is known to have problems with XML parsing and such, but if this problem is excluded do you see any reason why this couldn't be used serverside now or in the future?

What is the reason for mandatory requestParameters

I need to retrieve all available observation data from any station. I noticed that request parser enforces me to specify the requestParameters list. However, since each station might have different set of observation types, it is troublesome to define all observation types explicitly in the request. The API allows requests without parameters defined (defaulting to retrieve everything). I'd like to know the design reason why requestParameter is always required by the parser? wfsconnection comments just state it as mandatory.

I forked the Metolib and modified request parser to make requestParser optional and according to unit tests and manual testing, it seems to work as expected. The reason I'm asking is that I might have ignored some inobvious reason for requiring the requestParameters and I'm causing problems for myself in the future :)

Address vs geo id when using metolib?

You can tag this as question, because this is not a bug. I'm not a weather expert so this might be stupid questions, but "Helsinki" and "helsinki" are different sites, lowered case yields to no results.
Here an example: https://dl.dropboxusercontent.com/u/20854955/fmi/fmi2.html

I've noticed that city + street name also doesn't work reliably, so what would be easiest way to make sure that metolib API always recognizes the site by address or geoid, and what would be the best place to get these geoids or sites names?

getData function should have a wmo parameter

The getData sites parameter doesn't seem to accept all sites by name. For example:
"Härmälä, Tampere" works but "Siilinkari, Tampere" does not.

By experiment I found that replacing "place" parameter in the url with "wmo" works and for example wmo=02943 returns Siilinkari's data.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.