Skip to content

Commit

Permalink
optimize geo (#2050)
Browse files Browse the repository at this point in the history
* optimize geo

* Update 10.geography.md

* Update docs-2.0/3.ngql-guide/3.data-types/10.geography.md

---------

Co-authored-by: abby.huang <78209557+abby-cyber@users.noreply.github.com>
  • Loading branch information
cooper-lzy and abby-cyber committed Apr 25, 2023
1 parent 12fe7d4 commit 8d31dbf
Showing 1 changed file with 4 additions and 2 deletions.
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 `` and the latitude is ``. 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

0 comments on commit 8d31dbf

Please sign in to comment.