Skip to content

Commit

Permalink
Land Data Generator Script (#434)
Browse files Browse the repository at this point in the history
* brought in changes from old branch

* updated pkg xml with required dependencies

* updated pkg xml and requirements

* added jupyter notebook, ignore array type in obstacles

* updated license info

* updated script to apply consistent 12.5NM buffer

* printing heads

* ended friendship with shapefile, friends with geojson now

* removed geopandas and fiona!

* some metadata changes to notebook

* implemented buffer amount, its set at 5000 meters right now

* updated generation to include buffer

* metadata

---------

Co-authored-by: Sean Donaghy <[email protected]>
  • Loading branch information
2 people authored and vaibhavambastha committed Nov 2, 2024
1 parent 9d46001 commit f51866f
Show file tree
Hide file tree
Showing 7 changed files with 686,857 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{"place_id": 288483456, "licence": "Data \u00a9 OpenStreetMap contributors, ODbL 1.0. http://osm.org/copyright", "osm_type": "node", "osm_id": 10106039422, "lat": "30.9333138", "lon": "-6.9189239", "class": "amenity", "type": "car_rental", "place_rank": 30, "importance": 9.99999999995449e-06, "addresstype": "amenity", "name": "YOUR Location", "display_name": "YOUR Location, Avenue Moulay Abdellah, Manjam International development, Ouarzazate, Pachalik d'Ouarzazate, Ouarzazate Province, Dr\u00e2a-Tafilalet, 45000, Morocco", "boundingbox": ["30.9332638", "30.9333638", "-6.9189739", "-6.9188739"], "geojson": {"type": "Point", "coordinates": [-6.9189239, 30.9333138]}}]
23 changes: 23 additions & 0 deletions src/local_pathfinding/land/csv/map_sel.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Latitude,Longitude
18.379550,-100.134595
25.069678,-106.114305
30.053881,-111.390519
33.928776,-115.259743
35.417706,-119.244763
41.138951,-121.882870
45.914473,-122.322555
48.598045,-120.827627
51.639840,-123.026050
54.896828,-127.422895
58.759085,-131.807893
61.304012,-138.139350
62.544754,-147.636535
61.388302,-155.902604
57.459135,-168.565518
57.647753,-175.952218
56.598210,-190.725618
55.618071,-195.474211
34.654900,-193.363725
7.257856,-191.253239
5.860846,-119.320853
12.794661,-102.085219
956 changes: 956 additions & 0 deletions src/local_pathfinding/land/land_polygons_notebook.ipynb

Large diffs are not rendered by default.

Binary file added src/local_pathfinding/land/pkl/land.pkl
Binary file not shown.
685,875 changes: 685,875 additions & 0 deletions src/local_pathfinding/land/territorial_waters.geojson

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/local_pathfinding/local_pathfinding/obstacles.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ def calculate_projected_distance(self) -> float:
quad_roots = np.roots(quadratic_coefficients)

# filter out only positive and real roots
quad_roots = [i for i in quad_roots if i >= 0 and i.imag == 0]
quad_roots = [i for i in quad_roots if i >= 0 and i.imag == 0] # type: ignore

if len(quad_roots) == 0:
# Sailbot and this Boat will never collide
Expand Down
1 change: 1 addition & 0 deletions src/local_pathfinding/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<exec_depend>python3-numpy</exec_depend>
<exec_depend>python3-pyproj</exec_depend>
<exec_depend>python3-shapely</exec_depend>
<exec_depend>python3-geopandas</exec_depend>

<!--Test Dependencies-->
<test_depend>ament_copyright</test_depend>
Expand Down

0 comments on commit f51866f

Please sign in to comment.