Questions tagged [spatial-index]

In a database, a mechanism for optimizing access to data based on the spatial column(s) of a data table.

Filter by
Sorted by
Tagged with
62
votes
2answers
11k views

Acquiring ArcGIS-like speed in Postgis

I have been using Postgis 2.0 for 3/4 of a year now and while I really enjoy using it, excessive query processing time has rendered it basically unusable for my use case. I tend to do heavy ...
6
votes
5answers
5k views

PostGIS doesn't use spatial index with ST_Intersects

I imported the data from openstreetmap using osm2pgsql and copied it another table structure. If I made a query for containing rows using st_intersects, st_contain or someone else, postgis don't use ...
16
votes
3answers
5k views

How to speed up queries for raster databases?

I have a raster database in postgresql/postgis with these columns: (ID, rast, data_of_data). 'rast' is the column that has raster files in WKT format. An example query to find the DN value of a ...
8
votes
4answers
7k views

How to efficiently access the features returned by QgsSpatialIndex?

The PyQGIS Cookbook explains how to set up the spatial index but it only explains half of its usage: create spatial index — the following code creates an empty index index = QgsSpatialIndex() ...
13
votes
3answers
8k views

Understanding use of spatial indexes with RTree?

I'm having trouble understanding the use of spatial indexes with RTree. Example: I have 300 buffered points, and I need to know each buffer's intersection area with a polygon shapefile. The polygon ...
2
votes
1answer
3k views

rtree python polygon index

Sorry for a very basic questions about rtree. I would like to check whether the point is inside the polygon and the distance (point to the nearest point in polygon) as well. I was thinking about ...
7
votes
2answers
743 views

Does PostGIS have separate implementation of GiST index from PostgreSQL?

I want to know if PostGIS has a separate implementation of GIST index or it reuses the GIST index implementation provided by Postgresql?
4
votes
1answer
503 views

Does QGIS automatically use spatialite spatial indexes?

When you write a query in spatialite you have to manually join your query to the spatial index for that index to be used to speed up the query. When QGIS displays data does it take advantage of any ...
3
votes
2answers
882 views

Creating Spatial Index for Geopackage using QGIS?

Working in QGIS 2.18.14 standalone on Windows, is there a way to create a Spatial Index for Geopackage (gpkg) layers?
8
votes
2answers
1k views

PostGIS Intermittent INDEX Performance

I have a table containing approximately 55 million data points ( point is a geometry with SRID 4326 ) and for my query I need to join this to an area table ( currently have ~1800 areas ) which ...
2
votes
2answers
1k views

Is ArcMap 10.0 Query Layer passing invalid SQL to Oracle 11gR2?

In two different environments I'm having trouble using ArcMap 10.0 Query Layers to view SDO_GEOMETRY (point) data in Oracle 11.2. This suggests I'm doing something wrong... Points are in Oracle ...
2
votes
3answers
2k views

how to create RTree index on LineString geometry

I'm working with NTS(NetTopologySuite), then I get some geometries with type of LineString, and I want to create the IntervalRTree Index on them. Here are some codes: SortedPackedIntervalRTree<...
7
votes
2answers
1k views

How does a quad-tree cope with very large objects?

If I use a quad-tree to index my map data, how does it cope with a road that goes from one end of the map to the other? What other sort of indexes should I consider to get round this problem?
3
votes
1answer
1k views

Find csv lat and long points in a shapefile polygon with geopandas spatial index

I have a csv with two sets of latitude and longitude points, and a shapefile with espg 4326. I want to find which points are inside the shapefile. I've been following the guide here which uses a ...
2
votes
0answers
292 views

Improve the speed for ST_DWithin

I need to get the outer polygon of the LSOAs within 10 miles of each postcode centroid. There are 180k LSOA polygons in table1 and 2.6 million postcode centroid points in table2. I have created 2 ...
2
votes
1answer
173 views

Running Gevel on PostGIS 2.0

I have found Gevel, a tool enabling the visualization of the content of the GiST indices in Postgres. In particular, I am interested to use it to visualize the RTree spatial index in PostGIS. Does it ...
1
vote
1answer
40 views

QgsfeatureRequest - Store result indexes

I recently posted a question. My original goal was to find a way to determine on which side of a line points are located. @xulnik answered this question with two codes. One returns a binary [0;1] ...
1
vote
1answer
1k views

Using spatial index to intersect points with polygon, when points and polygon have same minimum bounding box?

I have a MultiPolygon representing the city boundary of Houston and it has an extremely complicated boundary. I also have a set of ~900,000 points (that has the same minimum bounding box as that ...