s2geometry/0.11.1

Computational geometry and spatial indexing on the sphere
Recipe info
2024-03-05

Available packages
Linux
Windows
macOS
macOS Apple Silicon

Install
Add the following line to your conanfile.txt:
[requires]
s2geometry/0.11.1

Using s2geometry

Note

If you are a new Conan user, we recommend reading the how to consume packages tutorial.

If you need additional assistance, please ask a question in the Conan Center Index repository.

Simplest use case consuming this recipe and assuming CMake as your local build tool:

[requires]
s2geometry/0.11.1
[generators]
CMakeDeps
CMakeToolchain
[layout]
cmake_layout
from conan import ConanFile
from conan.tools.cmake import cmake_layout


class ExampleRecipe(ConanFile):
    settings = "os", "compiler", "build_type", "arch"
    generators = "CMakeDeps", "CMakeToolchain"

    def requirements(self):
        self.requires("s2geometry/0.11.1")

    def layout(self):
        cmake_layout(self)

Now, you can run this Conan command to locally install (and build if necessary) this recipe and its dependencies (if any):

$ conan install conanfile.txt --build=missing

Useful information to take into account to consume this library:


These are the main declared targets:

  • CMake package name(s): s2
  • CMake target name(s): s2::s2
  • pkg-config file name(s): s2geometry.pc

A simple use case using the CMake file name and the global target:

# ...
find_package(s2 REQUIRED)
# ...
target_link_libraries(YOUR_TARGET s2::s2)

These are all the available headers. Some of these ones might be non-public; make sure of it by visiting the s2geometry homepage listed above:

