简体   繁体   English

如何从POINT查找经纬度值

[英]How to find lat long values from the POINT

i have Point value which is POINT(24.3 80.2) which is stored in variable pnt 我的Point值是POINT(24.3 80.2),存储在变量pnt中

I want to have the lat and long values seperately. 我想分别拥有经度和纬度值。 is there any simple way to get that using python 有没有简单的方法可以使用python来获得

POINT here is geographical location which meanse POINT(longitude latitude) POINT这里是地理位置,即POINT(经度)

[Edit: Ignacio Vazquez-Abrams is spot on!] [编辑:伊格纳西奥·巴斯克斯(Ignacio Vazquez-Abrams)亮相!]

You are using geos django. 您正在使用geos django。

Check out the docs . 查看文档

>>> pnt = Point(5, 23)
>>> [coord for coord in pnt]
[5.0, 23.0]
>>> pnt.coords
(5.0, 23.0)

The following is not relevant but can be used. 以下内容无关紧要,但可以使用。 Kept for other references. 保留其他参考。

Check out the following project : pyproj 出以下项目: pyproj

Module can performs cartographic transformations and geodetic computations. 模块可以执行制图转换和大地测量。

The Proj class can convert from geographic (longitude,latitude) to native map projection (x,y) coordinates and vice versa, or from one map projection coordinate system directly to another. Proj类可以从地理(经度,纬度)转换为原始地图投影(x,y)坐标,反之亦然,或者从一个地图投影坐标系直接转换为另一个。

and much more. 以及更多。

Also check out : geojson 还检查一下: geojson

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM