我有一个线串几何,我想计算相应的1公里宽的缓冲区.尽管设置了CRS,我似乎无法返回正确的几何形状
我正在运行以下代码来定义geodrame
import pandas as pd
from shapely import LineString
import geopandas as gpd
test = pd.DataFrame(
[["Test", LineString([(41.000, 18.583), (40.892, 18.952)])]],
columns=["Nome", "geometry"]
)
test = gpd.GeoDataFrame(test, crs='EPSG:3003', geometry="geometry")
crs设置正确,单位为米
>>> test.crs
<Projected CRS: EPSG:3003>
Name: Monte Mario / Italy zone 1
Axis Info [cartesian]:
- X[east]: Easting (metre)
- Y[north]: Northing (metre)
Area of Use:
- name: Italy - onshore and offshore - west of 12°E.
- bounds: (5.93, 36.53, 12.0, 47.04)
Coordinate Operation:
- name: Italy zone 1
- method: Transverse Mercator
Datum: Monte Mario
- Ellipsoid: International 1924
- Prime Meridian: Greenwich
然而,当我试图计算缓冲区时,
>>> test.buffer(1000)
POLYGON ((-918.845 -261.947, -941.757 -166.523...
正如你可以看到的,缓冲区显然是错误的,因为坐标甚至不是有效的坐标(lat是—918.845!) 我做错了什么?thanks in advance