Net
Net类初始化
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
link_gdf
|
GeoDataFrame
|
gpd.GeoDataFrame, 线层数据, 必需参数 |
None
|
node_gdf
|
GeoDataFrame
|
gpd.GeoDataFrame, 点层数据, 必需参数 |
None
|
link_path
|
str
|
str, link层的路网文件路径, 若指定了该参数, 则直接从磁盘读取线层, 可选参数 |
None
|
node_path
|
str
|
str, node层的路网文件路径, 若指定了该参数, 则直接从磁盘读取点层, 可选参数 |
None
|
cut_off
|
float
|
路径搜索截断长度, 米, 可选参数 |
1200.0
|
not_conn_cost
|
float
|
float, 不连通路径的阻抗(m), 可选参数 |
1000.0
|
fmm_cache
|
bool
|
bool, 是否启用路径预计算, 可选参数 |
False
|
cache_cn
|
int
|
int, 使用几个核进行路径预计算, 可选参数 |
2
|
cache_slice
|
int
|
int, 大于0的整数, 表示将路径预计算结果切分为cache_slice份(大规模路网启用预计算时, 增大该值可以防止内存溢出) |
None
|
fmm_cache_fldr
|
str
|
str, 存储路径预计算结果的文件目录, 可选参数 |
'./'
|
recalc_cache
|
bool
|
bool, 是否重新进行路径预计算, 取值False时, 程序会去fmm_cache_fldr下读取缓存, 若读取失败则会重新进行路径预计算, 可选参数 |
True
|
prj_cache
|
bool
|
bool, 是否启用投影缓存, 可选参数 |
True
|
is_hierarchical
|
bool
|
bool, 是否启用空间分层, 可选参数 |
False
|
grid_len
|
float
|
float, 启用空间分层时, 该参数起效, 意为将路网区域划分为grid_len(m)的栅格, 可选参数 |
2000.0
|
cache_name
|
str
|
路径预存储的标志名称, 默认cache |
'cache'
|
plane_crs
|
str
|
str, 要使用的平面投影坐标系, 用户若不指定, 程序会依据路网的经纬度范围自动进行6度投影带的选择, 推荐使用程序自动 |
None
|
weight_field
|
str
|
str, 搜路权重字段, 目前只能为length |
'length'
|
create_single
|
bool
|
bool, 是否在初始化的时候创建单项路网, 可选参数 |
True
|
search_method
|
str
|
str, 路径搜索方法, 目前只能为dijkstra |
'dijkstra'
|
is_sub_net
|
bool
|
bool, 用户不可指定 |
False
|
init_from_existing
|
bool
|
bool, 用户不可指定 |
False
|
double_single_mapping
|
dict
|
dict, 用户不可指定 |
None
|
link_ft_mapping
|
dict
|
dict, 用户不可指定 |
None
|
link_f_mapping
|
dict
|
dict, 用户不可指定 |
None
|
link_t_mapping
|
dict
|
dict, 用户不可指定 |
None
|
link_geo_mapping
|
dict
|
dict, 用户不可指定 |
None
|
ft_link_mapping
|
dict
|
dict, 用户不可指定 |
None
|
Source code in src/gotrackit/map/Net.py
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 | |
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
o
|
int
|
|
None
|
d
|
int
|
|
None
|
k
|
int
|
|
2
|
Returns:
Source code in src/gotrackit/map/Net.py
924 925 926 927 928 929 930 931 932 933 934 935 936 | |