[package]
edition = "2024"
rust-version = "1.88"
name = "s2rst"
version = "0.4.0"
authors = ["Torgeir Børresen <tb@starkad.no>"]
build = false
exclude = [
"tests/data/",
"benches/baselines/",
".cargo/",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "A Rust port of Google's S2 spherical geometry library — points, regions, shapes, and a hierarchical cell index on the sphere."
homepage = "https://github.com/torgebo/s2rst"
documentation = "https://docs.rs/s2rst"
readme = "README.md"
keywords = [
"geometry",
"s2",
"spherical",
"geospatial",
"spatial-index",
]
categories = [
"science::geo",
"mathematics",
"algorithms",
]
license = "Apache-2.0"
repository = "https://github.com/torgebo/s2rst"
[package.metadata.docs.rs]
all-features = true
[features]
geo-types = ["dep:geo-types"]
serde = [
"dep:serde",
"num-bigint/serde",
]
[lib]
name = "s2rst"
path = "src/lib.rs"
bench = false
[[example]]
name = "boolean_operations"
path = "examples/boolean_operations.rs"
[[example]]
name = "buffer_operation"
path = "examples/buffer_operation.rs"
[[example]]
name = "cell_hierarchy"
path = "examples/cell_hierarchy.rs"
[[example]]
name = "city_distances"
path = "examples/city_distances.rs"
[[example]]
name = "convex_hull"
path = "examples/convex_hull.rs"
[[example]]
name = "edge_queries"
path = "examples/edge_queries.rs"
[[example]]
name = "encoding_decoding"
path = "examples/encoding_decoding.rs"
[[example]]
name = "geofencing"
path = "examples/geofencing.rs"
[[example]]
name = "polygon_from_oriented_loops"
path = "examples/polygon_from_oriented_loops.rs"
[[example]]
name = "rect_distance"
path = "examples/rect_distance.rs"
[[example]]
name = "region_covering"
path = "examples/region_covering.rs"
[[example]]
name = "spatial_index"
path = "examples/spatial_index.rs"
[[example]]
name = "text_format"
path = "examples/text_format.rs"
[[test]]
name = "builder_integration"
path = "tests/builder_integration.rs"
[[test]]
name = "cell_clipping"
path = "tests/cell_clipping.rs"
[[test]]
name = "cell_hierarchy"
path = "tests/cell_hierarchy.rs"
[[test]]
name = "cpp_boolean_op_diff"
path = "tests/cpp_boolean_op_diff.rs"
[[test]]
name = "cpp_cellid_diff"
path = "tests/cpp_cellid_diff.rs"
[[test]]
name = "cpp_cross_validation"
path = "tests/cpp_cross_validation.rs"
[[test]]
name = "decoder_robustness"
path = "tests/decoder_robustness.rs"
[[test]]
name = "go_cross_validation"
path = "tests/go_cross_validation.rs"
[[test]]
name = "loop_geometry"
path = "tests/loop_geometry.rs"
[[test]]
name = "polygon_operations"
path = "tests/polygon_operations.rs"
[[test]]
name = "property_tests"
path = "tests/property_tests.rs"
[[test]]
name = "rect_and_cap"
path = "tests/rect_and_cap.rs"
[[test]]
name = "region_covering"
path = "tests/region_covering.rs"
[[test]]
name = "send_sync"
path = "tests/send_sync.rs"
[[test]]
name = "shape_index_queries"
path = "tests/shape_index_queries.rs"
[[bench]]
name = "boolean_operation"
path = "benches/boolean_operation.rs"
harness = false
[[bench]]
name = "buffer_operation"
path = "benches/buffer_operation.rs"
harness = false
[[bench]]
name = "builder"
path = "benches/builder.rs"
harness = false
[[bench]]
name = "builder_advanced"
path = "benches/builder_advanced.rs"
harness = false
[[bench]]
name = "cap"
path = "benches/cap.rs"
harness = false
[[bench]]
name = "cell"
path = "benches/cell.rs"
harness = false
[[bench]]
name = "cell_id"
path = "benches/cell_id.rs"
harness = false
[[bench]]
name = "cell_index"
path = "benches/cell_index.rs"
harness = false
[[bench]]
name = "cell_iterator_join"
path = "benches/cell_iterator_join.rs"
harness = false
[[bench]]
name = "cell_union"
path = "benches/cell_union.rs"
harness = false
[[bench]]
name = "closest_cell_query"
path = "benches/closest_cell_query.rs"
harness = false
[[bench]]
name = "closest_edge_query"
path = "benches/closest_edge_query.rs"
harness = false
[[bench]]
name = "closest_point_query"
path = "benches/closest_point_query.rs"
harness = false
[[bench]]
name = "contains_point_query"
path = "benches/contains_point_query.rs"
harness = false
[[bench]]
name = "convex_hull"
path = "benches/convex_hull.rs"
harness = false
[[bench]]
name = "coords"
path = "benches/coords.rs"
harness = false
[[bench]]
name = "density_tree"
path = "benches/density_tree.rs"
harness = false
[[bench]]
name = "edge_clipping"
path = "benches/edge_clipping.rs"
harness = false
[[bench]]
name = "edge_crossing"
path = "benches/edge_crossing.rs"
harness = false
[[bench]]
name = "edge_distances"
path = "benches/edge_distances.rs"
harness = false
[[bench]]
name = "encoded_uint_vector"
path = "benches/encoded_uint_vector.rs"
harness = false
[[bench]]
name = "encoding"
path = "benches/encoding.rs"
harness = false
[[bench]]
name = "furthest_edge_query"
path = "benches/furthest_edge_query.rs"
harness = false
[[bench]]
name = "hausdorff_distance"
path = "benches/hausdorff_distance.rs"
harness = false
[[bench]]
name = "latlng"
path = "benches/latlng.rs"
harness = false
[[bench]]
name = "latlng_rect_bounder"
path = "benches/latlng_rect_bounder.rs"
harness = false
[[bench]]
name = "loop_operations"
path = "benches/loop_operations.rs"
harness = false
[[bench]]
name = "loop_polygon"
path = "benches/loop_polygon.rs"
harness = false
[[bench]]
name = "point_angle"
path = "benches/point_angle.rs"
harness = false
[[bench]]
name = "point_compression"
path = "benches/point_compression.rs"
harness = false
[[bench]]
name = "point_measures"
path = "benches/point_measures.rs"
harness = false
[[bench]]
name = "polygon"
path = "benches/polygon.rs"
harness = false
[[bench]]
name = "polyline"
path = "benches/polyline.rs"
harness = false
[[bench]]
name = "polyline_alignment"
path = "benches/polyline_alignment.rs"
harness = false
[[bench]]
name = "predicates"
path = "benches/predicates.rs"
harness = false
[[bench]]
name = "r2_edge_clipper"
path = "benches/r2_edge_clipper.rs"
harness = false
[[bench]]
name = "region_coverer"
path = "benches/region_coverer.rs"
harness = false
[[bench]]
name = "robust_cell_clipper"
path = "benches/robust_cell_clipper.rs"
harness = false
[[bench]]
name = "sequence_lexicon"
path = "benches/sequence_lexicon.rs"
harness = false
[[bench]]
name = "shape_index"
path = "benches/shape_index.rs"
harness = false
[[bench]]
name = "shape_index_region"
path = "benches/shape_index_region.rs"
harness = false
[[bench]]
name = "shape_nesting_query"
path = "benches/shape_nesting_query.rs"
harness = false
[[bench]]
name = "shape_tracker"
path = "benches/shape_tracker.rs"
harness = false
[[bench]]
name = "uv_edge_clipper"
path = "benches/uv_edge_clipper.rs"
harness = false
[[bench]]
name = "validation_query"
path = "benches/validation_query.rs"
harness = false
[[bench]]
name = "value_lexicon"
path = "benches/value_lexicon.rs"
harness = false
[[bench]]
name = "wall_edge_crossing"
path = "benches/wall/edge_crossing.rs"
harness = false
[[bench]]
name = "wall_point_angle"
path = "benches/wall/point_angle.rs"
harness = false
[[bench]]
name = "wall_polyline"
path = "benches/wall/polyline.rs"
harness = false
[[bench]]
name = "wall_predicates"
path = "benches/wall/predicates.rs"
harness = false
[[bench]]
name = "wall_shape_index"
path = "benches/wall/shape_index.rs"
harness = false
[[bench]]
name = "winding_operation"
path = "benches/winding_operation.rs"
harness = false
[dependencies.geo-types]
version = "0.7"
optional = true
[dependencies.num-bigint]
version = "0.4"
features = []
[dependencies.num-traits]
version = "0.2"
[dependencies.serde]
version = "1.0"
features = ["derive"]
optional = true
[dev-dependencies.criterion]
version = "0.5"
features = [
"plotters",
"cargo_bench_support",
]
default-features = false
[dev-dependencies.iai-callgrind]
version = "0.16.1"
[dev-dependencies.quickcheck]
version = "1.0.3"
[dev-dependencies.quickcheck_macros]
version = "1.1.0"
[dev-dependencies.rand]
version = "0.8"
features = ["small_rng"]
[dev-dependencies.rand_chacha]
version = "0.3"
[dev-dependencies.serde_json]
version = "1.0"
[lints.clippy]
allow_attributes = "warn"
allow_attributes_without_reason = "warn"
as_underscore = "warn"
bool_to_int_with_if = "allow"
cast_lossless = "allow"
cast_possible_truncation = "allow"
cast_possible_wrap = "allow"
cast_precision_loss = "allow"
cast_sign_loss = "allow"
clone_on_ref_ptr = "warn"
create_dir = "warn"
dbg_macro = "warn"
doc_markdown = "warn"
excessive_precision = "allow"
exit = "warn"
float_cmp = "allow"
items_after_statements = "allow"
iter_not_returning_iterator = "allow"
many_single_char_names = "allow"
missing_errors_doc = "warn"
missing_fields_in_debug = "allow"
missing_panics_doc = "warn"
missing_safety_doc = "warn"
module_name_repetitions = "allow"
multiple_unsafe_ops_per_block = "warn"
must_use_candidate = "allow"
needless_pass_by_value = "allow"
print_stderr = "warn"
print_stdout = "warn"
ptr_as_ptr = "warn"
return_self_not_must_use = "allow"
similar_names = "allow"
struct_field_names = "allow"
too_many_arguments = "allow"
too_many_lines = "allow"
type_complexity = "allow"
undocumented_unsafe_blocks = "warn"
unnecessary_wraps = "allow"
unreadable_literal = "allow"
unused_result_ok = "warn"
wildcard_enum_match_arm = "warn"
[lints.clippy.correctness]
level = "deny"
priority = -1
[lints.clippy.pedantic]
level = "warn"
priority = -1
[lints.clippy.perf]
level = "warn"
priority = -1
[lints.rust]
let_underscore_drop = "warn"
missing_debug_implementations = "warn"
missing_docs = "warn"
non_ascii_idents = "warn"
single_use_lifetimes = "warn"
trivial_casts = "warn"
trivial_numeric_casts = "warn"
unreachable_pub = "warn"
unsafe_code = "forbid"
unsafe_op_in_unsafe_fn = "warn"
unused_import_braces = "warn"
unused_qualifications = "warn"
[lints.rust.future_incompatible]
level = "warn"
priority = -1
[lints.rust.rust_2018_compatibility]
level = "warn"
priority = -1
[lints.rust.rust_2021_compatibility]
level = "warn"
priority = -1
[lints.rust.rust_2024_compatibility]
level = "warn"
priority = -1