- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我们有两个表,其中存储了多边形几何图形。我想获取一个表中存在的多边形,而不是另一个表中存在的多边形。截至目前,我正在进行左外连接并使用 STAsText() 但它需要很多时间。仅供引用,我们有 1.2 亿个多边形在两个表中。有没有快速获取的方法? (可能正在使用空间索引,我不知道这一点)。
仅供引用,我使用的是 SQL Server 2012
最佳答案
应该这样做:
select a.*
from dbo.newPolygon as a
left join dbo.OldPolygon as b
on a.Shape.STEquals(b.Shape) = 1
where b.ID is null
如果您在两个表的 Shape 列上都有空间索引,它应该支持此查询。来自文档:
Spatial indexes support the following set-oriented geometry methods under certain conditions: STContains(), STDistance(), STEquals(), STIntersects(), STOverlaps(), STTouches(), and STWithin(). To be supported by a spatial index, these methods must be used within the WHERE or JOIN ON clause of a query, and they must occur within a predicate of the following general form:
geometry1. method_name( geometry2) comparison_operator valid_number
(强调我的)事实上,由于我们正在按照文档中指定的方式使用 STEquals(),所以我们应该可以开始了。
关于sql - 比较多边形几何类型的最快方法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28986816/
我想知道是否可以将简单的位图转换为几何对象 最佳答案 是的,您可以使用跟踪。 Potrace是一个开源的位图到矢量跟踪器库。 然而,位图追踪并不完美。对于高质量的矢量图像,line tracer 一般
这类似于this question,但是却相反。 我有两个地理位置(纬度,经度)A和B。假设它们相距40海里。我想计算在A和B之间的直线上,从A点起10海里处的坐标。数学(我每天使用的其他一些数学),
我想计算一个点到由 2 个点定义的直线的距离。 我正在使用 javascript,这就是我使用维基百科得出的结论:https://en.wikipedia.org/wiki/Distance_from
我对 boost::geomentry 有疑问。 #include #include #include #include int main(){ typedef boost::geometry
我有一个问题。我想将四边形与四边形相交。 int main(){ typedef boost::geometry::model::point_xy TBoostPoint; typedef b
我无法在 OpleGL 中获得正确的转换。 我有 point3D - P(X,Y,Z) 和投影矩阵 M,它等于 K*(R|T) 其中 K - 相机标定矩阵 (R|T)——点(物)坐标系变换(R——旋转
我想做一个凸面(由一些直线或圆弧组成)围绕它的几何中心(Cx,Cy)旋转。同时凸面两侧有两个圆(由半径给出:R 和左中心:(Lx,Cy),右中心:(Rx,Cy))。表示与几何(Cy) X 轴相同的圆心
我有一个 DrawingVisual表示路径的元素,该路径的几何描述由此 syntax : "m106,59.3c0-1.98,0,0-4.95,0.989-3.96,0.989-13.8,3.96-
如何将我自己的数据集转换为可供 pytorch 几何图形神经网络使用的数据集? 所有教程都使用已转换为 pytorch 可用的现有数据集。例如,如果我有自己的点云数据集,我如何使用它来训练图神经网络的
我正在使用 PyQt5 和 OpenCV。我想创建一个读取视频帧并执行橡皮筋拉伸(stretch)以生成几何图形的类,该几何图形将由不同的类用于裁剪视频流(此示例中不包括第二类)。 在此示例中,从网络
我们有两个 (PostgreSQL 9.2) 表。第一城市: loc_id | integer | not null name | character
我有一张 table : create table if not exists places( id bigserial not null constraint places_pkey primary
我在 postgresql 中有一个带有 PostGIS geometry(point, 4326) 列(位置,使用 SRID 4326)的表,我有一个使用 SQL Alchemy 更新表(其余列)的
我开始使用 c++11 并尝试使用 boost geometry 运行一些示例代码 #include #include #include #include BOOST_GEOMETRY_REG
我有一个存储为 csv 文件的数据框,其中一列是多边形对象。但是,此列存储为字符串而不是 GeoPandas 几何对象。如何将此列转换为 Geopandas 几何对象以便执行地理分析? 这是我的数据的
我从两台相同品牌的相机拍摄的两张图像相距一定距离,拍摄相同的场景。我想计算两个相机之间的真实世界旋转和平移。为了实现这一点,我首先提取了两个图像的 SIFT 特征并匹配它们。 我现在有了基本矩阵以及单
我目前正在使用 boost 几何/空间索引库,以便对 3d 边界框执行范围查询。例如,我能够获得与查询边界框重叠的所有边界框的列表。 文档 ( http://www.boost.org/doc/lib
boost::geometry::model::point 将点的维度作为编译时参数。例如, typedef bg::model::point point; 有没有什么方法可以在运行时指定维度,比如说
我一直在寻找一种在 three.js 中将 uv 映射添加到我的自定义几何体的方法。我找到了这样做的方法,但我找到的解决方案都没有用。谁能解释一下 uv-mapping 的工作原理以及如何正确使用它?
在我的应用程序中,用户可以使用 iPhone 的 GPS 定义足球场的三个角落,方法是一个接一个地走到角落,然后点击按钮。这很好用,我可以在屏幕上绘制生成的矩形,类似于它在 Google map 中的
我是一名优秀的程序员,十分优秀!