Skip to content

Commit

Permalink
test refactor working, remaining issue with sort
Browse files Browse the repository at this point in the history
  • Loading branch information
Sieboldianus committed Jan 20, 2019
1 parent 60970b6 commit 250a290
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tagmaps/classes/compile_output.py
Expand Up @@ -153,13 +153,15 @@ def _contains_emoji_output(shapes_and_meta_list):
def _loop_shapemetalist(cls, shapefile, shapes_and_meta_list,
epsg_code, schema, emoji_table: TextIO,
itemized):
fid = 0
for shapes, cls_type in shapes_and_meta_list:
if itemized:
# normalize types separately (e.g. emoji/tags)
global_weights = cls._get_weights(shapes, [6, 7, 8])
fid += 1
cls._write_itemized_shapes(
shapefile, shapes,
cls_type, global_weights, emoji_table)
cls_type, global_weights, emoji_table, fid)
else:
# normalize types separately (e.g. emoji/tags)
global_weights = cls._get_weights(shapes, [1])
Expand Down Expand Up @@ -189,7 +191,8 @@ def _write_itemized_shapes(
cls, shapefile,
shapes, cls_type,
weights: Dict[int, Tuple[float, float]],
emoji_table: TextIO):
emoji_table: TextIO,
fid: int):
"""Main wrapper for writing
all results to output
"""
Expand All @@ -202,7 +205,7 @@ def _write_itemized_shapes(
shapefile, alphashape_and_meta,
cls_type, weights, h_imp)
if emoji_table:
cls._write_emoji_table(idx,
cls._write_emoji_table(fid,
alphashape_and_meta,
emoji_table,
cls_type == EMOJI)
Expand Down

0 comments on commit 250a290

Please sign in to comment.