Copy as.SpatialLinesDataFrame.SpatialLines and as.SpatialPointsDataFrame.SpatialPoints methods from geojsonio.
I had to do some gymnastics with quoting some of the mapshaper call - specifically adding -each 'rmapshaperid=this.id' via force_FC. Just using single quotes works everywhere with the bundled mapshaper, but fails on Windows when using sys_mapshaper(), which uses system2(). But using shQuote() on Windows quotes the string in a way that is incompatible with V8. So now it uses '' when sys=FALSE and shQuote() when `sys=TRUE.
as.SpatialLinesDataFrame.SpatialLines
andas.SpatialPointsDataFrame.SpatialPoints
methods from geojsonio.I had to do some gymnastics with quoting some of the mapshaper call - specifically adding
-each 'rmapshaperid=this.id'
viaforce_FC
. Just using single quotes works everywhere with the bundled mapshaper, but fails on Windows when usingsys_mapshaper()
, which usessystem2()
. But usingshQuote()
on Windows quotes the string in a way that is incompatible with V8. So now it uses''
whensys=FALSE
andshQuote()
when `sys=TRUE.