#include "s2/_fp_contract_off.h"
#include "s2/base/casts.h"
#include "s2/base/commandlineflags.h"
#include "s2/base/commandlineflags_declare.h"
#include "s2/base/integral_types.h"
#include "s2/base/log_severity.h"
#include "s2/base/logging.h"
#include "s2/base/port.h"
#include "s2/base/spinlock.h"
#include "s2/encoded_s2cell_id_vector.h"
#include "s2/encoded_s2point_vector.h"
#include "s2/encoded_s2shape_index.h"
#include "s2/encoded_string_vector.h"
#include "s2/encoded_uint_vector.h"
#include "s2/id_set_lexicon.h"
#include "s2/mutable_s2shape_index.h"
#include "s2/r1interval.h"
#include "s2/r2.h"
#include "s2/r2rect.h"
#include "s2/s1angle.h"
#include "s2/s1chord_angle.h"
#include "s2/s1interval.h"
#include "s2/s2boolean_operation.h"
#include "s2/s2buffer_operation.h"
#include "s2/s2builder.h"
#include "s2/s2builder_graph.h"
#include "s2/s2builder_layer.h"
#include "s2/s2builderutil_closed_set_normalizer.h"
#include "s2/s2builderutil_find_polygon_degeneracies.h"
#include "s2/s2builderutil_get_snapped_winding_delta.h"
#include "s2/s2builderutil_graph_shape.h"
#include "s2/s2builderutil_lax_polygon_layer.h"
#include "s2/s2builderutil_lax_polyline_layer.h"
#include "s2/s2builderutil_s2point_vector_layer.h"
#include "s2/s2builderutil_s2polygon_layer.h"
#include "s2/s2builderutil_s2polyline_layer.h"
#include "s2/s2builderutil_s2polyline_vector_layer.h"
#include "s2/s2builderutil_snap_functions.h"
#include "s2/s2builderutil_testing.h"
#include "s2/s2cap.h"
#include "s2/s2cell.h"
#include "s2/s2cell_id.h"
#include "s2/s2cell_index.h"
#include "s2/s2cell_iterator.h"
#include "s2/s2cell_iterator_join.h"
#include "s2/s2cell_range_iterator.h"
#include "s2/s2cell_union.h"
#include "s2/s2centroids.h"
#include "s2/s2closest_cell_query.h"
#include "s2/s2closest_cell_query_base.h"
#include "s2/s2closest_edge_query.h"
#include "s2/s2closest_edge_query_base.h"
#include "s2/s2closest_point_query.h"
#include "s2/s2closest_point_query_base.h"
#include "s2/s2coder.h"
#include "s2/s2contains_point_query.h"
#include "s2/s2contains_vertex_query.h"
#include "s2/s2convex_hull_query.h"
#include "s2/s2coords.h"
#include "s2/s2coords_internal.h"
#include "s2/s2crossing_edge_query.h"
#include "s2/s2debug.h"
#include "s2/s2distance_target.h"
#include "s2/s2earth.h"
#include "s2/s2edge_clipping.h"
#include "s2/s2edge_crosser.h"
#include "s2/s2edge_crossings.h"
#include "s2/s2edge_crossings_internal.h"
#include "s2/s2edge_distances.h"
#include "s2/s2edge_tessellator.h"
#include "s2/s2edge_vector_shape.h"
#include "s2/s2error.h"
#include "s2/s2furthest_edge_query.h"
#include "s2/s2hausdorff_distance_query.h"
#include "s2/s2latlng.h"
#include "s2/s2latlng_rect.h"
#include "s2/s2latlng_rect_bounder.h"
#include "s2/s2lax_loop_shape.h"
#include "s2/s2lax_polygon_shape.h"
#include "s2/s2lax_polyline_shape.h"
#include "s2/s2loop.h"
#include "s2/s2loop_measures.h"
#include "s2/s2max_distance_targets.h"
#include "s2/s2measures.h"
#include "s2/s2memory_tracker.h"
#include "s2/s2metrics.h"
#include "s2/s2min_distance_targets.h"
#include "s2/s2padded_cell.h"
#include "s2/s2point.h"
#include "s2/s2point_compression.h"
#include "s2/s2point_index.h"
#include "s2/s2point_region.h"
#include "s2/s2point_span.h"
#include "s2/s2point_vector_shape.h"
#include "s2/s2pointutil.h"
#include "s2/s2polygon.h"
#include "s2/s2polyline.h"
#include "s2/s2polyline_alignment.h"
#include "s2/s2polyline_measures.h"
#include "s2/s2polyline_simplifier.h"
#include "s2/s2predicates.h"
#include "s2/s2predicates_internal.h"
#include "s2/s2projections.h"
#include "s2/s2r2rect.h"
#include "s2/s2region.h"
#include "s2/s2region_coverer.h"
#include "s2/s2region_intersection.h"
#include "s2/s2region_term_indexer.h"
#include "s2/s2region_union.h"
#include "s2/s2shape.h"
#include "s2/s2shape_index.h"
#include "s2/s2shape_index_buffered_region.h"
#include "s2/s2shape_index_region.h"
#include "s2/s2shape_measures.h"
#include "s2/s2shape_nesting_query.h"
#include "s2/s2shapeutil_build_polygon_boundaries.h"
#include "s2/s2shapeutil_coding.h"
#include "s2/s2shapeutil_contains_brute_force.h"
#include "s2/s2shapeutil_conversion.h"
#include "s2/s2shapeutil_count_edges.h"
#include "s2/s2shapeutil_edge_iterator.h"
#include "s2/s2shapeutil_get_reference_point.h"
#include "s2/s2shapeutil_shape_edge.h"
#include "s2/s2shapeutil_shape_edge_id.h"
#include "s2/s2shapeutil_testing.h"
#include "s2/s2shapeutil_visit_crossing_edge_pairs.h"
#include "s2/s2testing.h"
#include "s2/s2text_format.h"
#include "s2/s2wedge_relations.h"
#include "s2/s2winding_operation.h"
#include "s2/s2wrapped_shape.h"
#include "s2/sequence_lexicon.h"
#include "s2/testing/gtest_prod.h"
#include "s2/thread_testing.h"
#include "s2/util/bitmap/bitmap.h"
#include "s2/util/bits/bits.h"
#include "s2/util/coding/coder.h"
#include "s2/util/coding/varint.h"
#include "s2/util/endian/endian.h"
#include "s2/util/gtl/compact_array.h"
#include "s2/util/gtl/container_logging.h"
#include "s2/util/gtl/dense_hash_set.h"
#include "s2/util/gtl/densehashtable.h"
#include "s2/util/gtl/hashtable_common.h"
#include "s2/util/hash/mix.h"
#include "s2/util/math/exactfloat/exactfloat.h"
#include "s2/util/math/mathutil.h"
#include "s2/util/math/matrix3x3.h"
#include "s2/util/math/vector.h"
#include "s2/util/units/length-units.h"
#include "s2/util/units/physical-units.h"
#include "s2/value_lexicon.h"