Comparison Reference
check_segment_bound_overlap(reference_segments, segments)
Check if segments are within the bounds of a reference segment
Parameters:
Name | Type | Description | Default |
---|---|---|---|
reference_segments
|
GPXTrackSegment
|
Segment defining the bounds inside which the other segments should be contained |
required |
segments
|
list[GPXTrackSegment]
|
Segments to be checked |
required |
Returns:
Type | Description |
---|---|
list[bool]
|
List of bools specifying if the segments are inside the refence bounds |
Source code in geo_track_analyzer/compare.py
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
|
get_segment_overlap(base_segment, match_segment, grid_width, max_queue_normalize=5, allow_points_outside_bounds=5, overlap_threshold=0.75)
Compare the tracks of two segements and caclulate the overlap.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
base_segment
|
GPXTrackSegment
|
Base segement in which the match segment should be found |
required |
match_segment
|
GPXTrackSegment
|
Other segmeent that should be found in the base segement |
required |
grid_width
|
float
|
Width (in meters) of the grid that will be filled to estimate the overalp. |
required |
max_queue_normalize
|
int
|
Minimum number of successive points in the segment between two points falling into same plate bin. |
5
|
allow_points_outside_bounds
|
int
|
Number of points between sub segments allowed for merging the segments. |
5
|
overlap_threshold
|
float
|
Minimum overlap required to return the overlap data. |
0.75
|
Returns:
Type | Description |
---|---|
list[SegmentOverlap]
|
list of SegmentOverlap objects. |
Source code in geo_track_analyzer/compare.py
254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 |
|
convert_segment_to_plate(segment, gird_width, bounds_min_latitude, bounds_min_longitude, bounds_max_latitude, bounds_max_longitude, normalize=False, max_queue_normalize=5)
Takes a GPXSegement and fills bins of a 2D array (called plate) with the passed bin width. Bins will start at the min latitude and longited values.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
segment
|
GPXTrackSegment
|
The GPXPoints of the Segment will be filled into the plate |
required |
gird_width
|
float
|
Width (in meters) of the grid |
required |
bounds_min_latitude
|
float
|
Minimum latitude of the grid |
required |
bounds_min_longitude
|
float
|
Minimum longitude of the grid |
required |
bounds_max_latitude
|
float
|
Maximum latitude of the gtid. Bins may end with larger values than passed here dependeing on the grid width |
required |
bounds_max_longitude
|
float
|
Maximum longitude of the grid. Bins may end with larger values than passed here dependeing on the grid width |
required |
normalize
|
bool
|
If True, successive points (defined by the max_queue_normalize) will not change the values in a bin. This means that each bin values should have the value 1 except there is overlap with points later in the track. To decide this the previous max_queue_normalize points will be considered. So this value dependes on the chosen gridwidth. |
False
|
max_queue_normalize
|
int
|
Number of previous bins considered when normalize is set to true. |
5
|
Returns:
Type | Description |
---|---|
ndarray
|
2DArray representing the plate. |
Source code in geo_track_analyzer/compare.py
151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 |
|