ドキュメントの検索
karat

+

K

APIリファレンス ↗

注: 以下の翻訳の正確性は検証されていません。AIPを利用して英語版の原文から機械的に翻訳されたものです。

ジオメトリ重心

サポートされている処理方法: バッチ、ストリーミング

地球を球面近似として、ジオメトリの重心(質量中心)を求めます。ジオメトリが混合次元のコレクションの場合、最も高次元の要素のみが重心に寄与します(例: 点、線、およびポリゴンのコレクションでは、点と線は無視されます)。 式のカテゴリ: Geospatial

宣言された引数

  • Expression - 有効な GeoJSON 入力。
    Expression<Geometry>

出力タイプ: Geo-point

例 1 - 基本ケース

引数の値:

  • Expression: geometry
geometry:arrow_right:出力
{"type":"Polygon","coordinates":[[[-1.0,-1.0],[1.0,-1.0],[1.0,1.0],[-1.0,1.0],[-1.0,-1.0]]]}{
latitude: 0.0,
longitude: 0.0,
}
{"type":"LineString","coordinates":[[30.0,0.0],[35.0,0.0],[50.0,0.0]]}{
latitude: 0.0,
longitude: 40.0,
}
{"type":"MultiPoint","coordinates":[[0.0,0.0],[0.0,1.0]]}{
latitude: 0.5,
longitude: 0.0,
}
{"type":"MultiPoint","coordinates":[[160.0,0.0],[-170.0,0.0]]}{
latitude: 0.0,
longitude: 175.0,
}
{"type":"GeometryCollection","geometries":[{"type":"Polygon","coordinates":[[[0.0,-0.017981],[0.001754,-0.017636],[0.003441,-0.016613],[0.004995,-0.014951],[0.006357,-0.012715],[0.007475,-0.00999],[0.008306,-0.006881],[0.008818,-0.003508],[0.008991,0.0],[0.008818,0.003508],[0.008306,0.006881],[0.007475,0.00999],[0.006357,0.012715],[0.004995,0.014951],[0.003441,0.016613],[0.001754,0.017636],[0.0,0.017981],[-0.001754,0.017636],[-0.003441,0.016613],[-0.004995,0.014951],[-0.006357,0.012715],[-0.007475,0.00999],[-0.008306,0.006881],[-0.008818,0.003508],[-0.008991,0.0],[-0.008818,-0.003508],[-0.008306,-0.006881],[-0.007475,-0.00999],[-0.006357,-0.012715],[-0.004995,-0.014951],[-0.003441,-0.016613],[-0.001754,-0.017636],[0.0,-0.017981]]]},{"type":"MultiLineString","coordinates":[[[100.0,0.0],[101.0,1.0]],[[102.0,2.0],[103.0,3.0]]]},{"type":"MultiPoint","coordinates":[[100.0,0.0],[101.0,1.0]]}]}{
latitude: 0.0,
longitude: 0.0,
}
nullnull