How to use geopandas and shapely to process shp files

created at 07-02-2021 views: 9

1. Environment construction

Required library: 

2. Data preprocessing

  1. Slice the shp file
  2. Read the sliced shp file and get its Kind and TID fields to form road_id
  3. The instantaneous speed of each vehicle can be calculated

3. Data processing

Obtain: speed, traffic, occupancy rate, queue length and other information.

1.pyproj library

http://pyproj4.github.io/pyproj/stable/

pyproj.Proj()

It is used to convert the latitude and longitude to the coordinate point projected on the map.

2.WGS-84 coordinate system

Latitude and longitude coordinates, GPS coordinate system

3.GCJ-02: Mars coordinate system, the coordinate system released by the National Bureau of Survey and Measurement in 2002, used by AutoNavi, Tencent, etc.

Convert government-encrypted GCJ-02 coordinates to WGS-84 commonly used coordinates

created at:07-02-2021
edited at: 07-02-2021: