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

Index for fast point-(> 100.000.000)-in-polygon-(> 10.000)-test

Problem I'm working with openstreetmap-data and want to test for point-features in which polygon they lie. In total there are 10.000s of polygons and 100.000.000 of points. I can hold all this data in memory. The polygons usually have 1000s of…
user2033412
  • 1,950
  • 2
  • 27
  • 47
0
votes
1 answer

2D spatial index optimized for queries of multiple regions

I have a search space of a large number of axis-aligned boxes. A normal spatial index, like an r-tree, will rapidly give me a list of boxes that overlap one search area. However, I have a large number (hundreds) of potentially overlapping search…
Ben Dilts
  • 10,535
  • 16
  • 54
  • 85
0
votes
1 answer

JTS with lat/lon

I'm having some spatial data that has all of its coordinates as lat/lon pairs (with about 10 digits decimal precision), it's stored in a database as WGS84 data.Some of the data is represented as polygons which are the resulting union of some smaller…
dpp
  • 1
  • 2
0
votes
1 answer

Spatial lucene simple query doesn't work?

does anyone have any experiences using the lucene's spatial search component (lucene 3.0)? I tried a very simple example but could not get the search to return anything, see below for all the codes import java.io.IOException; import…
Jay Liang
  • 1
  • 2
0
votes
0 answers

SQL Server Spatial Query Performs Poorly at Low Zoom Levels

The following query performs very well at higher zoom levels (bounding box smaller than 2 degrees longitude by 0.5 degrees latitude, but degrades significantly as the bounding box gets larger. The table contains 7~8 million rows of text and…
Matt Morgan
  • 360
  • 3
  • 9
0
votes
1 answer

Basic Select on table with lots of rows is very slow

I am currently setting up sql server and geoserver in order to render my own Maps using openlayers on the client web browser. The issue i'm running into is that my SQL Server database contains TONS of roads( every road in texas ) and a simple…
0
votes
1 answer

postgresql query with ST_GeomFromText not working

I am trying to execute the Postgres query: SELECT a.a_geom FROM a WHERE ST_within(a.a_geom::geometry,ST_GeomFromText('Polygon((1,1),(4,1),(4,4),(4,1))')); but this query gives error : ERROR: parse error - invalid geometry SQL state: XX000 …
0
votes
1 answer

SQL Server 2012 nearest neighbor

I have a very simple table structure which is using spatial data: CREATE TABLE Test ( [ID] int not null, [GeoLocation] geometry not null, CONSTRAINT [PK_Test] PRIMARY KEY CLUSTERED ( [ID] ASC …
Bogdan MITREA
  • 101
  • 1
  • 10
0
votes
1 answer

mysql MBRWithin() with multiple points

As i ask before where col in() clause for geometry column in mysql i have a lot of Point in my table and i want to find multiple points from my table by one query, someone suggest that use MBRWithin() or MBRContains() geospatial functions in MySQL,…
M2sh
  • 741
  • 1
  • 11
  • 23
0
votes
2 answers

Sql Server Geometry Column causing query to take long time to run

I have written a query to fetch the polygon data from Sql database. I have following query to fetch the results. SELECT ZIP, NAME, STABB, AREA, TYPE, orgZc.OrganizationId, orgZc.[ZipCode] AS ORGzip, …
Chandra Mohan
  • 729
  • 2
  • 10
  • 29
0
votes
1 answer

MongoDB $near returns duplicate records

Event Schema: Name:String, Description: String, Location:[ ll:[long,lat] type: String (source,destination) ], CreatedDate:Date, UpdatedDate:Date, Example of a document: { Name : 'Test1', …
Anup
  • 627
  • 5
  • 19
0
votes
1 answer

JSI RTree implementation "contains" method giving incorrect results?

I am trying to use the JSI RTree implementation https://github.com/aled/jsi to index geo locations for my application. I load it up with about 7M entries and then I query it using the contains method with a bounding box around the states of…
mattx
  • 245
  • 1
  • 10
0
votes
0 answers

SSMS won't let me create spatial index in SQL Server 2012

I have already created a spatial index on table FOO, which is working properly, and now I'm trying to create an identical spatial index on table BAR. Table BAR: id int pk autoincrement, geo geography, lat float, lon float, someOtherValue int The…
Tim
  • 8,669
  • 31
  • 105
  • 183
0
votes
1 answer

Whats the metric used in MYSQL Spatial?

I am trying to determine the metric system for MySQL Spatial 5.6.12. For example, I have the following table that created to store point geometry for multiple records. CREATE TABLE POINTS_DATA( RECORD_ID INT(15), STREET_ADDRESS …
user2052129
  • 231
  • 4
  • 11
0
votes
3 answers

Java writing/reading unserializable objects to/from file

I am using JSI (Java Spatial Index, RTree) to implement 2D spatial search. I want to save the tree to file, which triggered java.io.NotSerializableException using code below. public class GeographicIndexer { private static final Logger log =…
Nathaniel Ding
  • 166
  • 1
  • 10
1 2 3
18
19