Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Conda Recipe and README.md #730

Merged
merged 3 commits into from
Oct 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 28 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ cuSpatial supports the following operations on spatial and trajectory data:
8. Quadtree-based indexing for large-scale point data
9. Quadtree-based point-in-polygon spatial join
10. Quadtree-based point-to-polyline nearest neighbor distance
11. Distance computation (point-point, point-linestring, linestring-linestring)
12. Finding nearest points between point and linestring

Future support is planned for the following operations:

Expand All @@ -39,31 +41,37 @@ conda install -c conda-forge -c rapidsai-nightly cuspatial

To build and install cuSpatial from source:

### Install dependencies
### Pre-requisite

Currently, building cuSpatial requires a source installation of cuDF. Install
cuDF by following the [instructions](https://github.com/rapidsai/cudf/blob/branch-0.11/CONTRIBUTING.md#script-to-build-cudf-from-source)
- gcc >= 7.5
- cmake >= 3.23
- miniconda

The rest of steps assume the environment variable `CUDF_HOME` points to the
root directory of your clone of the cuDF repo, and that the `cudf_dev` Anaconda
environment created in step 3 is active.
### Fetch cuSpatial repository

### Clone, build and install cuSpatial
```shell
export `CUSPATIAL_HOME=$(pwd)/cuspatial` && \
git clone https://github.com/rapidsai/cuspatial.git $CUSPATIAL_HOME
```
### Install dependencies

1. export `CUSPATIAL_HOME=$(pwd)/cuspatial`
1. `export CUSPATIAL_HOME=$(pwd)/cuspatial`
2. clone the cuSpatial repo

```shell
git clone --recurse-submodules https://github.com/rapidsai/cuspatial.git $CUSPATIAL_HOME
```

3. Compile and install
```shell
conda env update --file conda/environments/cuspatial_dev_cuda11.5.yml
```

Similar to cuDF (version 0.20), simply run `build.sh` diectly under `$CUSPATIAL_HOME`.
### Build and install cuSpatial

Note that a "build" dir is created automatically under `$CUSPATIAL_HOME/cpp`.
1. Compile and install
```shell
cd $CUSPATIAL_HOME && \
chmod +x ./build.sh && \
./build.sh
```

4. Run C++/Python test code
2. Run C++/Python test code

Some tests using inline data can be run directly, e.g.:

Expand All @@ -74,15 +82,15 @@ environment created in step 3 is active.
python python/cuspatial/cuspatial/tests/test_pip.py
```

Some other tests involve I/O from data files under $CUSPATIAL_HOME/test_fixtures.
For example, $CUSPATIAL_HOME/cpp/build/gtests/SHAPEFILE_READER_TEST requires three
Some other tests involve I/O from data files under `$CUSPATIAL_HOME/test_fixtures`.
For example, `$CUSPATIAL_HOME/cpp/build/gtests/SHAPEFILE_READER_TEST` requires three
pre-generated polygon shapefiles that contain 0, 1 and 2 polygons, respectively. They are available at
$CUSPATIAL_HOME/test_fixtures/shapefiles <br>
`$CUSPATIAL_HOME/test_fixtures/shapefiles` <br>

**NOTE:** Currently, cuSpatial supports reading point/polyine/polygon data using
Structure of Array (SoA) format and a [shapefile reader](./cpp/src/io/shp)
to read polygon data from a shapefile.
Alternatively, python users can read any point/polyine/polygon data using
existing python packages, e.g., [Shapely](https://pypi.org/project/Shapely/)
and [Fiona](https://github.com/Toblerity/Fiona),to generate numpy arrays and feed them to
[cuSpatial python APIs](python/cuspatial/cuspatial).
[cuSpatial python APIs](https://docs.rapids.ai/api/cuspatial/stable/).
20 changes: 0 additions & 20 deletions conda/environments/cuspatial_dev_cuda11.1.yml

This file was deleted.

20 changes: 0 additions & 20 deletions conda/environments/cuspatial_dev_cuda11.2.yml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ dependencies:
- clang=11.1.0
- clang-tools=11.1.0
- cudf=22.12.*
- cudatoolkit=11.0
- cudatoolkit=11.5
- gdal>=3.0.2
- geopandas>=0.11.0
- cmake>=3.23.1
Expand Down