缓冲 lon,lat 点(以米为单位)(大约)
我需要围绕一个点(经度,纬度)创建一个半径约为 X 米的圆。
该点是通过相当于 geomFromEwkt('SRID=1;POINT(lon lat)')
生成的。
我知道 postgis 的 buffer 或 st_buffer 函数,但是不确定如何将距离(米)转换为“该几何图形的空间参考系统的单位”。
doc “计算以该几何体的空间参考系统为单位”
I need to create a circle around a point (lon,lat) which is approximately X meters in radius.
The point is generated via the equivalent of geomFromEwkt('SRID=1;POINT(lon lat)')
.
I am aware of postgis' buffer or st_buffer function, however am unsure how to translate the distance (meters) to the "units of the Spatial Reference System of this Geometry".
doc
"Calculations are in units of the Spatial Reference System of this Geometry"
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
越往北走,椭圆形就越明显。如果您使用的是 PostGIS 1.5,请执行 Geometry(ST_Buffer(GeogFromText('POINT(lon lat)'),100)) 在球形空间中进行缓冲,并获得正确的答案,无论纬度如何。
The elliptical shape will be more and more pronounced the further north you get. If you're on PostGIS 1.5, do geometry(ST_Buffer(GeogFromText('POINT(lon lat)'),100)) to do the buffering in spherical space and get a correct answer regardless of latitude.
这是通过转换为单独的坐标系来解决此问题的另一种方法。
Here is another way of solving this by transforming into a separate coordinate system.
一位同事向我介绍了他使用的近似计算:
其中位置是点几何形状。
a colleague filled me in on a approx calculation he uses:
where location is the point geometry.