ffnord / ffmap-d3

Deprecated and superseded by http://draic.info/meshviewer
24 stars 41 forks source link

blacklist for some nodes on map #112

Closed rubo77 closed 9 years ago

rubo77 commented 9 years ago

We would need a functionality to blacklist certain nodes on the map for cases, where the coordinates in the nodes are not entered at the correct spot so they create wrong links all across the city that don't really exist.

Where would be the best place to create such a blacklist so these nodes are not shown on the map?

mweinelt commented 9 years ago

Probably in the backend, not in the frontend. For example it could exclude coordinates for nodes that are farther away than $x km from a given center. The center could also be determined automatically by the use of basic stochastic.

Someone would have to build that logic though. And maybe present a warning somewhere about bogus coordinates.

rubo77 commented 9 years ago

If it was in the backend, those nodes wouldnt be shown anywhere. But this blacklist should work only for the map. cause the problems are not nodes that are far away, but nodes, that are connected with the wrong coordinates and noone is caring to correct them any more. Those nodes should continue working though and be shown on the graph and list view

mweinelt commented 9 years ago

Backend does not imply removing the node altogether but only the faulty location block.

rubo77 commented 9 years ago

I think it is difficult to determine a link, that really exists over maybe a km and one that is only there, cause one of the nodes has the wrong coordinates.

So a managed blacklist would be the only solution.

It wouldnt be nice to cut out the falsy coordinates in the nodes.json completely, but maybe the blacklist could add a filed "blacklisted_coordinates" in the json, so you can decide how to handle them in the map.

tcatm commented 9 years ago

I think it's best to contact those node owners and have them fix the location. If that doesn't work, fixing the nodes.json on the backend would be a much saner approach so I'm closing this here.

rubo77 commented 9 years ago

It wouldnt be possible by only fixing the nodes.json in the backend without doing some changes here too:

There is no way to achieve this only in the backend If you want to hide the node in the map but stilll show the coordinates in the list-view.

flokli commented 9 years ago

Sometimes contacting the owners is simply not possible, because of a lack of contact addresses.

It would make most sense to add the functionality to add an "invalid geo coordinates" attribute to the node on the backend, and allow the map to hide those nodes (probably hidden behind a config option).

But indeed, work on both sides is needed (as simply removing the coordinates on the backend side is also not correct).

So request reopen.

rubo77 commented 9 years ago

I think it would suffice to add this to the new https://github.com/tcatm/meshviewer

tcatm commented 9 years ago

Well, this is not the issue tracker for meshviewer (and meshviewer won't get such a feature anyway). Could you start drafting the backend part of this feature?

flokli commented 9 years ago

What do you mean by "meshviewer won't get such a feature anyway"?

If meshviewer is the successor of ffmap-d3, IMHO it should be possible to hide nodes from the map that were marked as "invalid geo information" by the backend, probably configurable by lib/config.js

tcatm commented 9 years ago

There won't be a "invalid geo information" flag. If the information is bogus, it should be dropped from the database completely.

rubo77 commented 9 years ago

I can think of three reasons, why you want to hide the coordinates from the map:

  1. the node is too far away from the community so you don't want to stretch the map so far to include this node
  2. Some third party legal request forces the community to hide the coordinates from public
  3. the coords are at the wrong place and you cannot reach the owner to correct them or the node is placed in a special place where there is no access anymore to.

solutions for those:

  1. the first comment by @mweinelt: https://github.com/ffnord/ffmap-d3/issues/112#issuecomment-87007554
  2. As @tcatm stated: remove those coordinates completely from the data at the backend
  3. Those coordinates should be removed from the data too, but only as long as the owner doesn't correct them (also in the backend)

so the blacklist would have to have two options:

I will refactor this in the backend as issue