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
3
votes
0 answers

PostgreSQL GiST index - how to decide on whether to use buffering build or not?

One of PostgreSQL GiST parameters is whether to use buffering build. However, I do not feel that the documentation is helpful enough for me to decide whether to use it or not. I have also found this presentation…
Zeruno
  • 1,391
  • 2
  • 20
  • 39
3
votes
0 answers

Python/Scipy: KDTree Query Ball Point performance issue

This question relates to the Kaggle Two Sigma Rental Listings Challenge. It contains a training data set with approximately 49.000 rows. In terms of feature engineering I'm trying to calculate the following two features: The minimum distance to any…
Matthias
  • 5,574
  • 8
  • 61
  • 121
3
votes
1 answer

SQL Server 2008 Spatial Index is not used

I have a column of type geography. I have created a a spatial index, but its not being used: declare @geog geography select @geog = 'POINT (18.12 -33.2)' select * from dbo.product WITH(INDEX(IX_Spatial)) where @geog.STDistance(GeoLocation)…
Matt Evans
  • 7,113
  • 7
  • 32
  • 64
3
votes
0 answers

Bulk-loading R-Tree: STR vs OMT vs others

I would like to insert many items into R-Tree at once. For that I would like to use "bulk-loading" and I'm in search for performant algorithm. I read about "STR: A Simple and Efficient Algorithm for R-Tree Packing" by Leutenegger, Edgington, Lopez…
Ecir Hana
  • 10,864
  • 13
  • 67
  • 117
3
votes
0 answers

What does SQL Server do for spatial data outside the bounding box of the index?

I read an article that says: The (x-min,y-min) and (x-max,y-max) coordinates determine the placement and dimensions of the bounding box. The space outside of the bounding box is treated as a single cell that is numbered 0. I took this to…
Brendan Long
  • 53,280
  • 21
  • 146
  • 188
3
votes
2 answers

What is the best data structure to store distance sensitive spatial data?

Consider I have the data about meteo station coordinates, historical temperature values and city center coordinates worldwide. Meteo stations are be placed on different distances to the city centers. The task is to determine average historical…
Kivan
  • 1,712
  • 1
  • 14
  • 30
3
votes
1 answer

Solr vs HibernateSpatial vs HibernateSearch

In my web app (built using Spring/Hibernate v4 + JPA v2.1 + PostgreSql 9.3), I have to provide the below functionalities: Text search from multiple database tables having few 10000's of rows Text search from files - doc, xls, pdf, htm (few…
AAgg
  • 494
  • 1
  • 3
  • 19
3
votes
1 answer

Postgis ST_Intersects query doesn't use existing spatial index

I have a table of suburbs and each suburb has a geom value, representing its multipolygon on the map. There is another houses table where each house has a geom value of its point on the map. Both the geom columns are indexed using gist, and suburbs…
Dao Xiang
  • 83
  • 1
  • 4
3
votes
2 answers

Can I store WGS84 latitude / longitude directly as spatial data in MySQL?

I have a set of WGS84 coordinates. The conservative approach is to store them as number ( What datatype to use when storing latitude and longitude data in SQL databases? ) and calculate distances as here ( latitude/longitude find nearest…
Horst Walter
  • 13,663
  • 32
  • 126
  • 228
3
votes
0 answers

How does MongoDB handle range and nearest neighbor queries?

How does MongoDB handle range and nearest neighbor queries? what algorithms used? I know MongoDB use GeoHash and B-Tree to index spatial data but how it handle the range and nearest neighbor queries are never mentioned in any doc. Also, MongoDB can…
dykw
  • 1,199
  • 3
  • 13
  • 17
3
votes
1 answer

Spatial database for Android with Sqlite

This question has been asked a lot of times but I did not find a relevant solution for my requirement. I want to build a simple Augmented reality App on Android which uses Spatial data (R-Tree) to store the geographic data. I found this solution…
user2126659
  • 31
  • 1
  • 3
3
votes
1 answer

PostGis insert Rectangle

Hi all i have a question: how i can insert a box (rectangle) with Ne_latitude, NE_longitude, SW_latitude, SW_longitude inside a postgis database and build an INDEX on top for retrieving the intersection between the different boxes? Thanks in advance
Asp1de
  • 151
  • 2
  • 12
3
votes
0 answers

Convert a rectangle to ranges of Hilbert numbers

When spatial data is represented using Hilbert numbers, a rectangular range is mapped to multiple ranges of Hilbert numbers. Is there any quick way to find this mapping without going through every cell the given rectangle, R, overlaps with? I can…
3
votes
1 answer

Insert new leaves in R* Tree

What is the steps of the insertion algorithm of R* Tree? Note: I want to be able to construct the tree by insertion. IT ALWAYS GIVES ME CRAP TREES with maximum overlap and maximum area cover not matter what condition I choose for selecting the best…
Kaveh Shahbazian
  • 13,088
  • 13
  • 80
  • 139
3
votes
1 answer

Which PostGIS SRID is most efficient for a spatial index?

I have a PostGIS-enabled database with a table called locations that stores latitude-longitude points (SRID 4326) in a column called coordinates. However, all of my lookups on that table convert the points to a metric projection (SRID 26986) mainly…
jonas
  • 143
  • 1
  • 9