Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

optimize geo #2050

Merged
merged 3 commits into from
Apr 25, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions docs-2.0/3.ngql-guide/3.data-types/10.geography.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ Geography is a data type composed of latitude and longitude that represents geos

A point is the basic data type of geography, which is determined by a latitude and a longitude. For example, `"POINT(3 8)"` means that the longitude is `3°` and the latitude is `8°`. Multiple points can form a linestring or a polygon.

!!! note

You cannot directly insert geographic data of the following types, such as `INSERT VERTEX any_shape(geo) VALUES "1":("POINT(1 1)")`. Instead, you need to use a [geography function](../6.functions-and-expressions/14.geo.md) to specify the data type before inserting, such as `INSERT VERTEX any_shape(geo) VALUES "1":(ST_GeogFromText("POINT(1 1)"));`.

| Shape | Example | Description |
| :-- | :-- | :-- |
| Point | `"POINT(3 8)"` | Specifies the data type as a point. |
Expand All @@ -24,8 +28,6 @@ CREATE TAG INDEX <index_name> ON <tag_name>(<geo_prop_name>) s2_min_level = <int

## Examples

For functions about the geography data type, see [Geography functions](../6.functions-and-expressions/14.geo.md).

```ngql
//Create a Tag to allow storing any geography data type.
nebula> CREATE TAG IF NOT EXISTS any_shape(geo geography);
Expand Down