ST_ISVALIDDETAILED (NoSQL query)
APPLIES TO:
NoSQL
Returns a JSON value containing a Boolean value if the specified GeoJSON Point, Polygon, or LineString expression is valid, and if invalid, the reason.
Syntax
ST_ISVALIDDETAILED(<spatial_expr>)
Arguments
Description | |
---|---|
spatial_expr |
Any valid GeoJSON Point, Polygon, or LineString expression. |
Return types
Returns a JSON object containing a boolean value indicating if the specified GeoJSON point or polygon expression is valid. If invalid, the object additionally contains the reason as a string value.
Examples
The following example how to check validity of multiple objects.
SELECT VALUE {
valid: ST_ISVALIDDETAILED({
"type": "Point",
"coordinates": [-84.38876194345323, 33.75682784306348]
}),
invalid: ST_ISVALIDDETAILED({
"type": "Point",
"coordinates": [133.75682784306348, -184.38876194345323]
})
}
[
{
"valid": {
"valid": true
},
"invalid": {
"valid": false,
"reason": "Latitude values must be between -90 and 90 degrees."
}
}
]
Remarks
- The GeoJSON specification requires that points within a Polygon be specified in counter-clockwise order. A Polygon specified in clockwise order represents the inverse of the region within it.
Related content
प्रतिक्रिया
https://aka.ms/ContentUserFeedback.
जल्द आ रहा है: 2024 के दौरान हम सामग्री के लिए फीडबैक तंत्र के रूप में GitHub मुद्दों को चरणबद्ध तरीके से समाप्त कर देंगे और इसे एक नई फीडबैक प्रणाली से बदल देंगे. अधिक जानकारी के लिए, देखें:के लिए प्रतिक्रिया सबमिट करें और देखें