解释地理多边形坐标
Geopandas网站上的此官方示例在这里显示在此显示在此处显示代码>几何列包含 polygon
带有坐标:
BoroName Shape_Leng Shape_Area \
BoroCode
1 Manhattan 359299.096471 6.364715e+08
2 Bronx 464392.991824 1.186925e+09
3 Brooklyn 741080.523166 1.937479e+09
4 Queens 896344.047763 3.045213e+09
5 Staten Island 330470.010332 1.623820e+09
geometry
BoroCode
1 MULTIPOLYGON (((981219.0557861328 188655.31579...
2 MULTIPOLYGON (((1012821.805786133 229228.26458...
3 MULTIPOLYGON (((1021176.479003906 151374.79699...
4 MULTIPOLYGON (((1029606.076599121 156073.81420...
5 MULTIPOLYGON (((970217.0223999023 145643.33221...
我是Geopandas的新手。我认为坐标应遵循GIS的标准。如果是这样,为什么这些坐标如此之大(以百万计)。他们是否以某种方式缩放?如果有人可以解释,谢谢。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
该GeodataFrame具有空间数据,该空间数据被投影到特定的 /a>不是lat/lon。纬度和经度坐标需要对地球形状和参考零点的特定定义 - 最常见的标准是世界大地测量系统1984 (aka
wgs84
akaepsg:4326
)。很多时候,当您加载ShapeFile时,数据将使用WGS84编码为LAT/LON。但并非总是如此。a>
geodataframe
或Geoseries
的属性提供了有关编码数据中使用的特定参考系统的更多信息。在此示例的情况下:您可以看到该数据集中的坐标为 US调查脚的单位引用了North American Datum 1983 (NAD83) (hence the large values), and are projected using a
您可以使用 geopandas.geopandas.geodataframe .to_crs 。 Geopandas使用
预测-WGS84的PROJ语法是
pyproj
pyproj“ EPSG:4326”
:现在,形状表示为lat/lon
参见 geopandas预测指南和坐标参考系统有关更多信息。
This GeoDataFrame has spatial data which is projected onto a specific coordinate reference system (CRS) which is not lat/lon. Latitude and Longitude coordinates need a specific definition of the shape of the earth and reference zero-points - one which is most commonly accepted as the standard is World Geodetic System 1984 (aka
WGS84
akaEPSG:4326
). Many times, when you load a shapefile, the data will be encoded as lat/lon using WGS84. But not always.The
.crs
attribute of aGeoDataFrame
orGeoSeries
gives more information about the specific reference system used in encoding the data. In the case of this example:You can see that the coordinates in this dataset are in units of US survey feet referenced to the North American Datum 1983 (NAD83) (hence the large values), and are projected using a Lambert Conic Conformal (2SP) projection. This projection has advantages for mapping because, unlike an equi-rectangular projection, e.g. simply mapping lat/lon to pixels, a conformal projection will preserve angles (so e.g. street corners will look like right angles regardless of latitude).
You can change the projection using
geopandas.GeoDataFrame.to_crs
. GeoPandas usespyproj
to manage projections - the proj syntax for WGS84 is"epsg:4326"
:Now, the shapes are expressed as lat/lon
See the geopandas guide to projections and coordinate reference systems for more information.