检查点是否位于多边形内部 [英] Check point lies inside polygon or not

查看:79
本文介绍了检查点是否位于多边形内部的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我保存了多边形,现在想要检查lat,long是否位于使用sql查询的多边形内部。有谁知道如何在sql中执行此操作?



请回复


谢谢




解决方案

如果您的Polygon在SQL中存储为STGeometry或STGeography对象,您可以使用STIntersects功能。

https://docs.microsoft.com/en-us/sql/t-sql/spatial-geography/stintersects-geography-data-type?view=sql-server-2017

I have saved my polygon and now want to check whether the lat,long lies inside the polygon using sql query. Do anyone know how to do this in sql?

Please reply

Thanks


解决方案

If your Polygon is stored as an STGeometry or STGeography object in SQL, you can use the STIntersects function. https://docs.microsoft.com/en-us/sql/t-sql/spatial-geography/stintersects-geography-data-type?view=sql-server-2017


这篇关于检查点是否位于多边形内部的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