Skip to content
Prev 22962 / 29559 Next

tooltips or annotation

Here is a minimalistic example (adapted demo)

cities <- readOGR(system.file("vectors", package = "rgdal")[1], "cities")
is.na(cities$POPULATION) <- cities$POPULATION == -99
summary(cities$POPULATION)
td <- "."
writeOGR(cities, td, "cities", driver="ESRI Shapefile") # this works
writeOGR(cities, td, "cities", driver="GeoJSON") # this fails



writing ESRI Shapefile works, but writing GeoJSON files fails.


I installed the current version of GDAL from
http://www.kyngchaos.com/software/frameworks <http://www.kyngchaos.com/software/frameworks>
and the I installed rgdal from source.
I also tried this with rgdal installed from mercenaries on CRAN.

The problem seems to the the GeoJSON driver.