【发布时间】:2022-08-05 05:52:20
【问题描述】:
我正在保存一个如下所示的 shapefile:
Simple feature collection with 337152 features and 35 fields
Geometry type: MULTIPOLYGON
Dimension: XY
Bounding box: xmin: -137.9625 ymin: 5.495833 xmax: -52.61605 ymax: 62.74232
Geodetic CRS: WGS 84
st_write(sf_dat, \'temp.shp\'))
我收到 50 条警告,上面写着:
Warning messages:
1: In CPL_write_ogr(obj, dsn, layer, driver, as.character(dataset_options), ... :
GDAL Message 1: Value 7120014530 of field hybas_id of feature 0 not successfully written.
Possibly due to too larger number with respect to field width
我无法理解错误。谁能解释为什么会这样? 谢谢
-
我不是 100% 确定,但对于以 shapefile 格式实现的字段类型而言,您的值似乎太大了(c.f. ESRI: ArcGIS field data types):长整数似乎提供了 32 位分辨率,范围介于 -2,147,483,648至 +2,147,483,647。
-
除了 falk-env 的输入,我鼓励你检查保存的数据集并找到这一行。通常,当我收到此警告时,该值仍然存在。请参阅解决方案以了解两种可能的解决方法