Comments (5)
As far as I recall, the reason has been to encourage users to load only the data they need. The behaviour still conflicts with the WFS API. So, no good reason.
Your modification does not sound to break backward compatibility. We would be very happy if you could push your changes back to master branch!
from metolib.
Sounds good. I'll do pull request if/when I finish the modifications. Looks like SplitterCache relies on the requestParameters more than the parser so I'll look into it to see if I can figure out how to change it to support all parameters retrieval.
from metolib.
From the production point of view there is no need for mandatory requestParameter when WfsRequestParser is used.
The original purpose of MetOLib was to provide a reference implementation on how to use FMI's WFS services. Also, the implementation has been meant to give useful tips and to guide a developer on things that are good to understand when using the services. Therefore, the implementation contains checks that may not be optimal from the production point of view but may have been good from the tutorial point of view to highlight certain issues. But, of course an additional option to ignore unnecessary checks would be a good thing to have now.
Notice, WfsRequestParser itself may easily be used without requestParameters. But, WfsConnection uses the cache which requires parameter-value before query is made to server. If parameter is not provided when query is made, the data can not be mapped into cache when it is received.
The change proposal mentioned here is useful in WfsRequestParser that can also be used directly instead of WfsConnection. But, we can still make it work via WfsConnection also. This could work similarly to the case when bbox is queried instead of certain place. So, if WfsConnection is wanted to be used, it could just forward query directly to WfsRequestParser. See, wfsconnection.js and in it retrieveSitesData and retrieveSpatialData -functions for example.
It nice to have more developers to contribute here. So, looking forward to your pull request Tumetsu.
from metolib.
I noticed that SplitterCache seems to require the parameters for mapping the data. Your suggestion for WfsConnection seems reasonable as far as I understand the library. Probably will do that.
However, I suppose that it would make splitting the big retrieval tasks impossible when using WfsConnection? For SplitterCache documentation there is mentioned that it is used for
...server middleware for splitting up big retrieval/calculation tasks into smaller tasks...
For my use case I'd like to do a long time span queries of data which require splitting to multiple requests which don't require caching. From preliminary reading of SplitterCache I suppose it would be easier to create a separate "SimpleSplitter" with no cache which is compatible with the modified WfsParser rather than refactoring requestParameters out of the existing SplitterCache. Do you agree?
from metolib.
I agree that a separate "SimpleSplitter" with no cache is a good way to proceed in this case.
from metolib.
Related Issues (11)
- getData function should have a wmo parameter HOT 1
- Add support for fetching lightning data
- Update version of omso namespace in README.md
- using metolib in serverside/nodejs HOT 8
- Help with querying radar images from FMI HOT 1
- Problems reading Hirlam forecast to observation stations HOT 1
- ERROR: Server has not provided properties for request parameter! HOT 1
- Address vs geo id when using metolib? HOT 6
- Multiple "observableProperty" loads (metolib 1.1.7) HOT 2
- Precipitation1h values are all NaN when using fmi::observations::weather::multipointcoverage HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from metolib.