Skip to content

Commit

Permalink
support water body polygons
Browse files Browse the repository at this point in the history
  • Loading branch information
Emma Ai committed Dec 2, 2020
1 parent 0b20365 commit 821af6c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/wit/wetland_brutal.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
from wit_tooling.polygon_drill import cal_area
from wit_tooling.database.io import DIO
from wit_tooling import poly_wkt, convert_shape_to_polygon, query_wit_data, plot_to_png, query_wit_metrics, load_timeslice, generate_raster
from dea_tools import waterbodies

try:
# this need to be fixed
Expand Down Expand Up @@ -368,7 +369,7 @@ def query_process(args):
return grouped

def convert_hash_to_shape(gh, id_inc):
wb_poly = dea_waterbodies.get_waterbody(geohash=gh).geometry.iloc[0]
wb_poly = waterbodies.get_waterbody(geohash=gh).geometry.iloc[0]
shape = dict({'geometry': mapping(wb_poly), 'id':str(id_inc),
'properties':{'hash': gh}})
return shape
Expand Down

0 comments on commit 821af6c

Please sign in to comment.