ianegordon / s2geometry

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

S2 Geometry Library

Overview

This is a package for manipulating geometric shapes. Unlike many geometry libraries, S2 is primarily designed to work with spherical geometry, i.e., shapes drawn on a sphere rather than on a planar 2D map. This makes it especially suitable for working with geographic data.

If you want to learn more about the library, start by reading the overview and quick start document, then read the introduction to the basic types

Requirements for End Users

On Ubuntu, all of these can be installed via apt-get:

sudo apt-get install cmake libgflags-dev libgoogle-glog-dev libgtest-dev openssl

Otherwise, you may need to install some from source.

On macOS, use MacPorts or Homebrew. For MacPorts: sudo port install cmake gflags google-glog openssl. Do not install gtest from MacPorts; instead download release 1.8.0, unpack, and run cmake with -DGTEST_ROOT=.../googletest-release-1.8.0/googletest.

Thorough testing has only been done on Ubuntu 14.04.3 and macOS 10.12.

Build and Install

mkdir s2-geometry-library
cd s2-geometry-library
tar zxvf $PATH_TO_DOWNLOADED_TGZ
mkdir build
cd build
cmake -DGTEST_ROOT=/usr/src/gtest ..  # Omit -DGTEST_ROOT to skip tests.
make
make test  # If GTEST_ROOT specified above.
sudo make install

Disclaimer

This is not an official Google product.

About

License:Apache License 2.0


Languages

Language:C++ 99.1%Language:CMake 0.5%Language:Python 0.3%Language:C 0.1%