Questions tagged [spatial-index]

Spatial indexes are data structures the support searches and computation that depend on geometric relationships between the stored data (k-nearest-neighbors, identify elements in a defined region, etc). Use this tag for questions about selecting, writing, or using spatial indexes in your code, including the use of spatial indexes in database management systems.

281 questions
4
votes
0 answers

STDistance function call performance degrade with SQL Spatial Index enabled

I use STDistance and a geometry column to discover rows with a certain distance to a specific point. The issue is that when I'm using a spatial index the query performance degrades dramatically (for 1kk rows it's executed for about 10 sec). My t-sql…
Mando
  • 11,414
  • 17
  • 86
  • 167
4
votes
2 answers

How can I specify this SQL Index Hint on my SQL Server 2008 query?

I'm not sure where/how I specify this SQL Spatial Index hint on my query :- SELECT Whatever FROM Table1 a INNER JOIN Table2 b ON a.Id = b.Id WHERE @SomeBoundingBox.STIntersects(b.SomeGeographyShape) = 1 When I run the query, it's NOT using the…
Pure.Krome
  • 84,693
  • 113
  • 396
  • 647
4
votes
1 answer

select closest point sql server spatial

I have a table Points with a column Point of type GEOGRAPHY. I am running this code to obtain the closest point: DECLARE @Wgs84Longitude FLOAT; DECLARE @Wgs84Latitude FLOAT; DECLARE @Point GEOGRAPHY = Geography::STPointFromText(N'POINT(' …
cs0815
  • 16,751
  • 45
  • 136
  • 299
4
votes
2 answers

Oracle Spatial function SDO_CS.Transform(value) results really slow

I have a custom view which queries spatial data from geometry columns and extracts latitude/longtitude values. However, the retrieval process is really slow, and takes upto 5 to 10 mins for the view data to be retrieved. Here is my view: CREATE OR…
reggie
  • 13,313
  • 13
  • 41
  • 57
4
votes
2 answers

Can I store circle and polygon within the same spatially indexed column in postgis?

According to their documentation the spatial objects can be of the following POINT(0 0) LINESTRING(0 0,1 1,1 2) POLYGON((0 0,4 0,4 4,0 4,0 0),(1 1, 2 1, 2 2, 1 2,1 1)) MULTIPOINT(0 0,1 2) MULTILINESTRING((0 0,1 1,1 2),(2 3,3 2,5…
4
votes
3 answers

Spatial Index for Rectangles With Fast Insert

I'm looking for a data structure that provides indexing for Rectangles. I need the insert algorithm to be as fast as possible since the rectangles will be moving around the screen (think of dragging a rectangle with your mouse to a new position).…
TheCloudlessSky
  • 18,608
  • 15
  • 75
  • 116
4
votes
2 answers

Find the closest bar, when searching for a drink

Problem: Find the closest bar that serves the drink(s) I'm looking for. Here you can find the generated MySQL code http://pastebin.com/5Uc2ewUW The API Request that interacts with this problem will have these parameters query, String, ideally the…
Leonardo Rossi
  • 2,922
  • 2
  • 20
  • 28
4
votes
2 answers

Is there any geospatial support available for OrientDb?

Is there any geospatial support available for OrientDB (wether its included or from 3rd party vendors)? In particular I need the ability to build spatial-indexes on my geo-data.
achingfingers
  • 1,827
  • 5
  • 24
  • 48
4
votes
2 answers

Spatial index on hive

I am creating tables in hive for a spatialdatabase, I know there are special indexes for spatial data, which are R-tree. In hive create a spatial index is not possible (i think). I was thinking about trying to make a index of x, y (long, lat),…
jmbluengo
  • 41
  • 4
4
votes
2 answers

Find rectangle in 2d space

I have set of rectangles of various sizes in 2D space. Number of rectangles may be changed dynamically from 10 to 100 000, their position, as well as their sizes are often updated. Which spatial structure would you recommend to find rectangle at…
CuriousG
  • 327
  • 1
  • 3
  • 7
4
votes
1 answer

Need a proper data structure or index for fast user lookup based on 3d points and importance factors

I have a large number of 3d points paired with importance factors. Each user has a six points. For example: Person Charlie has 6 points: (22,44,55) is his first point with an importance factor of 3, (10,0,0) is his second vector with a importance…
zachaysan
  • 1,726
  • 16
  • 32
3
votes
1 answer

MySQL Spatial Data Type Indexing Performance Comparison

Would a MBR function query against an indexed column with geometry type containing points and polygons (GeomCollection type) be slower than a MBR function against an indexed column with a polygon type? My programmer instincts tell me that it would…
Nate
  • 1,889
  • 1
  • 20
  • 40
3
votes
3 answers

Spatial index/query (finding k nearest points)

I have +10k points (latitude, longitude) and I'm building an app that shows you the k nearest points to a user's location. I think this is a very common problem and I don't want to reinvent the wheel. I'm learning about Quadtrees. It seems to be a…
ccarpenterg
  • 779
  • 2
  • 10
  • 11
3
votes
2 answers

MongoDb/GeoJson: MultiPolygon vs GeometryCollection containing only polygons

I'm collecting location information from different sources and storing everything in a MongoDb collection. Apart from point locations with a single lat/lng coordinates, I'm also storing areas. Now, one data gives me the location information as…
Christian
  • 3,239
  • 5
  • 38
  • 79
3
votes
0 answers

Oracle 11g ORA-13226: interface not supported without a spatial index

I am trying to run this query: select count (st.STANDID) as "stand view" from STANDT st where…
user7803907
  • 301
  • 3
  • 11