All Projects → mapbox → spatial-algorithms

mapbox / spatial-algorithms

Licence: other
Spatial algorithms library for geometry.hpp

Programming Languages

C++
36643 projects - #6 most used programming language
CMake
9771 projects
shell
77523 projects
Makefile
30231 projects

Projects that are alternatives of or similar to spatial-algorithms

EsriRESTScraper
A Python class that scrapes ESRI Rest Endpoints and exports data to a geodatabase
Stars: ✭ 43 (+53.57%)
Mutual labels:  geometry
polliwog
2D and 3D computational geometry library
Stars: ✭ 22 (-21.43%)
Mutual labels:  geometry
geometry
Geometric primitives for Ruby
Stars: ✭ 46 (+64.29%)
Mutual labels:  geometry
variational-surface-cutting
Codebase for "Variational Surface Cutting" by Sharp & Crane, SIGGRAPH 2018
Stars: ✭ 64 (+128.57%)
Mutual labels:  geometry
geofeatures2
A lightweight, high performance geometry library in Swift.
Stars: ✭ 18 (-35.71%)
Mutual labels:  geometry
hydra-antlia
A collection of functions for Hydra
Stars: ✭ 45 (+60.71%)
Mutual labels:  geometry
classy blocks
Python classes for easier creation of OpenFOAM's blockMesh dictionaries.
Stars: ✭ 53 (+89.29%)
Mutual labels:  geometry
polygon-splitter
A small (<10kb minified) javascript library for splitting polygons by a polyline.
Stars: ✭ 20 (-28.57%)
Mutual labels:  geometry
ncdfgeom
NetCDF-CF Geometry and Timeseries Tools for R: https://code.usgs.gov/water/ncdfgeom
Stars: ✭ 13 (-53.57%)
Mutual labels:  geometry
cas
Cellular Automata Simulator
Stars: ✭ 22 (-21.43%)
Mutual labels:  geometry
dmc
Dual Marching Cubes Implementation in C++
Stars: ✭ 45 (+60.71%)
Mutual labels:  geometry
mikktspace-wasm
MikkTSpace vertex tangent calculation for JavaScript/TypeScript/Node.js, using Web Assembly.
Stars: ✭ 19 (-32.14%)
Mutual labels:  geometry
euclid
Vector math, geometry, reference frame, and shapes 2D & 3D
Stars: ✭ 22 (-21.43%)
Mutual labels:  geometry
martinez-src
Mirrored implementations of polygon clipping/CSG/operations algorithm, in C (original, by Martínez et al) and ActionScript3 (port, by Mahir Iqbal)
Stars: ✭ 34 (+21.43%)
Mutual labels:  geometry
laravel-geometry
SPINEN's Laravel wrapper over geoPHP
Stars: ✭ 36 (+28.57%)
Mutual labels:  geometry
batyr
Microservice for on-demand synchronization of geographical vector datasources to a PostgreSQL/PostGIS database. The service provides an HTTP API for easy integration into other applications.
Stars: ✭ 25 (-10.71%)
Mutual labels:  geometry
liang-barsky
Liang-Barsky line-clipping algorithm
Stars: ✭ 32 (+14.29%)
Mutual labels:  geometry
pcc geo cnn v2
Improved Deep Point Cloud Geometry Compression
Stars: ✭ 55 (+96.43%)
Mutual labels:  geometry
s2
R bindings for Google's s2 library for geometry on the sphere
Stars: ✭ 29 (+3.57%)
Mutual labels:  geometry
tinymesh
TinyMesh is a light-weight mesh processing library in C/C++.
Stars: ✭ 64 (+128.57%)
Mutual labels:  geometry

Spatial algorithms library for geometry.hpp

Build Status codecov hpp-skel

Building

Spatial algorithms can be built using cmake. Please make sure you have a cmake version >= 3.3.

Example build and test

mkdir build
cd build
cmake ..
make -j
./test_sa

The -Werror flag is enabled by default, which turns compiler warnings into errors. You can disable like: cmake -DWERROR=OFF ...

Example Useage

#include <mapbox/geometry/geometry.hpp>
#include <mapbox/geometry/algorithms/predicates.hpp>
#include <iostream>

int main ()
{
    using namespace mapbox::geometry;
    line_string<double> line{ {70,50},{50,70}};
    polygon<double> poly {{{{0,0}, {100,0}, {100,100}, {0, 100}, {0,0}}},
        {{{25,25}, {25,75}, {75,75}, {75, 25}, {25,25} }}};

    std::cerr <<  "Intersects? " << algorithms::intersects(line, poly) << std::endl;
    std::cerr <<  "Disjoint? " << algorithms::disjoint(line, poly) << std::endl;

    // It should work with variant based `mapbox::geometry::geometry<T>` and all permutations also.

    geometry<double> g = line;

    std::cerr <<  "Intersects? " << algorithms::intersects(g, poly) << std::endl;
    std::cerr <<  "Disjoint? " << algorithms::disjoint(poly, g) << std::endl;
    return 0;
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].