-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathgetCSVwithSciDBData.R
More file actions
28 lines (21 loc) · 870 Bytes
/
getCSVwithSciDBData.R
File metadata and controls
28 lines (21 loc) · 870 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
SCIDB_HOST = "128.176.148.9"
SCIDB_PORT = "30021"
SCIDB_USER = "giscolab"
SCIDB_PW = "BxLQmZVL2qqzUhU93usYYdxT"
Sys.setenv(http_proxy="")
Sys.setenv(https_proxy="")
Sys.setenv(HTTP_PROXY="")
Sys.setenv(HTTPS_PROXY="")
# We don't want to pass connection details information in every single gdal_translate call und thus set it as environment variables
Sys.setenv(SCIDB4GDAL_HOST=paste("https://",SCIDB_HOST, sep=""),
SCIDB4GDAL_PORT=SCIDB_PORT,
SCIDB4GDAL_USER=SCIDB_USER,
SCIDB4GDAL_PASSWD=SCIDB_PW)
library(scidbst)
scidbconnect(host=SCIDB_HOST,port = SCIDB_PORT,
username = SCIDB_USER,
password = SCIDB_PW,
auth_type = "digest",
protocol = "https")
write.csv(scidbst.ls(extent = TRUE,srs = TRUE, trs=TRUE),
file="datasets.csv",row.names = FALSE,quote = FALSE)