Skip to content

Remote Sensing and GIS Software Library; python module tools for processing spatial data.

License

Notifications You must be signed in to change notification settings

remotesensinginfo/rsgislib

Repository files navigation

RSGISLib

<remotesensinginfo> codecov Bugs Install Downloads Platforms DOI

The Remote Sensing and GIS software library (RSGISLib) is a collection of tools for processing remote sensing and GIS datasets. For more details see the project website: http://rsgislib.org/

Support the Project

We provide updated and support for the project for free as a open source project but if you'd like to support us you can buy a coffee - thank you! :) "Buy Me A Coffee"

Installing

Instructions on installing RSGISLib:

conda install -c conda-forge rsgislib

If you want to install a system of packages for undertaking remote sensing and GIS data analysis in python then the following packages are what I install as a base environment:

conda install -c conda-forge rsgislib gdal libgdal-arrow-parquet libgdal-fits libgdal-grib libgdal-hdf4 libgdal-hdf5 libgdal-jp2openjpeg libgdal-pg libgdal-kea libgdal-netcdf proj-data geos gsl kealib xerces-c muparser boost-cpp rios scikit-learn scikit-image imbalanced-learn scikit-plot scikit-fuzzy bayesian-optimization optuna matplotlib pandas geopandas statsmodels h5py scipy rasterio shapely networkx sqlalchemy pycurl xgboost catboost lightgbm numba pip sphinx elevation rtree tqdm jinja2 keras parallel bokeh pygal jupyterlab psutil pysal libpysal esda pyyaml netcdf4 xarray rasterstats fiona plotly python-kaleido pyod psycopg2 contextily cvxopt feather-format openpyxl SALib xlsxwriter black jupyterlab_code_formatter ruff flake8 pylint isort autopep8 pytest pytest-html coverage pytest-cov requests imageio Pillow pyyaml exiftool scikit-gstat tuiview

I have sometimes found that packages can clash between the default conda channel and conda-forge so I would recommend removing default from your configuration and just using conda-forge.

I also install the following packages using pip, which are not available via conda:

pip install gsutil alphashape pysptools matplotlib-scalebar pysondb BorutaShap PyMuPDF mpl-scatter-density OWSLib mpl_scatter_density tabulate pyMCR pyexiftool azure-storage-blob azure-identity 

Documentation and Support

The documentation for RSGISLib is available from the project website: http://rsgislib.org/

Support for RSGISLib is provided through a mailing list: https://groups.google.com/forum/#!forum/rsgislib-support

You need to be a member of the group to post. Please check through existing posts to see if there is already an answer to your question before emailing. To help us answer your question provide as much information as possible (RSGISLib version and how you installed it, OS, things you have already tried to solve the problem etc.,).

We occasionally post tutorials on RSGISLib and other useful bits and pieces to our website remotesensing.info.

Citing

If you use RSGISLib as part of published work please cite the following publication:

Peter Bunting, Daniel Clewley, Richard M. Lucas and Sam Gillingham. 2014. The Remote Sensing and GIS Software Library (RSGISLib), Computers & Geosciences. Volume 62, Pages 216-226 http://dx.doi.org/10.1016/j.cageo.2013.08.007. pre-print

    @article{Bunting_etal_2014,
    	Author = {Bunting, Peter and Clewley, Daniel and Lucas, Richard M and Gillingham, Sam},
    	Title = {{The Remote Sensing and GIS Software Library (RSGISLib)}},
    	Journal = {Computers and Geosciences},
    	Pages = {216--226},
    	Volume = {62},
    	Year = {2014}}

Building from Source

RSGISLib uses cmake for the build system, so you will need that and the dependencies installed on your system.

# Create a build directory in the release directory
mkdir build_dir
cd build_dir

# if all the dependencies are within the same path (e.g., installed with conda)
# then use a variable to specify the path.
export DEPEND_ENV_PATH=/home/user/miniconda/envs/rsgislib_v5_dev

# Set the install location and path to dependencies
cmake -D CMAKE_INSTALL_PREFIX=/usr/local \
-D BOOST_INCLUDE_DIR=$DEPEND_ENV_PATH/include \
-D BOOST_LIB_PATH=$DEPEND_ENV_PATH/lib \
-D GDAL_INCLUDE_DIR=$DEPEND_ENV_PATH/include \
-D GDAL_LIB_PATH=$DEPEND_ENV_PATH/lib \
-D HDF5_INCLUDE_DIR=$DEPEND_ENV_PATH/include \
-D HDF5_LIB_PATH=$DEPEND_ENV_PATH/lib \
-D GSL_INCLUDE_DIR=$DEPEND_ENV_PATH/include \
-D GSL_LIB_PATH=$DEPEND_ENV_PATH/lib \
-D MUPARSER_INCLUDE_DIR=$DEPEND_ENV_PATH/include \
-D MUPARSER_LIB_PATH=$DEPEND_ENV_PATH/lib \
-D KEA_INCLUDE_DIR=$DEPEND_ENV_PATH/include \
-D KEA_LIB_PATH=$DEPEND_ENV_PATH/lib \
-D Python_EXECUTABLE=$DEPEND_ENV_PATH/bin/python \
-D CMAKE_VERBOSE_MAKEFILE=ON \
-D CMAKE_BUILD_TYPE=Debug \
-D CMAKE_SKIP_RPATH=ON \
..
  
# build rsgislib -j N is the number of cores to use for build 
make -j 2
  
# Install the build into the install prefix.
make install

SonarCloud