implement org.freedesktop.Geoclue.Position iface for localnet ?

Jussi Kukkonen jku at linux.intel.com
Mon Feb 22 10:47:08 PST 2010


arno wrote:
>> The basic needs are:
>> 1. We want to let users define their location manually, possibly from
>>    several applications
>> 2. This manual input must be able to override other sources
>>    (so users can correct wrong location info)
>> 3. we should "save" this manual info for later use
>>    (based on MAC address, possibly other things)
>> 4. saved info must be easily modified/erased
> 
> I can see two other needs:
> 
> * have a default position, which does not depend on the gateway or anything 
> else. Ie: user wants its software to believe he is in position XY no matter 
> where he really is.

Hmm, I guess. I'm not convinced this sort of functionality should live 
in "localnet" though (see below)

> * set an accuracy: so user can tell: I'm not further than xx meters or 
> kilometers from position XY.

The Position input does need an accuracy, absolutely. With Address the 
accuracy is pretty much implied...

> I'm thinking here about web geolocation where websites can ask for location. 
> For privacy reason, user may wish to give a wrong position or an inaccurate 
> one.

I see your point. I still think this "lying" should probably happen in 
the application that sends the data to the web or if need be in a 
separate "fake-location" provider. Most likely it would be in the 
application: you wouldn't want your other position-reliant applications 
to get confused when you're telling your twitter buddies you're in 
Bermuda :)

[clip]

>> * User provided information should probably trump even more
>> "accurate" other providers, when master selects current provider. I
>> guess this could be done with e.g. a flag in .provider-file?
> 
> then, why have one more accuracy level, and set user-set provider to that 
> level. Then, it will be preferred over current providers. Also, from 
> documentation, it appears, horizontal_accuracy and vertical_accuracy are 
> defined only if accuracy level is not GEOCLUE_ACCURACY_LEVEL_DETAILED. So, in 
> order to meet the use cases I describe earlier localnet needs to have its 
> accuracy level increased anyway.

But this is conceptually different from accuracy. We don't want 
applications or web services to believe the accuracy is really accurate 
when it's really not -- in fact that would be really bad. we just want 
manually set position/address to be chosen over other sources, and I 
think a boolean non-changing provider-parameter can give us that.

>> * Currently localnet works based on MAC address. Are there other
>> things we could use? We should also probably start looking at the
>> type of the network we're on: I assume this method is not a very
>> good one on a GSM data connection for example.
> 
> random thought: may be use public ip which could be fetched from sites like 
> showmyip.com or other similar ones. I don't known if that idea is a good one 
> though.

I think that would work in a subset of situations the current localnet 
works: at least I can't think where this would work but localnet wouldn't.

>> * When defining the API for setting a manual position, make sure
>> it's possible to remove the manual position as well.
> 
> yes, it's really important.
> 
>> One related note: I think a "ReverseGeocode.freeform_to_address()"
>> would be very useful addition in combination with localnet. Think
>> about the Twitter client example:
>>  * user inputs something like "Helsinki"
>>  * the app uses freeform_to_address() and then saves the received
>>    location with localnet
> 
> I'm not sure I understand.
> Do you mean localnet should implement org.freedesktop.Geoclue.ReverseGeocode ?
> Or should that method be implemented by geoclue-geonames provider ?

The latter: I think we should have a method that turns a freeform 
address string into a well defined address HashTable. As an example take 
a look at this Nominatim search: 
http://nominatim.openstreetmap.org/search?q=Kallio&format=xml&addressdetails=1
The result of that single word search is that Kallio is a suburb in city 
of Helsinki, Uusimaa county, Finland. The original data "Kallio" would 
not be useful for localnet but the search result would be.

> I'll try to work on that project at the end of the week

Cool, feel free to bug me if you have questions.

  - Jussi


More information about the GeoClue mailing list