-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/omanges/turfpy
- Loading branch information
Showing
10 changed files
with
371 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
Line Arc | ||
================ | ||
Creates a circular arc, of a circle of the given radius and center point, between bearing1 and bearing2; 0 bearing is North of center point, positive clockwise. | ||
|
||
Example | ||
------- | ||
|
||
.. jupyter-execute:: | ||
|
||
from turfpy.misc import line_arc | ||
from geojson import Feature, Point | ||
|
||
center = Feature(geometry=Point((-75, 40))) | ||
radius = 5 | ||
bearing1 = 25 | ||
bearing2 = 47 | ||
|
||
line_arc(center=center, radius=radius, bearing1=bearing1, bearing2=bearing2) | ||
|
||
|
||
|
||
Interactive Example | ||
------------------- | ||
|
||
.. jupyter-execute:: | ||
|
||
from ipyleaflet import Map, GeoJSON, LayersControl | ||
from turfpy.misc import line_arc | ||
from geojson import Feature, Point, LineString, FeatureCollection | ||
|
||
center = Feature(geometry=Point((-75, 40))) | ||
radius = 5; | ||
bearing1 = 25; | ||
bearing2 = 47; | ||
|
||
m = Map(center=[40.011313056309056, -74.97720068362348], zoom=12) | ||
|
||
feature = line_arc(center=center, radius=radius, bearing1=bearing1, bearing2=bearing2) | ||
|
||
fc = FeatureCollection([feature, center]) | ||
|
||
layer = GeoJSON(name="Line_Arc", data=fc, style={'color':'red'}) | ||
|
||
m.add_layer(layer) | ||
m | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
Sector | ||
================ | ||
Creates a circular sector of a circle of given radius and center Point, between (clockwise) bearing1 and bearing2; 0 bearing is North of center point, positive clockwise. | ||
|
||
Example | ||
------- | ||
|
||
.. jupyter-execute:: | ||
|
||
from turfpy.misc import sector | ||
from geojson import Feature, Point | ||
|
||
center = Feature(geometry=Point((-75, 40))) | ||
radius = 5 | ||
bearing1 = 25 | ||
bearing2 = 45 | ||
|
||
feature = sector(center, radius, bearing1, bearing2, options={"properties":{"length":3}}) | ||
|
||
|
||
|
||
Interactive Example | ||
------------------- | ||
|
||
.. jupyter-execute:: | ||
|
||
from ipyleaflet import Map, GeoJSON, LayersControl | ||
from turfpy.misc import sector | ||
from geojson import Feature, Point, LineString, FeatureCollection | ||
|
||
center = Feature(geometry=Point((-75, 40))) | ||
radius = 5; | ||
bearing1 = 25; | ||
bearing2 = 45; | ||
|
||
m = Map(center=[40.011313056309056, -74.97720068362348], zoom=12) | ||
|
||
feature = sector(center, radius, bearing1, bearing2, options={"properties":{"length":3}}) | ||
|
||
|
||
fc = FeatureCollection([feature, center]) | ||
|
||
layer = GeoJSON(name="Line_Arc", data=fc, style={'color':'red'}) | ||
|
||
m.add_layer(layer) | ||
m | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
"""Project version information.""" | ||
|
||
__version__ = "0.0.6" | ||
__version__ = "0.0.7" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.