I have to learn more about it. I've choose geometry as geography don't
support st_within that'is the function that I need for testing in a point
is inside a map area.
Il giorno lunedì 12 dicembre 2016 20:46:47 UTC+1, Pierre ha scritto:
>
>
> my guess is you are not "feeding" the geometry field w
my guess is you are not "feeding" the geometry field with the correct data
the "natural" container for raw (default) lat lon is a geography field :
*geography()*
if instead you want to use a *geometry()*, you need to transform the
original data from EPSG:4326 to another coordinates system
I us
Thank you Pierre I've add this field to the db:
Field('geopoint', 'geometry()', compute=lambda r: 'POINT({0} {1})'.format(
float(r['longitude']),float(r['latitude']))),
and I've also substitute the geometry filed with this new geopoint filed in
the query:
events_comments = db((db.events_c
don't know if this relates to your problem
but I have had issues with the *geoPoint* object in the past and as soon as
I removed it from my code everything worked fine.
Try with :
pt = 'POINT({0} {1})'.format(lon,lat)
instead of a geoPoint
--
Resources:
- http://web2py.com
- http://web2py
4 matches
Mail list logo