st_geomfromtext('${pointWkt}', 4326)
时间: 2024-01-19 12:05:16 浏览: 27
This code snippet is used in SQL queries to create a geometry object from a Well-Known Text (WKT) representation of a point. The pointWkt variable contains the WKT representation of the point, and 4326 is the spatial reference identifier (SRID) for the WGS 84 coordinate system.
The function st_geomfromtext() is a spatial function in PostGIS, a spatial extension for PostgreSQL. It creates a geometry object from a text representation of a geometry in WKT or GeoJSON format.
Example usage:
SELECT ST_AsText(ST_GeomFromText('POINT(-122.34900 47.65100)', 4326));
The above query will create a point geometry object from the WKT representation 'POINT(-122.34900 47.65100)', which represents a point at the longitude -122.34900 and latitude 47.65100, in the WGS 84 coordinate system. The ST_AsText() function will convert the geometry object back to a WKT representation, which will be 'POINT(-122.349 47.651)'.
相关推荐
![doc](https://img-home.csdnimg.cn/images/20210720083327.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)