Skip to content

Commit

Permalink
merge main
Browse files Browse the repository at this point in the history
Merge commit '90fa1280a77c53cb81d71ae51642c2504c7b670e'

Conflicts:
	man/s2_boundary.Rd
  • Loading branch information
paleolimbot committed Jan 25, 2022
2 parents b1902fb + 90fa128 commit 7569004
Show file tree
Hide file tree
Showing 21 changed files with 1,452 additions and 15 deletions.
25 changes: 25 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,27 @@ S3method(Math,s2_cell)
S3method(Ops,s2_cell)
S3method(Summary,s2_cell)
S3method(as.character,s2_cell)
S3method(as.character,s2_cell_union)
S3method(as.character,s2_geography)
S3method(as.data.frame,s2_lnglat)
S3method(as.data.frame,s2_point)
S3method(as.data.frame,s2_xptr)
S3method(as.list,s2_cell)
S3method(as.matrix,s2_lnglat)
S3method(as.matrix,s2_point)
S3method(as_s2_cell,character)
S3method(as_s2_cell,s2_cell)
S3method(as_s2_cell,s2_geography)
S3method(as_s2_cell,s2_lnglat)
S3method(as_s2_cell,s2_point)
S3method(as_s2_cell_union,character)
S3method(as_s2_cell_union,s2_cell)
S3method(as_s2_cell_union,s2_cell_union)
S3method(as_s2_geography,WKB)
S3method(as_s2_geography,blob)
S3method(as_s2_geography,character)
S3method(as_s2_geography,logical)
S3method(as_s2_geography,s2_cell_union)
S3method(as_s2_geography,s2_geography)
S3method(as_s2_geography,s2_lnglat)
S3method(as_s2_geography,s2_point)
Expand All @@ -51,18 +57,24 @@ S3method(as_wkt,s2_geography)
S3method(as_wkt,s2_lnglat)
S3method(c,s2_xptr)
S3method(format,s2_cell)
S3method(format,s2_cell_union)
S3method(format,s2_geography)
S3method(format,s2_lnglat)
S3method(format,s2_point)
S3method(is.na,s2_cell)
S3method(is.na,s2_cell_union)
S3method(is.numeric,s2_cell)
S3method(print,s2_cell_union)
S3method(print,s2_xptr)
S3method(rep,s2_xptr)
S3method(rep_len,s2_xptr)
S3method(sort,s2_cell)
S3method(str,s2_cell_union)
S3method(str,s2_xptr)
S3method(unique,s2_cell)
S3method(unlist,s2_cell_union)
export(as_s2_cell)
export(as_s2_cell_union)
export(as_s2_geography)
export(as_s2_lnglat)
export(as_s2_point)
Expand All @@ -80,6 +92,8 @@ export(s2_cell_area_approx)
export(s2_cell_boundary)
export(s2_cell_center)
export(s2_cell_child)
export(s2_cell_common_ancestor_level)
export(s2_cell_common_ancestor_level_agg)
export(s2_cell_contains)
export(s2_cell_debug_string)
export(s2_cell_distance)
Expand All @@ -95,6 +109,13 @@ export(s2_cell_parent)
export(s2_cell_polygon)
export(s2_cell_sentinel)
export(s2_cell_to_lnglat)
export(s2_cell_union)
export(s2_cell_union_contains)
export(s2_cell_union_difference)
export(s2_cell_union_intersection)
export(s2_cell_union_intersects)
export(s2_cell_union_normalize)
export(s2_cell_union_union)
export(s2_cell_vertex)
export(s2_centroid)
export(s2_centroid_agg)
Expand All @@ -108,6 +129,8 @@ export(s2_convex_hull_agg)
export(s2_coverage_union_agg)
export(s2_covered_by)
export(s2_covered_by_matrix)
export(s2_covering_cell_ids)
export(s2_covering_cell_ids_agg)
export(s2_covers)
export(s2_covers_matrix)
export(s2_data_cities)
Expand Down Expand Up @@ -151,6 +174,7 @@ export(s2_num_points)
export(s2_options)
export(s2_perimeter)
export(s2_point)
export(s2_point_on_surface)
export(s2_project)
export(s2_project_normalized)
export(s2_projection_filter)
Expand All @@ -175,6 +199,7 @@ export(s2_within_matrix)
export(s2_x)
export(s2_y)
importFrom(Rcpp,sourceCpp)
importFrom(utils,str)
importFrom(wk,as_wkb)
importFrom(wk,as_wkt)
useDynLib(s2, .registration = TRUE)
7 changes: 7 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@
#151, #163).
- Added `max_distance` argument to `s2_closest_edges()`, making
distance-constrained k-nearest neighbours possible (#125, #156, #162).
- Added a spherical `s2_point_on_surface()` implementation for polygons
(@kylebutts, #152, #161)
- Added a `s2_cell_union()` vector class to represent cell coverings and
operators to generate them from an s2 geography vector (e.g.,
`s2_covering_cell_ids()`). Cell unions are useful as compact representations
of spherical geometry and can be used like a bounding box to determine
a possible intersection with one or more geographies (#85, #94, #164).

# s2 1.0.7

Expand Down
60 changes: 60 additions & 0 deletions R/RcppExports.R
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,50 @@ cpp_s2_bounds_rect <- function(geog) {
.Call(`_s2_cpp_s2_bounds_rect`, geog)
}

cpp_s2_cell_union_normalize <- function(cellUnionVector) {
.Call(`_s2_cpp_s2_cell_union_normalize`, cellUnionVector)
}

cpp_s2_cell_union_is_na <- function(cellUnionVector) {
.Call(`_s2_cpp_s2_cell_union_is_na`, cellUnionVector)
}

cpp_s2_cell_union_contains <- function(cellUnionVector1, cellUnionVector2) {
.Call(`_s2_cpp_s2_cell_union_contains`, cellUnionVector1, cellUnionVector2)
}

cpp_s2_cell_union_contains_cell <- function(cellUnionVector, cellIdVector) {
.Call(`_s2_cpp_s2_cell_union_contains_cell`, cellUnionVector, cellIdVector)
}

cpp_s2_cell_union_intersects <- function(cellUnionVector1, cellUnionVector2) {
.Call(`_s2_cpp_s2_cell_union_intersects`, cellUnionVector1, cellUnionVector2)
}

cpp_s2_cell_union_intersection <- function(cellUnionVector1, cellUnionVector2) {
.Call(`_s2_cpp_s2_cell_union_intersection`, cellUnionVector1, cellUnionVector2)
}

cpp_s2_cell_union_union <- function(cellUnionVector1, cellUnionVector2) {
.Call(`_s2_cpp_s2_cell_union_union`, cellUnionVector1, cellUnionVector2)
}

cpp_s2_cell_union_difference <- function(cellUnionVector1, cellUnionVector2) {
.Call(`_s2_cpp_s2_cell_union_difference`, cellUnionVector1, cellUnionVector2)
}

cpp_s2_geography_from_cell_union <- function(cellUnionVector) {
.Call(`_s2_cpp_s2_geography_from_cell_union`, cellUnionVector)
}

cpp_s2_covering_cell_ids <- function(geog, min_level, max_level, max_cells, buffer, interior) {
.Call(`_s2_cpp_s2_covering_cell_ids`, geog, min_level, max_level, max_cells, buffer, interior)
}

cpp_s2_covering_cell_ids_agg <- function(geog, min_level, max_level, max_cells, buffer, interior, naRm) {
.Call(`_s2_cpp_s2_covering_cell_ids_agg`, geog, min_level, max_level, max_cells, buffer, interior, naRm)
}

cpp_s2_cell_sentinel <- function() {
.Call(`_s2_cpp_s2_cell_sentinel`)
}
Expand All @@ -85,6 +129,10 @@ cpp_s2_cell_to_lnglat <- function(cellId) {
.Call(`_s2_cpp_s2_cell_to_lnglat`, cellId)
}

cpp_s2_cell_to_cell_union <- function(cellId) {
.Call(`_s2_cpp_s2_cell_to_cell_union`, cellId)
}

cpp_s2_cell_is_na <- function(cellIdVector) {
.Call(`_s2_cpp_s2_cell_is_na`, cellIdVector)
}
Expand Down Expand Up @@ -197,6 +245,14 @@ cpp_s2_cell_max_distance <- function(cellIdVector1, cellIdVector2) {
.Call(`_s2_cpp_s2_cell_max_distance`, cellIdVector1, cellIdVector2)
}

cpp_s2_cell_common_ancestor_level <- function(cellIdVector1, cellIdVector2) {
.Call(`_s2_cpp_s2_cell_common_ancestor_level`, cellIdVector1, cellIdVector2)
}

cpp_s2_cell_common_ancestor_level_agg <- function(cellId) {
.Call(`_s2_cpp_s2_cell_common_ancestor_level_agg`, cellId)
}

cpp_s2_geog_point <- function(x, y) {
.Call(`_s2_cpp_s2_geog_point`, x, y)
}
Expand Down Expand Up @@ -393,6 +449,10 @@ cpp_s2_centroid <- function(geog) {
.Call(`_s2_cpp_s2_centroid`, geog)
}

cpp_s2_point_on_surface <- function(geog) {
.Call(`_s2_cpp_s2_point_on_surface`, geog)
}

cpp_s2_boundary <- function(geog) {
.Call(`_s2_cpp_s2_boundary`, geog)
}
Expand Down
Loading

0 comments on commit 7569004

Please sign in to comment.