coordinate reference system (CRS)
这个有点没看懂(what is the meaning of that?)
kaggle_courses_geospatial-analysis 2
Introduction
The maps you create in this course portray the surface of the earth in two dimensions. But, as you know, the world is actually a three-dimensional globe. So we have to use a method called a map projection to render it as a flat surface.
Map projections can’t be 100% accurate. Each projection distorts the surface of the Earth in some way, while retaining some useful property. For instance,
- the equal-area projections (like “Lambert Cylindrical Equal Area”, or “Africa Albers Equal Area Conic”) preserve area. This is a good choice, if you’d like to calculate the area of a country or city, for example.
- the equidistant projections (like “Azimuthal Equidistant projection”) preserve distance. This would be a good choice for calculating flight distance.
We use a coordinate reference system (CRS) to show how the projected points correspond to real locations on Earth. In this tutorial, you’ll learn more about coordinate reference systems, along with how to use them in GeoPandas.
- a Point for the epicenter of an earthquake,
- a LineString for a street, or
- a Polygon to show country boundaries.
Tips
计算面积regions.geometry.area(.geometry.area)
将dataframe格式的文件转化为GeoDataFrame
、facilities_df = pd.read_csv("../input/geospatial-learn-course-data/ghana/ghana/health_facilities.csv")
facilities = gpd.GeoDataFrame(facilities_df, geometry=gpd.points_from_xy(facilities_df.Longitude, facilities_df.Latitude))
#(This is the point)Set the coordinate reference system (CRS) to EPSG 4326
facilities.crs = {
'init': 'epsg:4326'}
看一下是否有这两个大陆在这个world[‘continent’]中