Skip to main content

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
0 answers
36 views

I have a cloud hosted Microsoft SQL Server 2019. I have a table with 77 columns and one of them is of geography type called Geo. The table has around 431K rows. Of these, 390K have a NULL Geo, 18K are ...
Dunge's user avatar
  • 111
5 votes
2 answers
240 views

I'm trying to improve the query below. My goal is to select all lines from time_lines that are intersecting the boundary of time_subdivided_polygon and are within polygons of berlin_2024_ale. The ...
Felix_geospatial's user avatar
3 votes
0 answers
107 views

The PostGIS guide say that we must to use a GIST index, and the PostgreSQL guide say that we can use a WHERE predicate: CREATE INDEX mytable_geom_idx ON t USING GIST (geom) WHERE predicate; But the ...
Peter Krauss's user avatar
  • 2,572
2 votes
1 answer
273 views

I've used H3 in the past just for speeding up my spatial queries, however I'm looking for the best way to store the index information itself alongside my data. Something like: CREATE COLUMN H3res14 --&...
Lucian B's user avatar
1 vote
0 answers
98 views

Here is my query: explain analyze with pings as ( -- ================= SELECTING JOINED data with join conditions -- ================= -- ================= -- ================= -- ================= -- ...
analyst92's user avatar
  • 889
2 votes
1 answer
237 views

I have a general question about geopandas overlay method. I want to know whether it already uses spatial indexing or not. If not, how would I apply indexing? Background I do an intersection with ...
tetje's user avatar
  • 109
1 vote
1 answer
117 views

I am wondering if QgsSpatialIndex() does support Z values, respectively 3D distances? If too short to read: Looking at the underlying libspatialindex I cannot find information neither. However, rtree ...
MrXsquared's user avatar
  • 36.3k
4 votes
3 answers
1k views

(Background: I'm more of a MySQL guy, I've only been using PostGIS for a few months to solve this particular problem set.) I have a table that contains a point and a radius: id | location ...
Daniel Orner's user avatar
3 votes
1 answer
371 views

I have a GPKG file, example.gpkg, with 2 layers, base and circles. There is only 1 geometry in base, and there is a large number of geometries in circles. I would like to select all the geometries in ...
zabop's user avatar
  • 3,380
8 votes
2 answers
484 views

I have a GPKG file, with 2 layers, p and q. I would like to create a third layer, r. I would like r to contain those parts of p which do not intersect with q. We could phrase this as r=p-q. Below is a ...
zabop's user avatar
  • 3,380
2 votes
1 answer
224 views

I have a table where each row has a point Geometry(POINT(...)) [long lat]. These geometries don't specify an srid. Which means we're using a cartesian plane to do the calculations. All of this data is ...
Bombadillio's user avatar
1 vote
1 answer
398 views

I have a question about spatial indexes. I'm using SQLite with VirtualSpatialIndex. I have a main table that contains millions of polygons. Let's say every 4 months I have to get a completely new ...
Sch's user avatar
  • 41
1 vote
0 answers
70 views

I am looking for high performant database that support spatial-temporal index. It would be ideal if spacial part of it indexed based on S2 geo library.
user652061's user avatar
2 votes
0 answers
355 views

It was possible in previous QGIS version but since a while, if i add Create a spatial index in the modeler i get a warning : L'algorithme “Créer un index spatial” ne peut pas être exécuté dans un ...
GuZzO80's user avatar
  • 21
2 votes
0 answers
76 views

Here are the relevant CTE's from my query: campaign_ping as ( select * from campaign_pings cp left join campaign_pings_validity cpv on cp."ID" = cpv."pingID" where cpv."...
analyst92's user avatar
  • 889
4 votes
1 answer
164 views

Here is a snippet from my code: ST_DWithin(c.convex_hull::geography , cp."geoJson"::geography, 20) Please note both "convex_hull" and "geoJson" are geometry columns (...
analyst92's user avatar
  • 889
2 votes
1 answer
288 views

I would like to store bounding boxes in a column of my table. Thus I wanted to use the box2d data-type for that column. However it seems like I can't create an index on that column. Here is my ...
Humppakäräjät's user avatar
1 vote
1 answer
1k views

I have 2 data frames with routes and linestrings: df1 = { "Route": ["AL013-AL015", "AL013-AL014", "AL013-AL011"], "Linestring": ["LINESTRING (...
just_learning's user avatar
0 votes
0 answers
210 views

I'm just starting to learn MySQL and I have a script that loads a large CSV file (4 million rows) into a table and then adds a spatial index to the GeometryLatLon column. The spatial index creation ...
Rojj's user avatar
  • 175
0 votes
4 answers
434 views

I have a list of 63 rasters. They are the same extent, resolution, projection, etc. Because I extended 62 rasters to the maximum extent of the 63rd, I introduced NA values. However, these are relative ...
Nick Masto's user avatar
0 votes
0 answers
216 views

I am trying to compute soil moisture index using Landsat 8 collection 1 level 1, but it seems that I am not computing it properly. My range is not 0 to 1, as it should. Values of my variables can be ...
Chris's user avatar
  • 133
1 vote
1 answer
518 views

I want to write a GeoPackage file with GeoTools and create a spatial index in the end. After consulting the documentation and also the implementation I still can not figure out a way to do this using ...
evod's user avatar
  • 333
0 votes
0 answers
582 views

As my data sets are very large I’ve been unable to compute anything in R. I’ve been successful doing things manually in ArcGIS Pro. Now I’m attempting to calculate the Shannon diversity index for ...
user434180's user avatar
3 votes
0 answers
572 views

I have a JSONB column with an array of locations. I want to do a Postgis GiST index on each of the array items. For example: [{ "location":{ "type": "Point", ...
Darko Stanimirović's user avatar
4 votes
0 answers
394 views

It is easy to save a GeoPandas dataframe to a PostGIS database using the gdf.to_postgis(...) command. But, it is not clear to me if it automatically generates spatial indices or if these need to be ...
jtam's user avatar
  • 365
1 vote
1 answer
61 views

I have created 2 databases. First one has PGSnapshot Schema which looks like this. On this I fire query select id,ST_AsText(geom) from nodes where ST_Intersects(geom , ST_GeomFromText('POLYGON ((-125....
Yasha Jadwani's user avatar
3 votes
2 answers
654 views

I am trying to write a custom processing tool for QGIS which joins the nearest attributes with some conditions. Therefore I'd like to use a QgsSpatialIndex to increase performance. This works ...
MrXsquared's user avatar
  • 36.3k
1 vote
0 answers
246 views

SDE.ST_GEOMETRY — Oracle 18c — ArcMap/EGDB 10.7.1: I have a view that returns the startpoint of lines as an ST_GEOMETRY column: create or replace view bc_atn_startpoint_vw as ( select objectid, ...
User1974's user avatar
  • 1,246
3 votes
0 answers
903 views

I am quite familiar how to work with the Toblerity RTree library: import fiona import rtree with fiona.open(input_path,'r') as source: p = rtree.index.Property() p.filename = "index....
MartinT's user avatar
  • 896
0 votes
0 answers
813 views

I am trying to understand about how R-tree works for polygon data. In other words, polygon is a list of vertices (points), however, I am wondering how spatial index can recognize the order of points ...
Masoumeh's user avatar
3 votes
0 answers
156 views

I got a giant geometry that I retrieve from an API and I break it into smaller pieces with ST_Subdivide. Right after, I'm inserting it into a temporary table (which is indexed and only contains a ...
Bil11's user avatar
  • 81
0 votes
1 answer
172 views

I'm trying to generate a Shadow Index using the maximum values from a image composite (ImageCollection). Here is the link with the code: https://code.earthengine.google.com/...
Christoph Correia's user avatar
7 votes
1 answer
2k views

I've run into a performance problem from which I'm not sure how to move forward. I have a table with ~150M rows. And I have a query that in EXPLAIN has a cost of just cost=0.55..209.36, but in EXPLAIN ...
kszafran's user avatar
  • 111
1 vote
1 answer
491 views

I am trying to find the index (x and y pixel position in an image) of a pixel (ex: the pixel with max DN value). however, it has been challenging for me. My code is: var geometry3 = ee.Geometry....
mojtaba's user avatar
  • 11
1 vote
1 answer
1k views

I an deleting one of the intersecting polygons from a vector layer using PyQGIS code mentioned below. It is too slow as I have many features in the layer. Is there a way to speed it up? index= ...
vigna purohit's user avatar
0 votes
1 answer
673 views

I want to make NDBI indices to a certain location. But when I run the code it can only show part of it //####################### Import SHP ####################### var countries = Indonesia //Import ...
imstilllearning's user avatar
3 votes
0 answers
1k views

I want to process data with a model in QGIS. It works fine, but the bigger the datasets get, the longer it takes. The reason is, I use GeoJSON layers and they don't have a spatial index. That is why I ...
Enzo Baldini's user avatar
  • 2,440
1 vote
0 answers
325 views

I am working with the GeoNames database which has around 10 million rows of locations including longitude and latitude. I have tested around 6 various nearby location queries including spatial indexes....
Ryan NZ's user avatar
  • 119
4 votes
1 answer
485 views

Is it possible to share rtree index in memory with multiple processes? I have succeeded to use rtree in multiprocessing environment with joblib, but the problem is that each process has its own copy ...
r0x0r's user avatar
  • 161
4 votes
1 answer
642 views

I have been reading this blog by Paul Ramsey, and considering my own data. https://blog.crunchydata.com/blog/the-many-spatial-indexes-of-postgis I have a regular grid covering an area of the world. ...
TheRealJimShady's user avatar
1 vote
0 answers
735 views

So I read in a .tif image with rasterio and what I get out when printing dataset.read(1) is what I understood a coordinate system in the "red" band of the image. The coordinate system is in ...
Oliver's user avatar
  • 195
0 votes
2 answers
1k views

I'm trying to calculate Index‐Based Built‐up Index (IBI). This index has been mentioned in A new index for delineating built‐up land features in satellite imagery. As mentioned in the paper, the range ...
Badal's user avatar
  • 369
5 votes
0 answers
285 views

I am encountering a weird behaviour in QGIS 3.20 on Windows. Steps to reproduce: Create an empty project Create a SHP layer. Add a few features. Save the changes to disk At this point everything is ...
peauc's user avatar
  • 51
5 votes
1 answer
700 views

I have such vanilla index on a PostGIS table: CREATE INDEX polygons_gix ON public.polygons USING gist (geom); Because of this: If using more than one transformation, it is useful to have a ...
swiss_knight's user avatar
  • 11.4k
7 votes
3 answers
2k views

Context I have a massive MultiPolygon (~90'000 vertices, super complex, spreading over 60km², with lots of holes and parts) resulting of some Python computation. This MultiPolygon is coming as a WKT ...
swiss_knight's user avatar
  • 11.4k
2 votes
2 answers
1k views

I'm trying to learn how to write geopackage SQL queries so that the r tree index is used, but I can't seem to find any good information. I'm just trying to write a simple query in the qgis db manager ...
Alex's user avatar
  • 187
5 votes
1 answer
2k views

Creating a spatial index on a geometry field is very important. The docs also state that you should perform a VACUUM ANALYZE after large update operations. But is it ever necessary to drop an existing ...
Encomium's user avatar
  • 3,223
2 votes
1 answer
2k views

I am trying to calculate BAIS2 index for sentinel-2 collection over a study area in Google Earth Engine. I tried to create a function using expression but end result is binary image rather than index ...
Monish's user avatar
  • 141
2 votes
1 answer
191 views

I'm working with a time series stack of 28 raster bands. Each band is an image for a specific date, spanning all of the year 2020, and they are stacked in order. The stack (change_point_raster) is in ...
KatieGeo's user avatar
3 votes
0 answers
298 views

I have about 1.5 billion points in a geography column which represent topography. I'll be retrieving all the points that are within a certain distance of a given long/lat. I was able to create a GIST ...
Opossum Posse's user avatar

1
2 3 4 5