OpenTreeMap is a collaborative platform for crowdsourced tree inventory, ecosystem services calculations, urban forestry analysis, and community engagement.
Prior to this commit filters did not take instance unit preferences into account. I have added a "preprocessing" method that we can pass the filter object through which converts any values before the filter object is passed off to be converted into a query.
I have decided to implement this conversion on the server side to prevent having to change both mobile apps and the web client.
Coverage increased (+0.02%) to 83.858% when pulling 7f036c5c5fb596fce32682077041a6666ee3ee15 on jw/units-fix into 999c499139557c320483235262d15e614fe245df on hotfix/2.19.1.
Overview
Prior to this commit filters did not take instance unit preferences into account. I have added a "preprocessing" method that we can pass the filter object through which converts any values before the filter object is passed off to be converted into a query.
I have decided to implement this conversion on the server side to prevent having to change both mobile apps and the web client.
Connects https://github.com/OpenTreeMap/otm-clients/issues/399 Depends on https://github.com/OpenTreeMap/otm-tiler/pull/118
Testing Instructions
Setup
unit-convert-test
and select the green infrastructure addon http://localhost:6060/create/centimeters
and Rain Barrel capacity toliters
. Save http://localhost:6060/unit-convert-test/management/units/Test
Verify that an advanced search for diameter < 5 returns no results
Verify that an advanced search for diameter between 10 and 20 returns 2 results
Verify that and advanced search for rain barrel capacity < 60 returns no results
Verify that and advanced search for rain barrel capacity between 180 and 190 returns 1 result