Skip to content
This repository was archived by the owner on Mar 30, 2023. It is now read-only.

probably can not have a mix of 2 and (3 or 4) digits for WKT #23

Closed
sckott opened this issue Mar 28, 2018 · 1 comment
Closed

probably can not have a mix of 2 and (3 or 4) digits for WKT #23

sckott opened this issue Mar 28, 2018 · 1 comment
Milestone

Comments

@sckott
Copy link
Contributor

sckott commented Mar 28, 2018

so in geojson2wkt(), e.g . if one polygon in a multipolygon has just lat and long, and another polygon has lat, long, and altitude, that i imagine isn't allowed

@sckott sckott added this to the v0.5 milestone Mar 28, 2018
@sckott
Copy link
Contributor Author

sckott commented Mar 28, 2018

sf package simply reads it in and converts all 2D points to 3D points

xx <- sf::st_as_sfc("MULTIPOLYGON (((100.000 0.001, 101.000 0.001, 101.000 1.001, 100.000 0.001), (100.2 0.2, 100.8 0.2, 100.8 0.8, 100.2 0.2)), ((1 4 7, 2 5 8, 3 6 1), (9 12 3, 10 1 4, 11 2 9)))")
#> Geometry set for 1 feature
#> geometry type:  MULTIPOLYGON
#> dimension:      XYZ
#> bbox:           xmin: 1 ymin: 0.001 xmax: 101 ymax: 12
#> epsg (SRID):    NA
#> proj4string:    NA
#> MULTIPOLYGON Z (((100 0.001 0, 101 0.001 0, 101...
unclass(xx)
#> [[1]]
#> MULTIPOLYGON Z (((100 0.001 0, 101 0.001 0, 101 1.001 0, 100 0.001 0), (100.2 0.2 0, 100.8 0.2 0, 100.8 0.8 0, 100.2 0.2 0)), ((1 4 7, 2 5 8, 3 6 1), (9 12 3, 10 1 4, 11 2 9)))

@sckott sckott closed this as completed in 72568f3 Mar 29, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant