google-code-export / sandy-disaster-recovery

Automatically exported from code.google.com/p/sandy-disaster-recovery
2 stars 2 forks source link

Display Blurred/ Deidentified map For the Public #148

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The home page should be a map of the most recent incident.  Icons whose 
geolocation has been blurred to ~400m are accessible, but the InfoBox must be 
empty.

This functionality is already built into the system, but broke when we 
implemented the icon grouping feature.

Original issue reported on code.google.com by v...@aarontitus.net on 14 Jan 2013 at 2:09

GoogleCodeExporter commented 9 years ago
We should probably use a cached version of the map for unauthenticated users.  
That way the website can handle a spike from media coverage.

Changing to critical because it is important for visitors to see what the tool 
is supposed to do.

Original comment by v...@aarontitus.net on 22 Jan 2013 at 2:28

GoogleCodeExporter commented 9 years ago
While the organization registration form circa issue 138 seems like low hanging 
fruit (with the possibility that I misunderstand some parent issues, like issue 
135), I may tackle this next just as a framework familiarization exercise.  In 
my own SDK, I have the redirect disabled, and have spent this evening analyzing 
the difference between /map while authenticated and not;

Do we have a technique in mind for blurred geolocation... perhaps the rounding 
of the LAT/LON I noticed in one of the handlers?  Maybe that's already done-ish.

I see that there is some mention of caching already among the files, so I shall 
study those as well during my next evening session.

Original comment by joshua.eric.turcotte on 23 Jan 2013 at 2:36

GoogleCodeExporter commented 9 years ago
Yep, this was working before, but got broken by recent caching changes. The
caching just needs to be fixed for this map to work.

Jeremy

Original comment by rostovp...@gmail.com on 23 Jan 2013 at 2:50

GoogleCodeExporter commented 9 years ago
The current technique to blur geolocation is to round the lat/lon. However, 
this approach produces a gridding effect in highly populated/hard hit areas 
like the Rockaways, Union Beach, etc.  Essentially, there can be dozens of work 
orders stacked right on top of one another, and only the top one is accessible.

To avoid the gridding effect, the new approach is to create a second lat/lon 
for each record.  The second lat/lon is created by taking the existing lat/lon 
and adding a random decimal between +0.001798 and -0.001798 to both the lat and 
lon. This will create a new random lat/lon blurred to 400m.

Then use that new blurred lat/lon whenever the point is displayed on an 
unauthenticated map.

Is that clear?
-Aaron

Original comment by v...@aarontitus.net on 23 Jan 2013 at 3:36

GoogleCodeExporter commented 9 years ago
Make sure to set the blurred lat/lng in the database, rather than
generating the lat/lng every time the page is displayed. Otherwise, an
attacker could average subsequent results and determine the location of a
given house.

Jeremy

Original comment by rostovp...@gmail.com on 23 Jan 2013 at 4:51

GoogleCodeExporter commented 9 years ago
Yes. Agreed.  Not to mention the fact that re-calculating a lat/lon each time 
would put an unnecessary burden on the server.  The Blurred lat/lon should be 
calculated one time (or rather, each time the lat/lon is entered/changed), and 
inserted into the database alongside the real lat/lon.

Original comment by v...@aarontitus.net on 23 Jan 2013 at 8:24

GoogleCodeExporter commented 9 years ago
Makes sense to me; 

Original comment by joshua.eric.turcotte on 23 Jan 2013 at 10:27

GoogleCodeExporter commented 9 years ago
Here; try these; the no-auth /map still is redirecting for now, but when it is 
up (assuming this patch is a go) (i'll poke at THAT another if not solved this 
coming saturday at the meet up), it will blur and save/cache any sites created 
previous to this patch.  Depending on how staggered the load of old sites is, 
that may make for a mild delay on first viewing as all that math is done... but 
once done, it's done and done.  Tested out within my SDK without complaint. 

Original comment by joshua.eric.turcotte on 24 Jan 2013 at 2:01

Attachments:

GoogleCodeExporter commented 9 years ago
Oh, and I tried to design it so that one could pass in alternative blurring 
radii, if so desired; it defaults to 400 if unspecified.

Original comment by joshua.eric.turcotte on 24 Jan 2013 at 2:02

GoogleCodeExporter commented 9 years ago
If an unauthenticated user visits [root] should display the map for the most 
recent Incident.  If an unauthenticated user visits 
[root]/<incident_short_name>, then forwards to an unauthenticated public map 
for that incident. 

The unauthenticated public map should display the following options (Taken from 
Issue 162):

* Join/Login
* Help
* About
* Blog
* Social Media Links
* Volunteer (See Issue 164). Note: Note: "Volunteer" changes to "Volunteers" 
for authenticated users, because authenticated users are more likely to look 
for volunteers.

Original comment by v...@aarontitus.net on 5 Mar 2013 at 10:06

GoogleCodeExporter commented 9 years ago
Andy,
Your current implementation on the public map is great. The current system 
rounds the lat/lon to ~400m, creating a gridded effect. This effect is apparent 
on the Bartow-Gordon GA Tornado event.
Next, we will need to create Now we just need to introduce the blurred lat/lon 
feature. I think I came up with a method to do that, but I can't find the notes 
at the moment.

Original comment by v...@aarontitus.net on 14 Mar 2013 at 9:43

GoogleCodeExporter commented 9 years ago
Was it: when setting site.lat and site.lon, also set site.blurred_lat and 
site.blurred_lon, using a new random number each time ?

Original comment by cpw...@gmail.com on 14 Mar 2013 at 10:55

GoogleCodeExporter commented 9 years ago
Ahh... found it on comment 4 above:
Yes. Set site.blurred_lat and site.blurred_lon by adding a random decimal 
between +0.001798 and -0.001798 to site.lat and site.lon. This will create a 
new random lat/lon blurred to 400m.

Original comment by v...@aarontitus.net on 14 Mar 2013 at 1:51