You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"There is an edge case where if there are multiple coordinates with (x,y) overlap, but different z values, an intersection point may be ignored. In most applications, this may not arise, but in general needs to be addressed and is being actively worked on. The below code demonstrates the bug."
461
-
]
462
-
},
463
-
{
464
-
"cell_type": "code",
465
-
"execution_count": 18,
466
-
"id": "9675a260",
467
-
"metadata": {},
468
-
"outputs": [],
469
-
"source": [
470
-
"# Intersection point at [1,1,0] and [4,3,0]\n",
471
-
"# There are multiple (x,y) overlap between the coords:\n",
472
-
"# 1. [1,1,0]\n",
473
-
"# 2. [1,1,5]\n",
474
-
"coords5 = [[1,1,0],[4,3,0]]\n",
475
-
"coords6 = [[1,1,5],[1,1,0],[4,3,0]]\n",
476
-
"\n",
477
-
"gls5 = GeoLineString(coords5,is_xy=True)\n",
478
-
"gls6 = GeoLineString(coords6,is_xy=True)"
479
-
]
480
-
},
481
-
{
482
-
"cell_type": "code",
483
-
"execution_count": 19,
484
-
"id": "7bf7d05f",
485
-
"metadata": {},
486
-
"outputs": [
487
-
{
488
-
"name": "stdout",
489
-
"output_type": "stream",
490
-
"text": [
491
-
"True\n"
492
-
]
493
-
}
494
-
],
495
-
"source": [
496
-
"print(gls5.intersects(gls6)) # this is okay "
497
-
]
498
-
},
499
-
{
500
-
"cell_type": "code",
501
-
"execution_count": 20,
502
-
"id": "9dbb69e6",
503
-
"metadata": {},
504
-
"outputs": [
505
-
{
506
-
"name": "stdout",
507
-
"output_type": "stream",
508
-
"text": [
509
-
"[[4. 3. 0.]]\n"
510
-
]
511
-
}
512
-
],
513
-
"source": [
514
-
"print(gls5.intersection(gls6)) # this is not correct, [1,1,0] is not identified"
3D extension to [shapely](https://github.com/shapely/shapely/tree/main) and [pyproj](https://github.com/pyproj4/pyproj) to make working with geospatial/trajectory data easier in python. If you found PyGeoShape helpful, please consider adding a star to this repository. Thanks!
0 commit comments