Skip to content

Commit

Permalink
v0.0.3 release
Browse files Browse the repository at this point in the history
v0.0.3
  • Loading branch information
marcbrittain authored Jan 1, 2022
2 parents a8c4331 + 7a23830 commit 9adc881
Show file tree
Hide file tree
Showing 4 changed files with 198 additions and 19 deletions.
201 changes: 191 additions & 10 deletions Examples/Example - GeoLineStrings.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
![downloads](https://img.shields.io/pypi/dm/pygeoshape) ![license](https://img.shields.io/pypi/l/pygeoshape?color=green) ![pypi](https://img.shields.io/pypi/v/pygeoshape)

# PyGeoShape v0.0.2
# PyGeoShape v0.0.3
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!

## Getting Started
Expand Down
12 changes: 5 additions & 7 deletions pygeoshape/geolinestring.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,9 @@ def intersects(self, geo_obj):
bool: True if GeoLineStrings intersect, False otherwise
"""
xy_check = self.xy.intersects(geo_obj.xy)
xz_check = self.xz.intersects(geo_obj.xz)
yz_check = self.yz.intersects(geo_obj.yz)
intersection_points = self.intersection(geo_obj)

if all([xy_check, xz_check, yz_check]):
if len(intersection_points) > 0:
return True
else:
return False
Expand Down Expand Up @@ -210,17 +208,17 @@ def intersection(self, geo_obj, lonlat=False):

for k in range(n_yz_intersections):

if not hasattr(inter1, "geoms"):
if hasattr(inter1, "geoms"):
xy = list(inter1.geoms[i].coords)
else:
xy = list(inter1.coords)

if not hasattr(inter2, "geoms"):
if hasattr(inter2, "geoms"):
xz = list(inter2.geoms[j].coords)
else:
xz = list(inter2.coords)

if not hasattr(inter3, "geoms"):
if hasattr(inter3, "geoms"):
yz = list(inter3.geoms[k].coords)
else:
yz = list(inter3.coords)
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = pygeoshape
version = 0.0.2
version = 0.0.3
author = Marc Brittain
author_email = marcbrittain@yahoo.com
description = A 3D geospatial package to make working with geographical & trajectory data easier in python
Expand Down

0 comments on commit 9adc881

Please sign in to comment.