Questions tagged [rtree]

R-trees are tree data structures used for spatial access methods

Filter by
Sorted by
Tagged with
0
votes
0answers
24 views

Different levels in R-tree

I am using the "rtree" package in Python to index spatial data. Is there any way to identify how many levels are there in the R-tree?
0
votes
0answers
35 views

Constructing R-tree for continuous data?

I want to construct an R-tree to index land-use data. How do we index continuous data using an R-tree?
1
vote
1answer
86 views

How R-Trees, R*-Trees can be used to index the Road Network?

I am trying to understand the Tree Indexing method of the Road network. In R-Tree the Minimum Bounding Rectangle is used to store the data points, but how it can hold the line segments of the Map? Or ...
3
votes
1answer
194 views

Python rtree and parallelized code

I'm trying to parallelize with multiprocessing.Pool() some processes that involve queries of R-trees. In the non-parallel procedure, it works as expected. But when I try to do it in parallel (even ...
3
votes
2answers
265 views

Is there a Java API for in-memory geo indexes?

My application is backed by PostGIS. There is a particular set of tables which have one of their columns being a geographic polygon. They are relatively small in size (few thousand rows) and can ...
4
votes
0answers
106 views

Performance improvement methods in a shapely environment

I am trying to use the Shapely and Fiona libraries to eliminate polygons from one layer (some triangles) from another layer (which represents the world's oceans). I am looking for suggestions to ...
0
votes
1answer
48 views

At what point is the R-tree created?

Whats going on: I am working with postGIS and spatial datas. I am having trouble to fully understand the R-tree algorithm. Example query: In which town is point P located? My understanding so far ...
0
votes
1answer
123 views

how to index measurements with spatial coordinates

I am beginner with the RTree I use libspatialindex, I will want to know how I insert a polygon / point with a measurement (statistic or measurement of weather) do I have to change the structure ? ...
4
votes
0answers
447 views

Construction of R-tree data structure for tiling polygon vector data

Because it is better for irregular distributed data, I want to create tiles using r-tree for my dataset. My dataset consists of 1214 polygons which represents building foorprints. After doing some ...
4
votes
2answers
878 views

PostGIS R-Tree: Why does it exist when PostgreSQL already implements its R-Tree with what appears to be the same algorithm?

PostGIS implements its R-Tree algorithm via PostgreSQL's GiST. But PostgreSQL already implements its R-Tree and the logic appears almost identical to that PostGIS is also implementing. So why are ...
4
votes
1answer
1k views

Saving python Rtree spatial index to file?

I would like to save an Rtree spatial index to file. I tried using pickle.dump, but when I loaded the .p file using pickle.load, the bounds were way off. Here's an example: import rtree, pickle from ...
1
vote
0answers
195 views

When I should use Rtree/KdTree vs Morton z-index and s-curves?

I was always confused by those two families (?) of indexing. I feel that the first one goes with the "normal" data, while z-index and s-curves work the best for tiling/grid/uniformly distributed ...
1
vote
0answers
430 views

Find nearest polygon to point using Python, OGR and Rtree

I have a dataset with points and one with polygons. When the points intersect with one or more polygons they get assigned an attribute value inhereted from the polygon, but not all points intersect ...
1
vote
2answers
416 views

Can't retrieve geometry (Python, OGR, Rtree)

ISSUE FIXED SEE: '.Simplify' causes 'null geometry' errors (Python, OGR) Im trying to create a spatial index on one of my layers for the purpose of performing an intersect analysis. ...
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 ...
8
votes
3answers
3k views

RTree spatial index does not result in faster intersection computation

I have some code that I am using to determine which Shapely Polygon/MultiPolygons intersect with a number of Shapely LineStrings. Through the answers to this question the code has gone from this: ...
1
vote
0answers
270 views

Splitting a RASTER data (a DEM) using Quadtree or R* tree [closed]

I want to create a tree of raster images, of which root node would be the largest which is original\input raster. The child nodes of root node would be the resultant rasters produced after splitting ...
1
vote
0answers
233 views

How to Bulk Import to R-tree using a Generator?

I've been trying to improve one of a couple of scripts I'm writing to be comparable to the other script in performance speed which uses a different approach to tackle the same FGDB problem. I'm ...
1
vote
2answers
254 views

rtree intersection returns only zeros when filled with via stream from generator function

I have trouble getting anything useful out of a rtree (Rtree==0.8.2) intersection. Instead of returning the indices/IDs that I passed into the index on creation, I get zeros. I have some data: for ...
1
vote
0answers
439 views

Shapely Implementation Dramatically Slower than PostGIS

I'm trying to characterize two different python scripts and how fast they rip through the same file GDB on a thin client remotely accessing a Linux server where the FGDB and scripts are stored. The ...
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 ...
4
votes
1answer
586 views

Shapely & RTree vs. PostGIS/PostgreSQL? [closed]

I would really like some insight to the pros and cons of one approach versus the other. I recently wrote some python code that inspects two layers of the same test ESRI GDB file using RTree (bounding ...
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 ...
4
votes
1answer
996 views

Finding problematic rows - spatial join in GeoPandas?

I have an sjoin function from geopandas that is behaving erratically: it works on some version of the "points" geodataframe but not others. merged=sjoin(points,polygons, how='left',op='within') The ...
10
votes
2answers
5k views

installing rtree on windows 64 bits

I am using windows10 64 bits, my os.name is 'nt', I used pip to install but its complaining about the spatialindex_c.dll File "C:\Users\Bachir\AppData\Local\Temp\pip-build-td64lrth\rtree\rtree\core....
12
votes
3answers
6k views

geopandas spatial join extremely slow

I am using the code below to find a country (and sometimes state) for millions of GPS points. The code currently takes about one second per point, which is incredibly slow. The shapefile is 6 MB. I ...
3
votes
0answers
379 views

Installing Rtree on Windows 7 Python 35

I tried installing Rtree on Python35 on my windows 7 machine using the pip install command but ran into this error: OSError: could not find or load spatialindex_c.dll I also tried this and it gave me ...
1
vote
1answer
1k views

How to increase performance for nearest neighbour query using a multipoint? (Boost Geometry)

The following function gets the nearest point in an rtree to a multipoint geometry. I'd like the performance of the function to be better. Is there any way to make it faster? TimingLink* ...
4
votes
0answers
3k views

Point in Polygon using Rtree and Shapely

I am wondering what the correct syntax is for doing a point in polygon search using Shapely and RTree. I'm really interested in speeding the process up using the RTree index but am not having any luck ...
2
votes
0answers
556 views

PostGIS: What is the difference between regular R-tree and R-tree on top of GiST?

I have built a spatial index structure that I am trying to compare with other existing spatial index structures. I have to either code (in Java) the same logic that PostGIS uses or find a java library ...
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 ...
4
votes
1answer
3k views

Installing libspatialindex on Windows 8

I need to use Rtrees to make some code I'm running faster. However, in order to use Rtree, I need to install libspatialindex. When I've installed packages in the past I've been able to either download ...