read_graph graphml 数据错误::图形索引太大,值无效

read_graph error with graphml data: : Graph index was too large, Invalid value

我正在尝试将以下 URL (http://sdi.fish.govt.nz/sdi/mapserver.wfs?SERVICE=WFS&REQUEST=GetFeature&TYPENAME=Annual%20distribution%20of%20Albacore%20tuna&VERSION=1.1.0) 读入 R (3.2.2)。从网站上看,它看起来是 gml 或 graphml 格式。我想将其转换为可用的 shapefile,但我在导入阶段遇到了困难。

library(RCurl)
library(igraph)    
test_url <- 'http://sdi.fish.govt.nz/sdi/mapserver.wfs?SERVICE=WFS&REQUEST=GetFeature&TYPENAME=Annual%20distribution%20of%20Albacore%20tuna&VERSION=1.1.0'
getURL(test_url)
# example of some of the substantial amount of output
# [1] "<?xml version=\"1.0\"?><wfs:FeatureCollection xmlns:gml=\"http://www.opengis.net/gml\" xmlns:fish=\"http://www.fish.govt.nz/fish\" xmlns:gmlsf=\"http://www.opengis.net/gmlsf\"
read_graph(testURl, format='graphml')
# Error in .Call("R_igraph_read_graph_graphml", file, as.numeric(index),  : 
# At foreign-graphml.c:1350 : Graph index was too large, Invalid value

是否有解决图表索引过大的方法或读取数据的替代方法?

URL 既不是 GraphML 格式也不是 GML 格式。它有一个名为 gml 的名称空间,但它指的是 Geography Markup Language, not the Graph Markup Language (GraphML) or the Graph Modelling Language(也是 GML)。