entur / lamassu

Mobility hub
European Union Public License 1.2
5 stars 7 forks source link

Add polylineEncodedMultiPolygon to GeofencingZoneProperties #403

Closed marius-at-atb closed 3 months ago

marius-at-atb commented 3 months ago

Summary

This PR adds polylineEncodedMultiPolygon to GeofencingZoneProperties. All the rings in polylineEncodedMultiPolygon are encoded with Mapbox Polyline

Issue

closes ETU-46620 Motivation: MultiPolygon data can get quite large for mobile network traffic. Using mapbox polyline can reduce this size by ~90%. This is a lossy compression, but only unnecessary decimal info is lost. Precision has been set to 6 decimals. How the code works: Add the extra polylineEncodedMultiPolygon field on GeofencingZoneProperties, which is the same as the existing coordinates, but where the innermost list of coordinates List<List<Double>> is replaced by an encoded String.

Unit tests

Added testPolylineEncodedMultiPolygon

Documentation

Description in graphql schema added.

testower commented 3 months ago

If you rebase on master now you will also get sonar-scanner results.

sonarcloud[bot] commented 3 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
100.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud