跳转至

Is valid GeoJSON(判断是否为有效 GeoJSON(Is valid GeoJSON))

Supported in: Batch, Faster, Streaming

Returns true if the input is a valid GeoJSON input string. Not all GeoJSON strings are indexable by the ontology; use the "prepare geometry" expression to prepare geometry prior to Ontology use.

Expression categories: Geospatial

Declared arguments

  • Expression: GeoJSON to check. Note that not all GeoJSON strings are indexable by the Ontology; use the "prepare geometry" expression to prepare geometry prior to Ontology use.
    Expression\

Output type: Boolean

Examples

Example 1: Base case

Argument values:

  • Expression: geoJson
geoJson Output
{"type":"Point","coordinates":[3.0, 5.0, 2.0]} true
{"type":"Polygon","coordinates":[[[0.0,0.0],[1.0,0.0],[0.0,1.0],[0.0,0.0]]]} true
{"type":"LineString","coordinates":[[0.0,0.0],[1.0,0.0]]} true
not a GeoJSON string false


中文翻译


判断是否为有效 GeoJSON(Is valid GeoJSON)

支持:批量(Batch)、快速(Faster)、流式(Streaming)

若输入为有效的 GeoJSON 字符串,则返回 true。并非所有 GeoJSON 字符串均可被本体(ontology)索引;请使用"准备几何图形(prepare geometry)"表达式在处理前准备几何数据。

表达式类别: 地理空间(Geospatial)

声明的参数

  • 表达式(Expression): 待检查的 GeoJSON。注意:并非所有 GeoJSON 字符串均可被本体索引;请使用"准备几何图形"表达式在处理前准备几何数据。
    表达式\<字符串>

输出类型: 布尔值(Boolean)

示例

示例 1:基础情况

参数值:

  • 表达式: geoJson
geoJson 输出
{"type":"Point","coordinates":[3.0, 5.0, 2.0]} true
{"type":"Polygon","coordinates":[[[0.0,0.0],[1.0,0.0],[0.0,1.0],[0.0,0.0]]]} true
{"type":"LineString","coordinates":[[0.0,0.0],[1.0,0.0]]} true
非 GeoJSON 字符串 false