我希望使用以下格式将grib2文件转换为geojson文件:
{
"type": "FeatureCollection",
"features": [
{ "type": "Feature", "properties": { "ID": 0, "sigwaveht": 1.000000 }, "geometry": { "type": "LineString", "coordinates": [ [ 20.5, 77.559374979743737 ], [ 20.756756711040964, 77.5 ], [ 21.0, 77.426829270065582 ], [ 21.5, 77.426829270065582 ] ] } },
{ "type": "Feature", "properties": { "ID": 1, "sigwaveht": 1.000000 }, "geometry": { "type": "LineString", "coordinates": [ [ 17.5, 76.879518074163784 ], [ 18.0, 76.840000001907356 ], [ 18.555555592348554, 77.0 ], [ 18.555555592348554, 77.5 ] ] } },
{ "type": "Feature", "properties": { "ID": 2, "sigwaveht": 1.000000 }, "geometry": { "type": "LineString", "coordinates": [ [ 28.5, 76.732142838136269 ], [ 29.0, 76.634146323734484 ], [ 29.937500058207661, 77.0 ], [ 29.937500058207661, 77.5 ] ] } },我可以通过使用ogr2ogr2以这种格式将形状文件转换为geojson来实现这一点,但是如何将grib2转换为这种格式的geoJSON呢?
发布于 2022-10-13 22:50:55
不能将栅格格式的GRIB转换为GeoJSON (矢量格式)。
你期望实现什么?矢量数据由点组成,其中每个点都是光栅格式的像素之一?
如果这是您想要的,您可能需要自己编写代码,我不认为有任何标准的工具可以这样做。只需在光栅数据像素上做一个循环,并为每个像素编写一个点特征。
https://stackoverflow.com/questions/73941299
复制相似问题