spatial-index

How to create spatial index using EF 6.1 fluent API

我的未来我决定 提交于 2019-11-30 03:38:49
问题 Well, the question is clear enough. Is it possible to create spatial indexes using Entity Framework 6.1 fluent API? 回答1: Short answer- No, it is not. I have seen this tangentially referenced throughout blogs and have found no concrete examples of implementation. It seems to be related to the fact that spatial indexes are filtered indexes, which are not supported in Entity Framework. As support for my answer I constructed a POC console app with the most recent version of Entity Framework (6.1)

Best Performance-Critical Algorithm for Solving Nearest Neighbor

雨燕双飞 提交于 2019-11-30 02:29:37
We have a list of x,y pairs. Every pair represents a point on a 2D space. I want to find the closest point from this list, to a specific point xq,yq. What is the best performance-critical algorithm for this problem? Lisp of points is not going to change; which means I do not need to perform insertion and deletion. I want just to find the nearest neighbor of a target xq,yq point in this set. Edit 1: Thanks to all! As Stephan202 has guessed correctly, I want to do this repeatedly; like a function. An the list is not necessarily sorted (In fact I do not understand how can it be sorted? Like a

Selecting a good SQL Server 2008 spatial index with large polygons

走远了吗. 提交于 2019-11-30 00:38:18
I'm having some fun trying to pick a decent SQL Server 2008 spatial index setup for a data set I am dealing with. The dataset is polygons, representing contours over the whole globe. There are 106,000 rows in the table, the polygons are stored in a geometry field. The issue I have is that many of the polygons cover a large portion of the globe. This seems to make it very hard to get a spatial index that will eliminate many rows in the primary filter. For example, look at the following query: SELECT "ID","CODE","geom".STAsBinary() as "geom" FROM "dbo"."ContA" WHERE "geom".Filter( geometry:

How can I speed up this Sql Server Spatial query? [closed]

别等时光非礼了梦想. 提交于 2019-11-29 23:22:10
I have (what I think) is a simple Sql Server spatial query: Grab all the USA States that exist inside some 4 sided polygon (ie. the viewport/bounding box of a web page's google/bing map) SELECT CAST(2 AS TINYINT) AS LocationType, a.Name AS FullName, StateId, a.Name, Boundary.STAsText() AS Boundary, CentrePoint.STAsText() AS CentrePoint FROM [dbo].[States] a WHERE @BoundingBox.STIntersects(a.Boundary) = 1 It takes 6 seconds to run :( Here's the execution plan.... Removed And the stats on the Filter operation... Removed Now, I'm just not sure how to debug this .. to figure out what I need to

Is there any documented free R-Tree implementation for .NET?

最后都变了- 提交于 2019-11-29 16:38:54
问题 I found some open source R-Tree implementations in C#, but none with documentation nor signs of being used by someone else than the developer. 回答1: The NetTopologySuite is a JTS port to C# and it contains a STRtree class which is a read-only R-Tree 回答2: I know of none, but I would point out that libraries like this tend to: Get written (normally with some bugs). Bugs get ironed out though use. All active bugs are fixed Optional 'Latent' bugs which could never happen due to previous semantics

Know of any C# spatial data libraries?

ぐ巨炮叔叔 提交于 2019-11-28 23:50:29
I'm looking at implementing spatial queries in .NET without using SQL2008. The first requirement is to be able to create a (BTree styled) spatial index and be able to query it. Although SQL 2008 ships with .NET libraries for the types, you need to use SQL for the spatial indexes. HAs anybody used any .NET libraries for spatial data (OS or commercial)? I am looking at NetTopologySuite but it looks quiet and I don't want a dead library. SharpMap is a (well known and used) OpenSource collection of spatial libraries for .NET http://www.codeplex.com/SharpMap Commercial libraries from ESRI would be

How can I speed up this Sql Server Spatial query? [closed]

删除回忆录丶 提交于 2019-11-28 20:38:40
问题 I have (what I think) is a simple Sql Server spatial query: Grab all the USA States that exist inside some 4 sided polygon (ie. the viewport/bounding box of a web page's google/bing map) SELECT CAST(2 AS TINYINT) AS LocationType, a.Name AS FullName, StateId, a.Name, Boundary.STAsText() AS Boundary, CentrePoint.STAsText() AS CentrePoint FROM [dbo].[States] a WHERE @BoundingBox.STIntersects(a.Boundary) = 1 It takes 6 seconds to run :( Here's the execution plan.... Removed And the stats on the

Comparison of the runtime of Nearest Neighbor queries on different data structures

给你一囗甜甜゛ 提交于 2019-11-27 16:23:34
Given n points in d-dimensional space, there are several data structures, such as Kd-Trees, Quadtrees, etc. to index the points. On these data structures it is possible to implement straight-forward algorithm for nearest neighbor queries around a given input point. Is there a book, paper, survey, ... that compares the theoretical (mostly expected) runtime of the nearest neighbor query on different data structures? The data I am looking at is composed of fairly small point clouds, so it can all be processed in main memory. For the sake of simplicity, I assume the data to be uniformly

Comparison of the runtime of Nearest Neighbor queries on different data structures

半城伤御伤魂 提交于 2019-11-26 18:36:28
问题 Given n points in d-dimensional space, there are several data structures, such as Kd-Trees, Quadtrees, etc. to index the points. On these data structures it is possible to implement straight-forward algorithm for nearest neighbor queries around a given input point. Is there a book, paper, survey, ... that compares the theoretical (mostly expected) runtime of the nearest neighbor query on different data structures? The data I am looking at is composed of fairly small point clouds, so it can