Skip to content

Commit

Permalink
master #4 - fix wfs data download
Browse files Browse the repository at this point in the history
  • Loading branch information
eblondel committed Nov 20, 2013
1 parent 4d01757 commit af283d6
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions R/FigisGeoUtils.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,15 @@
# Notes:
# - only supported for GML2 for now
#
readWFS <- function(url, outputFormat = "GML2", p4s = NULL, gmlIdAttributeName="gml_id"){
readWFS <- function(url, outputFormat = "GML", p4s = NULL, gmlIdAttributeName="gml_id"){

#request
wfsRequest <- paste(url, "&outputFormat=", outputFormat, sep="")

if(outputFormat == "GML2"){
wfsRequest <- url
if(outputFormat != "GML") {
wfsRequest <- paste(url, "&outputFormat=", outputFormat, sep="")
}

if(outputFormat == "GML") {

# download the data
tempf = tempfile()
Expand Down

0 comments on commit af283d6

Please sign in to comment.