g_wk2wk() converts geometries between Well Known Binary (WKB) and
Well Known Text (WKT) formats. A geometry given as a raw vector of WKB will
be converted to a WKT string, while a geometry given as a WKT string will be
converted to a WKB raw vector. Input may also be a list of WKB raw vectors
or a character vector of WKT strings.
This PR also renames files:
src/geos_wkt.cpp -> src/geom_api.cppsrc/geos_wkt.h -> src/geom_api.h
and the tests in tests/testthat/test-geos_wkt.R were merged into tests/testthat/test-geom.R.
A separate PR will re-implement the geometry API to operate on either WKB or WKT inputs.
Geometry WKB/WKT conversion
g_wk2wk()
converts geometries between Well Known Binary (WKB) and Well Known Text (WKT) formats. A geometry given as a raw vector of WKB will be converted to a WKT string, while a geometry given as a WKT string will be converted to a WKB raw vector. Input may also be a list of WKB raw vectors or a character vector of WKT strings.This PR also renames files:
src/geos_wkt.cpp
->src/geom_api.cpp
src/geos_wkt.h
->src/geom_api.h
and the tests in
tests/testthat/test-geos_wkt.R
were merged intotests/testthat/test-geom.R
.A separate PR will re-implement the geometry API to operate on either WKB or WKT inputs.