plot3d() problem
Closed this issue · 4 comments
mdsumner commented
library(sf)
example(read_sf)
plot3d(nc)
New names:
* `111` -> `111...11`
* `112` -> `112...12`
* `113` -> `113...13`
* `114` -> `114...14`
* `115` -> `115...15`
* ...
Error in rgl.primitive("lines", x, y, z, ...) :
Illegal number of vertices
mdsumner commented
mdsumner commented
THIS BIT's FIXED
Ah, also
plot3d(silicate::SC0(silicate::inlandwaters))
Error in rgl.primitive("lines", x, y, z, ...) :
Illegal number of vertices
and
nc <- sf::read_sf(system.file("gpkg/nc.gpkg", package = "sf", mustWork = TRUE))
> plot(silicate::SC0(nc))
New names:
* `111` -> `111...11`
* `112` -> `112...12`
* `113` -> `113...13`
* `114` -> `114...14`
* `115` -> `115...15`
* ...
plot ok
and aha
plot3d(silicate::SC0(nc))
New names:
* `111` -> `111...11`
* `112` -> `112...12`
* `113` -> `113...13`
* `114` -> `114...14`
* `115` -> `115...15`
* ...
Error in rgl.primitive("lines", x, y, z, ...) :
Illegal number of vertices
mdsumner commented
THIS BIT's FIXED
It's going into sc_vertex.default:
silicate:::sc_vertex.SC0(x)
# A tibble: 1,255 x 2
x_ y_
<dbl> <dbl>
1 -84.3 35.0
2 -84.3 35.2
3 -84.2 35.3
4 -84.2 35.2
5 -84.1 35.0
6 -84.1 35.2
7 -84.0 35.3
8 -84.0 35.3
9 -84.0 35.3
10 -84.0 35.4
# ... with 1,245 more rows
> class(x)
[1] "SC0" "sc"
silicate:::sc_vertex.default(x)
New names:
* `111` -> `111...11`
* `112` -> `112...12`
* `113` -> `113...13`
* `114` -> `114...14`
* `115` -> `115...15`
* ...
# A tibble: 1,255 x 3
x_ y_ vertex_
<dbl> <dbl> <chr>
1 -84.3 35.0 BzEYmw
2 -84.3 35.2 uDEj7n
3 -84.2 35.3 ggsiMi
4 -84.2 35.2 vzqhk3
and the crux I think
SC(SC0(nc))
New names:
* `111` -> `111...11`
* `112` -> `112...12`
* `113` -> `113...13`
* `114` -> `114...14`
* `115` -> `115...15`
* ...
class : SC
type : Primitive
vertices : 1255 (2-space)
primitives : 1357 (1-space)
crs : +proj=longlat +datum=NAD27 +no_defs
mdsumner commented
It's unnest() doing the new names thing.
- sc_vertex.SC0 was not exported FIXED (somewhere in eb1450b)
- partial fix, anglr had path_-left-in-topology_ and column-no-name issues (x = , y = , 0, 1) 73ec7d6