115 | | There does not seem to be any problem and also nothing is returned ... oh fuck |
| 115 | There does not seem to be any problem and also nothing is returned ... |
| 116 | The next example for writing |
| 117 | {{{ |
| 118 | library(rgdal) |
| 119 | writeOGR(meuse[1:10,], "PG:dbname=postgis", "meuse3", "PostgreSQL") |
| 120 | }}} |
| 121 | returns |
| 122 | {{{ |
| 123 | Erreur dans writeOGR(meuse[1:10, ], "PG:dbname=postgis", "meuse3", "PostgreSQL") : |
| 124 | No such driver: PostgreSQL |
| 125 | }}} |
| 126 | All examples which do not imply postgres work |
| 127 | {{{ |
| 128 | logo <- system.file("pictures/logo.jpg", package="rgdal")[1] |
| 129 | x <- new("GDALReadOnlyDataset", logo) |
| 130 | x |
| 131 | getDriverLongName(getDriver(x)) |
| 132 | displayDataset(x) |
| 133 | ogrDrivers() |
| 134 | dsn <- system.file("vectors", package = "rgdal")[1] |
| 135 | ogrInfo(dsn=dsn, layer="cities") |
| 136 | cities <- readOGR(dsn=dsn, layer="cities") |
| 137 | summary(cities) |
| 138 | ogrInfo(dsn=dsn, layer="kiritimati_primary_roads") |
| 139 | kiritimati_primary_roads <- readOGR(dsn=dsn, layer="kiritimati_primary_roads") |
| 140 | summary(kiritimati_primary_roads) |
| 141 | ogrInfo(dsn=dsn, layer="scot_BNG") |
| 142 | scot_BNG <- readOGR(dsn=dsn, layer="scot_BNG") |
| 143 | summary(scot_BNG) |
| 144 | if ("GML" %in% ogrDrivers()$name) { |
| 145 | dsn <- system.file("vectors/airports.gml", package = "rgdal")[1] |
| 146 | airports <- try(readOGR(dsn=dsn, layer="airports")) |
| 147 | if (class(airports) != "try-error") summary(airports) |
| 148 | } |
| 149 | dsn <- system.file("vectors/ps_cant_31.MIF", package = "rgdal")[1] |
| 150 | ogrInfo(dsn=dsn, layer="ps_cant_31") |
| 151 | ps_cant_31 <- readOGR(dsn=dsn, layer="ps_cant_31") |
| 152 | summary(ps_cant_31) |
| 153 | dsn <- system.file("vectors/Up.tab", package = "rgdal")[1] |
| 154 | ogrInfo(dsn=dsn, layer="Up") |
| 155 | Up <- readOGR(dsn=dsn, layer="Up") |
| 156 | summary(Up) |
| 157 | dsn <- system.file("vectors/test_trk2.gpx", package = "rgdal")[1] |
| 158 | test_trk2 <- try(readOGR(dsn=dsn, layer="tracks")) |
| 159 | if (class(test_trk2) != "try-error") summary(test_trk2) |
| 160 | test_trk2pts <- try(readOGR(dsn=dsn, layer="track_points")) |
| 161 | if (class(test_trk2pts) != "try-error") summary(test_trk2pts) |
| 162 | dsn <- system.file("vectors", package = "rgdal")[1] |
| 163 | ogrInfo(dsn=dsn, layer="trin_inca_pl03") |
| 164 | birds <- readOGR(dsn=dsn, layer="trin_inca_pl03") |
| 165 | summary(birds) |
| 166 | }}} |
| 167 | mmmh ... and PostgreSQL in not listed in ogrDrivers() |
| 168 | {{{ |
| 169 | ogrDrivers() |
| 170 | }}} |