OpenTreeMap / otm-core

OpenTreeMap is a collaborative platform for crowdsourced tree inventory, ecosystem services calculations, urban forestry analysis, and community engagement.
www.opentreemap.org
Other
186 stars 88 forks source link

Add filter unit conversion #3222

Closed jwalgran closed 6 years ago

jwalgran commented 6 years ago

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

Test

coveralls commented 6 years ago

Coverage Status

Coverage increased (+0.02%) to 83.858% when pulling 7f036c5c5fb596fce32682077041a6666ee3ee15 on jw/units-fix into 999c499139557c320483235262d15e614fe245df on hotfix/2.19.1.