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

Street View: Street Smart API support #9878

Merged
merged 10 commits into from
Jan 15, 2024

Conversation

offtherailz
Copy link
Member

@offtherailz offtherailz commented Jan 12, 2024

Description

This PR includes the support for Street smart in Street View plugin.

  • The street view provider can be configured as documented in JSDoc. Using it requires also credentials (username, password) inserted at runtime.

Please check if the PR fulfills these requirements

What kind of change does this PR introduce? (check one with "x", remove the others)

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

Issue

What is the current behavior?

#9877

What is the new behavior?

Fix #9877

Breaking change

Does this PR introduce a breaking change? (check one with "x", remove the other)

  • Yes, and I documented them in migration notes
  • No

Other useful information

For reviewer:

The changes consists in 2 macro-areas.

  • Enchanced support for WFS layer
  • Effective implementation of StreetSmart in streetview

you can distinguish them because street-view plugin changes are all in street-view plugin folder.

Enchanced support for WFS Layer

In order to gather data on Map, the StreetSmart API uses a WFS service with a limited set of functions and functionalities.
In particular it supports:

  • Only POST request
  • No capabilities available (so styler can not call it for getting information about geometry type, and there is no information about the geometry name)
  • Only Filters of certain type. In particular to download data, we can use only the bbox ogc filter. Data can not be downloaded all together, so I needed also to support the strategy bbox for downloading only data on the current area, and limit the maxResolution to start downloading only at a certain level of zoom.
  • Authentication supported is basic
  • Fortunately it supports application/json

For this reason I needed to include a partial support to these properties:

  • serverType. no-vendor: no use of cql_filters, only OGC, and only post request
  • startegy: bbox (implemented for the moment only for no-vendor
  • security : as planned for possible implementation of basic authentication support, this property includes the information about layer security (type: basic, location sessionStorage).

These new configs need to be documented.

Effective implementation of StreetSmart in street view

This consists in:

  • Extending the model to a generic API to include google and cyclomedia provider (with future possible enhancements)
  • Implementing the cyclomedia street smart implementation

Extending the model

The api has been generalized to allow usage of different providers.

Cyclomedia impelmentation

Initially I tried to use npm library (published in december) to implement it. It was working quite well, but conflciting with react-dnd of MapStore.
To woraround this issue, I switched to a cdn load approach in an iframe. The API is loaded now only in the component. This is possible also because the data retrival uses WFS, so no js api is needed outside the component.

For testing

You will need apiKey, username and password

  • apikey to configure in context or localConfig and not share or save online) A private context is available here.
  • username and password to insert at execution time.

Note

This is a first implementation, therefore there is a minimal integration. The tool of the application are not all available, but the minimal integration (street-view) is in place.
Future improvements will allow to use these tools too, after proper investigation.
Some of these tools are disabled and not actually impelmented on MapStore, even they may be available after some investigation.
Some of them are instead not working (even in the viewer test). The "missing" or "not working" errors are shown directly in the viewer UI.

Tools

  • Overlays: works on mapstore, not in the test map
  • Display: works on MapStore, not in the test map
  • Object info no way to try on both MapStore and test. It activates but no data is present for querying.
  • Cross Section enabled in MapStore, but shows a "not available with Current selected CRS" tooltip, not available in test map (probably present because of a most recent version of JSLib is used in mapstore)
    image
  • Elevation: Disabled because of SRS on MapStore, shows some data on test map
    image
  • Report issue not working in both cases, but with a little different behavior
    image
  • Point Cloud clicking on it reports "No point cloud found on this location on both MapStore and test map. (Maybe some location has point cloud and can be tested in the future, as well as for Object info)
  • Oblique viewer: Disabled on MapStore (can't be used in the selected SRS), available in test map (but when use, it tells "Can't find a suitable oblique image")
  • Measurements: Disabled on MapStore (can't be used in the selected SRS), available in test map
  • Download working on both MapStore and test map
  • Open Image Info Available on MapStore, not available in test map

@offtherailz offtherailz marked this pull request as ready for review January 15, 2024 09:28
Copy link
Contributor

@allyoucanmap allyoucanmap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general the implementation looks good. Here an issues while testing locally:

  • switch a context from 2D to 3D does not disable the street view component causing inability to interact with point once switch again from 3D to 2D

@allyoucanmap allyoucanmap merged commit 5b83f3b into geosolutions-it:master Jan 15, 2024
6 checks passed
@allyoucanmap
Copy link
Contributor

@ElenaGallo please test this fix on dev, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement support to street smart API
2 participants