私はこのコードを持っていて、それを実行しましたが、すべて問題ありませんが、use.head() 列に raw が表示されず、raw が空であるため、残りのコードは実行されませんでした..
これがコードです
import geopandas as gpd
import json
import numpy as np
from shapely.geometry import LineString, Point, box
import ast
from pyproj import Proj
paths = road_features.SHAPE.map(lambda x: np.array(ast.literal_eval(x)["paths"][0]))
pathLineStrings = paths.map(LineString)
gdf = gpd.GeoDataFrame(road_features,geometry=pathLineStrings)
#gdf.crs = {'init': 'epsg:3857'}
gdf.crs = {'init': 'epsg:4326'}
gdf = gdf.to_crs({'init': 'epsg:4326'})
x0 = -112.8
x1 = -111.0
y0 = 39.6
y1 = 41.6
SLC = box(x0,y0,x1,y1)
slc_df = gdf[gdf.intersects(SLC)]
走る
slc_df.head()
これを示しています
segment_id
OBJECTID_1
Join_Count
TARGET_FID
Join_Count_1
TARGET_FID_1
Join_Count_12
TARGET_FID_12
OBJECTID
pre_dir
...
road_orient_approx
proximity_to_signal
proximity_to_billboard
proximity_to_nearest_intersection
proximity_to_major_road
population_density
station_id
SHAPE
accident_counts
geometry
0 rows × 32 columns
私は何か見落としてますか?一年ありがとう