From e0e956e834d78f88ba9d33fba3cfa1404058923a Mon Sep 17 00:00:00 2001 From: codeananda <51246969+codeananda@users.noreply.github.com> Date: Tue, 13 Feb 2024 10:02:19 +0000 Subject: [PATCH 1/4] Added strikethrough to Disk serialization --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8abd43da..1066e017 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ user. These features include: * Clustered indexes (store Python pickles directly with index entries) * Bulk loading * Deletion -* Disk serialization +* ~~Disk serialization~~ [currently broken as of Jan 2024](https://github.com/Toblerity/rtree/pull/197) * Custom storage implementation (to implement spatial indexing in ZODB, for example) From 94905b93217def3830769771853744941c7d7931 Mon Sep 17 00:00:00 2001 From: codeananda <51246969+codeananda@users.noreply.github.com> Date: Tue, 13 Feb 2024 10:02:45 +0000 Subject: [PATCH 2/4] Added multithread/process explainer + recommendations to get around them --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index 1066e017..23cba15c 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,19 @@ user. These features include: * ~~Disk serialization~~ [currently broken as of Jan 2024](https://github.com/Toblerity/rtree/pull/197) * Custom storage implementation (to implement spatial indexing in ZODB, for example) +These features do not include: + +* Multithread safety (for reading or writing) +* Multiprocess safety (for reading or writing) + +For either of these, we recommend using: + +* A PostGIS database, or +* GeoPandas + spatial joining, or +* Building an rtree from scratch in each thread/process (using [generator syntax](https://rtree.readthedocs.io/en/latest/performance.html#use-stream-loading)) + +Note that since rtree is written in C, it can be orders of magnitude faster than a +database even if running sequentially. Wheels are available for most major platforms, and `rtree` with bundled `libspatialindex` can be installed via pip: From 0f98826ef735a5c7aeb4ae947879a14af13b0271 Mon Sep 17 00:00:00 2001 From: codeananda <51246969+codeananda@users.noreply.github.com> Date: Tue, 13 Feb 2024 10:10:29 +0000 Subject: [PATCH 3/4] Added same multithread/process updates to index.rst --- docs/source/index.rst | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/source/index.rst b/docs/source/index.rst index ec162c51..f7e91cab 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -16,6 +16,20 @@ user. These features include: * Disk serialization * Custom storage implementation (to implement spatial indexing in ZODB, for example) +These features do not include: + +* Multithread safety (for reading or writing) +* Multiprocess safety (for reading or writing) + +For either of these, we recommend using: + +* A PostGIS database, or +* GeoPandas + spatial joining, or +* Building an rtree from scratch in each thread/process (using [generator syntax](https://rtree.readthedocs.io/en/latest/performance.html#use-stream-loading)) + +Note that since rtree is written in C, it can be orders of magnitude faster than a +database even if running sequentially. + Documentation .............................................................................. From d8b19a13650f09efb472d7e1f044798115b4f4d9 Mon Sep 17 00:00:00 2001 From: codeananda <51246969+codeananda@users.noreply.github.com> Date: Tue, 13 Feb 2024 10:10:56 +0000 Subject: [PATCH 4/4] Added disk serialization is broken as of Jan 2024 message to index.rst --- docs/source/index.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/source/index.rst b/docs/source/index.rst index f7e91cab..3bfb5f08 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -13,7 +13,7 @@ user. These features include: * Clustered indexes (store Python pickles directly with index entries) * Bulk loading * Deletion -* Disk serialization +* Disk serialization (`currently broken as of Jan 2024`_) * Custom storage implementation (to implement spatial indexing in ZODB, for example) These features do not include: @@ -48,6 +48,7 @@ Documentation * :ref:`modindex` * :ref:`search` +.. _`currently broken as of Jan 2024`: https://github.com/Toblerity/rtree/pull/197 .. _`R-trees`: https://en.wikipedia.org/wiki/R-tree .. _`ctypes`: https://docs.python.org/3/library/ctypes.html .. _`libspatialindex`: https://libspatialindex.org