I'm storing latitude/longitude coordinates in a geometry field (using PostgreSQL 9.1.10):
Field('point', 'geometry()') I understand there is also the geography type but from my reading geometry is faster and is suitable for small distances ( http://workshops.boundlessgeo.com/postgis-intro/geography.html#why-not-use-geography ) I want users to be able to specify a reference point and search for all records within X distance from the reference point. Using raw SQL I would use ST_DWithin <http://postgis.refractions.net/docs/ST_DWithin.html> doing something like SELECT name, ST_AsText(point) FROM mytable WHERE ST_DWithin(point, ST_GeomFromText('POINT(40.47112 -76.33)',4326), 0.1) But web2py does not seem to support ST_DWithin only st_within. So how can I achieve a similar result in web2py? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.