publiclab / blurred-location

A JavaScript library to help manage variable location privacy through a "blurred location" model
GNU General Public License v3.0
4 stars 1 forks source link

Planning issue #1

Open jywarren opened 5 years ago

jywarren commented 5 years ago

@sagarpreet-chadha ! ๐Ÿ‘ ๐Ÿ˜„

Planning issue :

A utility libraryโ€‹ for filtering locations to a specific precision level for use in Leaflet Blurred Location (LBL)

sagarpreet-chadha commented 5 years ago

Hi @jywarren ๐Ÿ˜„ ! What will this module do ? Kindly give more details ๐Ÿ“ .

jywarren commented 5 years ago

I think it would absorb some functions like:

https://github.com/publiclab/leaflet-blurred-location/blob/4f452d5cc486ac320fa168eeabbb46bedb1b8378/src/blurredLocation.js#L124-L134

https://github.com/publiclab/leaflet-blurred-location/blob/4f452d5cc486ac320fa168eeabbb46bedb1b8378/src/blurredLocation.js#L204-L207

What other very abstract utilities might be useful for people doing JavaScript work using blurred locations, that isn't specific to an interface or Leaflet? Maybe the conversions between precision and human-readable terms?

This library can be really simple. Let's also brainstorm any functions that'd be common between LBL and LBLD, that are also not Leaflet.

jywarren commented 5 years ago

I also just added this!

BL.distanceToPrecision() and BL.precisionToDistance()

jywarren commented 5 years ago

This is starting to be a great run through of what each function does; we could expand it a bit with more scenarios and situations, maybe?

https://github.com/publiclab/blurred-location/blob/main/spec/javascripts/test_spec.js

jywarren commented 5 years ago

Could this set of conversions be moved into this library? https://github.com/publiclab/leaflet-blurred-location/issues/98

jywarren commented 5 years ago

How hard would it be to integrate a function like this? https://github.com/publiclab/leaflet-blurred-location/issues/170

jywarren commented 5 years ago

I think perhaps we should copy this section of the docs from LBL to here -- we can leave it there too but this is the underlying library that brings this to life: https://github.com/publiclab/leaflet-blurred-location#human-readable-blurring