File: wkb_meta.Rd

package info (click to toggle)
r-cran-wkutils 0.1.3-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 816 kB
  • sloc: cpp: 3,625; sh: 12; makefile: 2
file content (57 lines) | stat: -rw-r--r-- 1,775 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/meta.R
\name{wkb_meta}
\alias{wkb_meta}
\alias{wkt_meta}
\alias{wkt_streamer_meta}
\alias{wk_geometry_type}
\alias{wk_geometry_type_id}
\title{Extract meta information}
\usage{
wkb_meta(wkb, recursive = FALSE)

wkt_meta(wkt, recursive = FALSE)

wkt_streamer_meta(wkt, recursive = FALSE)

wk_geometry_type(type_id)

wk_geometry_type_id(type)
}
\arguments{
\item{wkb}{A \code{list()} of \code{\link[=raw]{raw()}} vectors, such as that
returned by \code{sf::st_as_binary()}.}

\item{recursive}{Pass \code{TRUE} to recurse into multi-geometries
and collections to extract meta of sub-geometries}

\item{wkt}{A character vector containing well-known text.}

\item{type_id}{An integer version of the geometry type}

\item{type}{A string version of the geometry type (e.g.,
point, linestring, polygon, multipoint, multilinestring,
multipolygon, geometrycollection)}
}
\value{
A data.frame with columns:
\itemize{
\item \code{feature_id}: The index of the top-level feature
\item \code{nest_id}: The recursion level (if feature is a geometry collection)
\item \code{part_id}: The part index (if nested within a multi-geometry or collection)
\item \code{type_id}: The type identifier (see \code{\link[=wk_geometry_type]{wk_geometry_type()}})
\item \code{size}: For points and linestrings the number of points, for polygons
the number of rings, and for mutlti-geometries and collection types,
the number of child geometries.
\item \code{srid}: The spatial reference identifier as an integer
}
}
\description{
Extract meta information
}
\examples{
wkt_meta("POINT (30 10)")
wkt_meta("GEOMETRYCOLLECTION (POINT (30 10))", recursive = FALSE)
wkt_meta("GEOMETRYCOLLECTION (POINT (30 10))", recursive = TRUE)

}