Package: s2 1.1.7

Edzer Pebesma

s2: Spherical Geometry Operators Using the S2 Geometry Library

Provides R bindings for Google's s2 library for geometric calculations on the sphere. High-performance constructors and exporters provide high compatibility with existing spatial packages, transformers construct new geometries from existing geometries, predicates provide a means to select geometries based on spatial relationships, and accessors extract information about geometries.

Authors:Dewey Dunnington [aut], Edzer Pebesma [aut, cre], Ege Rubak [aut], Jeroen Ooms [ctb], Google, Inc. [cph]

s2_1.1.7.tar.gz
s2_1.1.7.tar.gz(r-4.5-noble)s2_1.1.7.tar.gz(r-4.4-noble)
s2_1.1.7.tgz(r-4.4-emscripten)s2_1.1.7.tgz(r-4.3-emscripten)
s2.pdf |s2.html
s2/json (API)
NEWS

# Install 's2' in R:
install.packages('s2', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/r-spatial/s2/issues

Uses libs:
  • openssl– Secure Sockets Layer toolkit
  • c++– GNU Standard C++ Library v3
Datasets:

9.45 score 1.1k packages 194 scripts 290k downloads 133 exports 2 dependencies

Last updated 4 months agofrom:583fe3cb2e. Checks:OK: 1 NOTE: 1. Indexed: no.

TargetResultDate
Doc / VignettesOKNov 14 2024
R-4.5-linux-x86_64NOTENov 14 2024

Exports:as_s2_cellas_s2_cell_unionas_s2_geographyas_s2_lnglatas_s2_pointnew_s2_cells2_areas2_as_binarys2_as_texts2_boundarys2_bounds_caps2_bounds_rects2_buffer_cellss2_cells2_cell_areas2_cell_area_approxs2_cell_boundarys2_cell_centers2_cell_childs2_cell_common_ancestor_levels2_cell_common_ancestor_level_aggs2_cell_containss2_cell_debug_strings2_cell_distances2_cell_edge_neighbours2_cell_invalids2_cell_is_faces2_cell_is_leafs2_cell_is_valids2_cell_levels2_cell_max_distances2_cell_may_intersects2_cell_parents2_cell_polygons2_cell_sentinels2_cell_to_lnglats2_cell_unions2_cell_union_containss2_cell_union_differences2_cell_union_intersections2_cell_union_intersectss2_cell_union_normalizes2_cell_union_unions2_cell_vertexs2_centroids2_centroid_aggs2_closest_edgess2_closest_features2_closest_points2_containss2_contains_matrixs2_convex_hulls2_convex_hull_aggs2_coverage_union_aggs2_covered_bys2_covered_by_matrixs2_covering_cell_idss2_covering_cell_ids_aggs2_coverss2_covers_matrixs2_data_citiess2_data_countriess2_data_timezoness2_differences2_dimensions2_disjoints2_disjoint_matrixs2_distances2_distance_matrixs2_dwithins2_dwithin_matrixs2_earth_radius_meterss2_equalss2_equals_matrixs2_farthest_features2_geog_from_texts2_geog_from_wkbs2_geog_points2_geographys2_geography_writers2_hemispheres2_interpolates2_interpolate_normalizeds2_intersections2_intersectss2_intersects_boxs2_intersects_matrixs2_is_collections2_is_emptys2_is_valids2_is_valid_details2_lengths2_lnglats2_make_lines2_make_polygons2_max_distances2_max_distance_matrixs2_may_intersect_matrixs2_minimum_clearance_line_betweens2_num_pointss2_optionss2_perimeters2_plots2_points2_point_crss2_point_on_surfaces2_prepared_dwithins2_projects2_project_normalizeds2_projection_mercators2_projection_orthographics2_projection_plate_carrees2_rebuilds2_rebuild_aggs2_simplifys2_snap_distances2_snap_identitys2_snap_levels2_snap_precisions2_snap_to_grids2_sym_differences2_tessellate_tol_defaults2_touchess2_touches_matrixs2_trans_lnglats2_trans_points2_unions2_union_aggs2_withins2_within_matrixs2_world_plate_carrees2_xs2_y

Dependencies:Rcppwk

Readme and manuals

Help Manual

Help pageTopics
Create an S2 Geography Vectoras_s2_geography as_s2_geography.blob as_s2_geography.character as_s2_geography.logical as_s2_geography.s2_geography as_s2_geography.WKB as_s2_geography.wk_wkb as_s2_geography.wk_wkt as_s2_geography.wk_xy as_wkb.s2_geography as_wkt.s2_geography s2_geography
S2 Geography Transformationss2_boundary s2_buffer_cells s2_centroid s2_centroid_agg s2_closest_point s2_convex_hull s2_convex_hull_agg s2_coverage_union_agg s2_difference s2_intersection s2_minimum_clearance_line_between s2_point_on_surface s2_rebuild s2_rebuild_agg s2_simplify s2_snap_to_grid s2_sym_difference s2_union s2_union_agg
Compute feature-wise and aggregate boundss2_bounds_cap s2_bounds_rect
Create S2 Cell vectorsas_s2_cell as_s2_cell.character as_s2_cell.integer64 as_s2_cell.s2_cell as_s2_cell.s2_geography as_s2_cell.wk_xy new_s2_cell s2_cell s2_cell_invalid s2_cell_sentinel
S2 cell operatorss2_cell_area s2_cell_area_approx s2_cell_boundary s2_cell_center s2_cell_child s2_cell_common_ancestor_level s2_cell_common_ancestor_level_agg s2_cell_contains s2_cell_debug_string s2_cell_distance s2_cell_edge_neighbour s2_cell_is_face s2_cell_is_leaf s2_cell_is_valid s2_cell_level s2_cell_max_distance s2_cell_may_intersect s2_cell_parent s2_cell_polygon s2_cell_to_lnglat s2_cell_vertex
Create S2 Cell Union vectorsas_s2_cell_union as_s2_cell_union.character as_s2_cell_union.s2_cell as_s2_cell_union.s2_cell_union as_s2_geography.s2_cell_union s2_cell_union
S2 cell union operatorss2_cell_union_contains s2_cell_union_difference s2_cell_union_intersection s2_cell_union_intersects s2_cell_union_normalize s2_cell_union_union s2_covering_cell_ids s2_covering_cell_ids_agg
Matrix Functionss2_closest_edges s2_closest_feature s2_contains_matrix s2_covered_by_matrix s2_covers_matrix s2_disjoint_matrix s2_distance_matrix s2_dwithin_matrix s2_equals_matrix s2_farthest_feature s2_intersects_matrix s2_max_distance_matrix s2_may_intersect_matrix s2_touches_matrix s2_within_matrix
S2 Geography Predicatess2_contains s2_covered_by s2_covers s2_disjoint s2_dwithin s2_equals s2_intersects s2_intersects_box s2_prepared_dwithin s2_touches s2_within
Example Geometriess2_data_example_wkt
Low-resolution world boundaries, timezones, and citiess2_data_cities s2_data_countries s2_data_tbl_cities s2_data_tbl_countries s2_data_tbl_timezones s2_data_timezones
Earth Constantss2_earth_radius_meters
Create and Format Geography Vectorss2_as_binary s2_as_text s2_geog_from_text s2_geog_from_wkb s2_geog_point s2_make_line s2_make_polygon s2_tessellate_tol_default
S2 Geography Accessorss2_area s2_dimension s2_distance s2_is_collection s2_is_empty s2_is_valid s2_is_valid_detail s2_length s2_max_distance s2_num_points s2_perimeter s2_x s2_y
Create an S2 LngLat Vectoras_s2_lnglat as_s2_lnglat.default as_s2_lnglat.wk_xy as_s2_lnglat.wk_xyz s2_lnglat
Geography Operation Optionss2_options s2_snap_distance s2_snap_identity s2_snap_level s2_snap_precision
Plot S2 Geographiess2_plot
Create an S2 Point Vectoras_s2_point as_s2_point.default as_s2_point.wk_xy as_s2_point.wk_xyz s2_point s2_point_crs
Linear referencings2_interpolate s2_interpolate_normalized s2_project s2_project_normalized
Low-level wk filters and handlerss2_geography_writer s2_hemisphere s2_projection_mercator s2_projection_orthographic s2_projection_plate_carree s2_trans_lnglat s2_trans_point s2_world_plate_carree wk_handle.s2_geography wk_writer.s2_geography