Geospatial mailing list archives


Re: GPS android to GeoPoint

Acsone SA/NV, Laurent Mignon
- 17/10/2017 09:33:47

On Tue, Oct 17, 2017 at 11:02 AM, Giuseppe Flammia <> wrote:


thanks for the answer.

I send my coordinates by xmlRpc


this is Java Android code


attendanceTaskId = odoo.exec(attendanceListener, database, uid, password, "hr.attendance", "calcola_presenza_area", conditions_2);




While, Odoo side, I manage the information in this mode:




    def calcola_presenza_area(self, arg=None, context=None):



        lat_point = self[0]['partner_latitude_checkin']

        long_point = self[0]['partner_longitude_checkin']

        point = "POINT({} {})".format(lat_point,long_point)


        risultatoRicerca = self.env['geo.localize.project'].geo_search(

                geo_domain=[('area_palazzo', 'geo_contains', 'POINT(lat_point long_point)')],






        return risultatoRicerca



My idea was:

step1: i transform "point" in geoPoint

step2: I call geo_search using geoPoint.


But my idea is wrong because point e geo_search work with two different system.


My problem is variable "point": this point has different reference system from GeoPoint.


How can I  use "point" in geo_search ?

How can I transform to runtime  point in geo_point without to use the database ?


Da: Yannick Vaucher []
Inviato: lunedì 16 ottobre 2017 10:47
A: Geospatial
Oggetto: Re: GPS android to GeoPoint



And how are you sending your coordinates from your android phone to Odoo ?


If you use xmlrpc or jsonrpc from your android application, you must transform your coordinates first and then write the object.




If it is by hand there is a widget on geoengine fields to set long / lat

Your view should define <field name="my_coordinates" widget="geo_point_xy"/>

instead of <field name="my_coordinates" widget="geo_edit_map"/>

Then make sure to transform your coordinates from GPS to odoo srid. And use that field to write them.


Yannick Vaucher

Business Solutions Software Developer


Camptocamp SA

PSE A, CH-1015 Lausanne


On 13 October 2017 at 19:02, Giuseppe Flammia <> wrote:

Hello to all,

I have already written on the subject but I think I have been misunderstood.

I need to transform the lat / long coordinates of the position of an android phone

in a GeoPoint.


Is there a geoengine utility that allows you to transform lat / long into GeoPoint?




Post to:


Post to:

Post to:

Laurent Mignon
Senior software engineer

Tel: +352 20 21 10 20 32
Fax: +352 20 21 10 21

Acsone SA, Succursale de Luxembourg 
22, Zone Industrielle
​ ​
​| L-8287 Kehlen, Luxembourg
TVA LU24733605
​ | ​RCS B160400​

Acsone sa/nv
Waterloo Atrium, Drève Richelle 167
 | B-1410 Waterloo
RPM Bruxelles 0835.207.216 RPR Brussel