Skip to content

Commit 8b948fc

Browse files
authored
Merge pull request #435 from s22s/docs/sjoin
Add libspatialindex and rtree to test environment
2 parents 1425d37 + df416d5 commit 8b948fc

File tree

4 files changed

+26
-1
lines changed

4 files changed

+26
-1
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ _defaults: &defaults
55
environment:
66
TERM: dumb
77
docker:
8-
- image: s22s/rasterframes-circleci:latest
8+
- image: s22s/rasterframes-circleci:9b7682ef
99

1010
_setenv: &setenv
1111
name: set CloudRepo credentials

build/circleci/Dockerfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ FROM circleci/openjdk:8-jdk
22

33
ENV OPENJPEG_VERSION 2.3.1
44
ENV GDAL_VERSION 2.4.1
5+
ENV SPATIALINDEX_VERSION 1.9.3
56
ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64/
67

78
# most of these libraries required for
@@ -74,3 +75,15 @@ RUN \
7475
sudo make install && \
7576
sudo ldconfig && \
7677
cd /tmp && sudo rm -Rf gdal*
78+
79+
# Compile and install libspatialindex
80+
RUN \
81+
cd /tmp && \
82+
wget https://github.com/libspatialindex/libspatialindex/releases/download/${SPATIALINDEX_VERSION}/spatialindex-src-${SPATIALINDEX_VERSION}.tar.gz && \
83+
tar -xf spatialindex-src-${SPATIALINDEX_VERSION}.tar.gz && \
84+
cd spatialindex-src-${SPATIALINDEX_VERSION}/ && \
85+
cmake -DCMAKE_INSTALL_PREFIX=/usr/local/ && \
86+
make && \
87+
sudo make install && \
88+
sudo ldconfig && \
89+
cd /tmp && sudo rm -Rf spatialindex*
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Spatial Join
2+
3+
```python
4+
import geopandas
5+
url = "http://d2ad6b4ur7yvpq.cloudfront.net/naturalearth-3.3.0/ne_110m_land.geojson"
6+
df = geopandas.read_file(url)
7+
df2 = geopandas.read_file(url)
8+
9+
geopandas.sjoin(df, df2)
10+
```
11+

pyrasterframes/src/main/python/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ matplotlib<3.0.0 # no python 2.7 support after v2.x.x
77
ipython==6.2.1
88
rasterio>=1.0.0
99
folium # for documentation
10+
rtree # for geopandas spatial join etc

0 commit comments

Comments
 (0)