ropensci-archive / mregions

MarineRegions R client

Home Page:https://docs.ropensci.org/mregions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WFS 2.0.0 returns JSON coordinates as [y, x]

pieterprovoost opened this issue · comments

mr_features_get uses WFS 2.0.0 which will, despite the GeoJSON spec, return coordinates as [y, x]:

Perhaps add an option to use WFS 1.0.0?

Code example:

require(mregions)
require(wellknown)
require(jsonlite)

n <- mr_names("MarineRegions:eez")
id <- mr_names_search(n, "Belgian")$id[1]
jsonstr <- mr_features_get("MarineRegions:eez", id, format = "json")
json <- fromJSON(jsonstr, simplifyVector = FALSE, simplifyDataFrame = FALSE)
wkt <- geojson2wkt(json$features[[1]]$geometry)

WFS calls:

thanks @pieterprovoost for pointing this out! that's not good

Perhaps add an option to use WFS 1.0.0?

sounds good.

@pieterprovoost try again after reinstall