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

Decommission layer_marshaller #106

Open
MichaelLangbein opened this issue Mar 9, 2022 · 0 comments
Open

Decommission layer_marshaller #106

MichaelLangbein opened this issue Mar 9, 2022 · 0 comments

Comments

@MichaelLangbein
Copy link
Collaborator

When designing the Riesgos-frontend, the assumption was that most products would be fairly standardized.
It was thought that the web-app should take a process-output and transform it into a displayable layer by itself.
This is what our layer_marshaller was designed for: accept inputs, detect whether it contains vector- or raster-data, and transform it into a UKIS layer.

By now we have many customizations to our layers, though. There are few layers which don't have deviations from our standard settings.
Examples:

  • available earthquakes should have a popup appear on hover, not on click
  • deus outputs need to be rendered in webgl, because they are too large for simple vector-layers
  • lahar-outlines should be bundled into one single layer with a timeslider
  • shakyground-outputs need to have their names changed

Our original intention was that a user should only have to understand the interfaces WpsData and Product and their descendants; they should not have to understand Ukis-types. A programmer would only touch the contents of src/app/riesgos/scenarios. But with so many customizations this is getting unrealistic.

I'd now propose that instead of having different Product subclasses which are configured in src/app/riesgos/scenarios, instead we have each product have a method toUkisLayer(): Layer

This allows a programmer greater flexibility in creating a custom Ukis-layer from a riesgos-product. It also avoids having to add many special cases to layer_marshaller. It would force the user to implement that method for every single product, but we're already doing that for many layers anyway. This way that transformation would be more direct and explicit.

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

No branches or pull requests

1 participant