https://github.com/chrberger/geofence
A small and efficient single-file, header-only library written in modern C++ library to test whether a coordinate is inside a polygon to realize, for instance, WGS84 geofencing.
https://github.com/chrberger/geofence
coordinate coordinates cpp11 cpp14 cpp17 geofence geofences geofencing header-only platform-independent single-file wgs84
Last synced: 7 months ago
JSON representation
A small and efficient single-file, header-only library written in modern C++ library to test whether a coordinate is inside a polygon to realize, for instance, WGS84 geofencing.
- Host: GitHub
- URL: https://github.com/chrberger/geofence
- Owner: chrberger
- License: mit
- Created: 2020-05-08T18:15:01.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-05-10T11:27:00.000Z (over 5 years ago)
- Last Synced: 2025-02-28T12:55:45.085Z (7 months ago)
- Topics: coordinate, coordinates, cpp11, cpp14, cpp17, geofence, geofences, geofencing, header-only, platform-independent, single-file, wgs84
- Language: C++
- Homepage:
- Size: 249 KB
- Stars: 15
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# geofence
 [](https://travis-ci.org/chrberger/geofence) [](https://opensource.org/licenses/MIT)
geofence is a small and efficient library written in modern C++ library to test whether a coordinate is inside a polygon to realize, for instance, WGS84 geofencing.
geofence is available as single-file, header-only library - just drop geofence.hpp into your project, #include "geofence.hpp", and compile your project with a modern C++ compiler (C++11 or newer).
This library is partially based on the [work](https://wrf.ecse.rpi.edu/Research/Short_Notes/pnpoly.html) from W. Randolph Franklin released under MIT license.
## Table of Contents
* [Features](#features)
* [Dependencies](#dependencies)
* [Contributing](#contributing)
* [License](#license)## Features
* Written in highly portable and high quality C++11
* **Available as header-only, single-file distribution - just drop [geofence.hpp](https://raw.githubusercontent.com/chrberger/geofence/master/geofence.hpp) into your project, `#include "geofence.hpp"`, and compile your project with a modern C++ compiler (C++11 or newer)**
* The polygon and position are passed to the functions as [`std::array`](http://en.cppreference.com/w/cpp/container/array) so that this library integrates well with other math libraries (e.g., Eigen).## Dependencies
No dependencies! All you need is a C++11-compliant compiler as the project ships the following dependencies as part of the source distribution:* [Unit Test Framework Catch2](https://github.com/catchorg/Catch2/releases/tag/v2.12.1) - [](http://www.boost.org/LICENSE_1_0.txt) - [Source](https://github.com/chrberger/stringtoolbox/blob/master/test/catch.hpp)
## Installation
### Installation as single-file, header-only library
WGS84toCartesian is provided as header-only, single-file library as well - just drop [WGS84toCartesian.hpp](https://raw.githubusercontent.com/chrberger/WGS84toCartesian/master/WGS84toCartesian.hpp) into your project, `#include "WGS84toCartesian.hpp"`, and compile your project with a modern C++ compiler (C++11 or newer)## Projects using geofence
If your project is using geofence, just let us know :-)## Contributing
We are happy to receive your PRs to accelerate libcluon's development; before contributing, please take a look at the [Contribution Documents](CONTRIBUTING.md).## License
* This project is released under the terms of the MIT License - [](https://opensource.org/licenses/MIT)