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
1
vote
2answers
630 views

SDO_GEOMETRY view in ArcGIS Desktop

I have an sdo_geometry table that I created using ArcGIS Desktop (by converting an esri.st_geometry table to sdo_geometry). I'm using Oracle Spatial's sdo_geometry datatype because it has linear ...
3
votes
1answer
403 views

How to find coordinates from large CSV within multiple shapefile polygons

I have a CSV file of around 230 million rows, which contains a latitude column, a longitude column, a Date stamp, and an ID column. It look like this (I added the header in this example to help ...
4
votes
1answer
436 views

Implement quad-tree as B-tree?

I've heard that quadtrees (as used in spatial-indexing) can be implemented on top of the B-tree structure for non-spatial indexes. For example, comments in a blog says: with R-trees you are ...
3
votes
2answers
869 views

How to select polygons which contain at least one point with spatial index

I'm very new to using QGIS, what I have is a points shapefile and a polygon shapefile. I would like to select all the polygons which have at least one point in them. The problem I'm running into is ...
0
votes
1answer
440 views

Error while creating spatial index on geogarphy column in sql server

I used the following code to create geography column using latitude, longitude alter table [locate].[dbo].[BFLGeocodedResult] add geographyColumn as geography::STGeomFromText ('POINT('+convert(...
5
votes
0answers
315 views

Efficiency differences between quadtree and geohashes [closed]

I am a newbie to spatial indexing. Can someone please explain me the differences between a quad-tree and geohash. From what I understand both use similar hierarchial methods of dividing the space into ...
4
votes
1answer
179 views

QgsSpatialIndex.nearestNeighbor() always returns 0 id

I'm creating a set of features and adding them to a QgsSpatialIndex to find the ones closest to a certain location. Why does nearestNeighbor() always return [0L] instead of the correct feature id? ...
3
votes
1answer
143 views

Error when saving into .gdb file

I am supposed to copy a shapefile into an existing database (*.gdb) using QGIS. There is no problem opening the database, neither when pasting the elements into it. However, once I try to save the ...
9
votes
1answer
450 views

Saving a spatial index in QGIS API?

I am trying to create a spatial index for some shapefiles using the Qgis API. I have followed the steps described in Nathan Woodrow's blog (https://nathanw.net/2013/01/04/using-a-qgis-spatial-index-to-...
2
votes
1answer
211 views

Does a feature need to be in the Spatial Index (QGIS) in order for NearestNeighbor to find its neighbours?

To be more specific: I have a feature class for which some features have an entry for a variable ('KnownBj') and some not (have a 9999 entry). I want for each feature to find the 5 nearest neighbors ...
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 ...
2
votes
1answer
753 views

Will rebuilding a spatial index recalculate the feature extent?

ArcGIS 10.3.1 ArcSDE 10.2.2 SQL Server 2012 I'm reading documentation on how to Rebuild a spatial index. Will rebuilding the spatial index automatically recalculate the feature extent of the ...
5
votes
2answers
857 views

Error when creating spatial index in MongoDB

I am wanting to use MongoDB for some basic spatial calculations (on some fairly large data), but I get an error when trying to create an index on the US Counties shapefile retrieved from the US Census'...
6
votes
1answer
275 views

3D time dimension (x,y,t) [closed]

I'm working with data points (x,y) and timestamp t as a separate attribute in my table. (x, y) are in WGS 84 latitude,longitude format while timestamp is in Unix Time. For instance (71.8, -13.5) and ...
3
votes
1answer
245 views

GIST slows down query?

I have an odd case where creating a GIST index slows down my query instead of speeding it up. The setup consists of two tables, one with multi-polygons, another with points. I want to calculate which ...
0
votes
2answers
392 views

Building efficient multi geometry type database with PostGIS?

I'm trying to build a PostGIS database which must be able to store (multi)points, (multi)linestrings and (multi)polygons. The goal is to efficiently querying the data with ST_Intersects and other ...
2
votes
0answers
202 views

display issue in qgis 2.14 : features appear and disappear

I have several virtual layers in my project. One of them contains 6 lines. Depending of the scale, at least one line disappears from the canvas for an unknown reason. I heard that sometimes, creating ...
1
vote
1answer
555 views

Using Postgis spatial index in st_distance operation based upon explicit SRID column

I have two large tables with data that spans over multiple regions of the U.S and needs a defined SRID column in atleast one the tables to denote which coordinate system should be used for area/...
2
votes
1answer
382 views

Bulk loading into pyrtree index

I'm using pyrtree to create an index for a point in polygon operation. I am currently trying to insert 1.8 million rows into the index and it takes more than an hour to do so. I am unable to use rtree ...
2
votes
2answers
343 views

Postgis Functional Index on st_pointonsurface() Ignored

If I define the following table... CREATE TABLE tbl_vast_importance( id bigserial PRIMARY KEY, geom geometry(MultiPolygon,4326) ); CREATE INDEX ON tbl_vast_importance USING GIST (geom); CREATE ...
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 ...
13
votes
1answer
350 views

Accessing the internal data structure storing Postgis spatial index (PostGres GiST)

I am curious about how the internal data structures and storage mechanism of the spatial GiST index in Postgis. In Oracle, I used to like to show how the SDO indexes were "just another table", and how ...
3
votes
0answers
221 views

PyQgis - How to update a spatial index?

I am trying to speed up a QGIS plugin I wrote by adding a spatial index to a vector layer. The aim of my plugin is to simplify a line network by merging some of its features, based on some criteria. ...
7
votes
0answers
193 views

QgsSpatialIndex partial or complete overlap

I'm working on adding some functonality to a QGIS plugin. It currently uses a QgsSpatialIndex to efficiently compute whether the features of a vector layer intersect (potentially millions) of ...
2
votes
1answer
97 views

In memory spatial index for frequent updating point objects

Is there any in memory spatial index specialized for frequent updating point objects? The dataset will be moving cars, most likely update per second but with millions of them. The project will be ...
1
vote
0answers
61 views

Spatialite Index not matching

I have a dataset containing GPS points I store in a table with a geometry column. I use the following code to populate my table. CREATE TABLE STOPS_GEO ( stop_id TEXT PRIMARY KEY, stop_desc TEXT, ...
3
votes
1answer
82 views

nearest N objects (points) [closed]

I'm searching for the nearest ten neighboring points from a given point. When I use this query: SELECT id, geom, ST_Distance(geography(geom), ST_GeographyFromText('SRID=4326;POINT(-0.22707 51....
2
votes
1answer
293 views

Indexing PostGIS table by tile boundaries

I have a PostGIS table with 2M rows, all Points. I'm creating tiles from the data, but it's quite slow. Although I have the normal geometry indexes enabled on the table, I wonder if it's possible to ...
1
vote
0answers
597 views

Using spatial index in spatialite query?

I posted this question originally Using nearest neighbor query in SpatiaLite? Using the answer given I was able to get the query working on some test data. However I am having trouble applying a ...
2
votes
0answers
752 views

Using a ShapeFile spatial index with ogr2ogr and ogr.DataSource.ExecuteSQL()

I created a spatial index foo.qix for a foo.shp with ogrinfo -sql "CREATE SPATIAL INDEX ON foo" foo.shp However, when I do a query with ogr2ogr and look at it in strace, it doesn't use that index: ...
2
votes
1answer
453 views

OpenStreetMap Data Lookup Slow in PostGIS

I have imported OpenStreetMap data (Europe) into PostgreSQL 9.1 database with the help of osm2pgsql and filtered out everything expect administrative areas. I have GIST index for polygon (way) column. ...
0
votes
1answer
172 views

Problem with spatial index PostGis

I'm using Postgis 2.1. I have this table with about 50k rows: CREATE TABLE rilevazioni ( geom geometry(Polygon), stimolo integer, tmstmp timestamp without time zone, id bigserial NOT NULL, ...
1
vote
1answer
169 views

ArcSDE PostgreSQL configuration parameters for Spatial Index?

I wonder why there is not any configuration parameter (DEFAULT Keyword) for spatial indexes in Arcsde for postgres. In ArcSDE for Oracle we have S_STORAGE,S_INDEX_SP_FID,S_INDEX_ALL parameter for ...
1
vote
1answer
630 views

How to disable spatial index creation by ArcSDE for Oracle Spatial

Working with ArcSDE 10.1 and Oracle spatial 11g. I set the feature class in load_only_io before loading shapefiles. I am using geoprocessing tool (append) in ArcGIS to load shapefile to geodatabase. ...
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 ...
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() ...
2
votes
1answer
1k views

Basic sp-gist indexing?

Please forgive a very, very elementary question. I am using a PostgreSQL 9.3.5 database, and one of the tables stores longitude and latitude. (These are two separate columns.) I would like to do ...
10
votes
2answers
3k views

ST_Distance doesn't use index for spatial query

I can't get PostGIS 2.1 running on PostgreSQL 9.3.5 to use a spatial index even for the simplest queries. The whole dataset is 8 million points (population count grid from here). The table is created ...
2
votes
1answer
120 views

Index to speed up ST_HausdorffDistance?

When comparing similarity of linestrings with ST_HausdorffDistance (or another type of similarity function), is there a way to use an index to speed up the search for similar linestrings?
0
votes
1answer
97 views

How to create my own remote sensing index?

Using Landsat images how do I create my own indices to extract particular landuse? Are there any tool/ software for creating indices?
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 ...
3
votes
1answer
120 views

Match housenumbers on buildings (special case of point-in-polygon-test)

Task with example I'm working with geodata (country-size) from openstreetmap. Buildings are often polygons without housenumbers and a single point with the housenumber is placed within the polygon of ...
0
votes
1answer
650 views

Spatial search performance on a collection of Points in a PostGis database

Let's assume you have a huge PostGis spatial table (using Postgresql 9.2, postgis 1.5) : BIGTABLE ( p Point, someData varchar ) which contains millions of records. Each record has been created ...
5
votes
1answer
557 views

What are the PostGIS Raster Constraints used for?

My question is quite basic, but I have not found a simple explanation of why raster constraints are useful. I have worked with rasters in PostGIS for a while but only recently I realized that I do ...
1
vote
1answer
590 views

Geoserver WFS features query inaccurate using SQL Server Backend with spatial index

I´m using Geoserver to query features through WFS in an Web Application with Openlayers as client. The queried layer is using SQL Server as backend storage. When applying a spatial index to the ...
8
votes
1answer
11k views

Fastest strategy for proximity searches in SQL Server 2012

This is my very first question here, so bear with me! I'm implementing a back end for a mobile app which will have to do proximity searches to find nearby POIs (points os interest). I know it's a ...
3
votes
1answer
474 views

How to quickly extend PostGIS's R-Tree implementation?

I am working on a problem where along with data points location, I also have information about the connectivity between points.(Think a graph of points, where an edge denotes some relationship) My ...
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 ...
2
votes
2answers
738 views

Geary's index of spatial autocorrelation

Does anyone knows If there is a way to calculate Geary's index of spatial autocorrelation on open source gis?
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?