增长一列:web
add column `location` geometry default 函数
st_setsrid(st_makepoint((0)::double precision, (0)::double precision), 4326)spa
使用距离过滤:ci
1. st_distance( geometry, geometry) it
这个函数有两个坑点, 1,是使用 欧式空间, 2 则返回的单位不是以米或者kmio
2. st_distance_sphere(geometry, geometry) class
返回的单位是meterwebkit
3. st_dwithin(geometry,geometry)margin
st_dwithin(geography,geography,100米)di
坑的是, geography实际上是有坐标系的, 同一坐标系才能计算距离