Skip to content

Commit

Permalink
#43 remove deprecated translation method
Browse files Browse the repository at this point in the history
  • Loading branch information
roelderickx committed Sep 16, 2023
1 parent 9211a70 commit 26cbbf0
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 29 deletions.
7 changes: 0 additions & 7 deletions README.md
Expand Up @@ -283,13 +283,6 @@ class TranslationBase:
return tags


def get_unique_node_identifier(self, rounded_x, rounded_y, tags):
'''
DEPRECATED -- USE merge_tags IF YOU WANT TO DISABLE MERGING!
'''
return (rounded_x, rounded_y)


def process_feature_post(self, osmgeometry, ogrfeature, ogrgeometry):
'''
This method is called after the creation of an OsmGeometry object. The
Expand Down
10 changes: 1 addition & 9 deletions ogr2osm/osm_data.py
Expand Up @@ -90,15 +90,7 @@ def __add_node(self, x, y, z, tags, is_way_member):
rx = self.__round_number(x)
ry = self.__round_number(y)

# TODO deprecated
unique_node_id = None
if is_way_member:
unique_node_id = (rx, ry)
else:
unique_node_id = self.translation.get_unique_node_identifier(rx, ry, tags)
# to be replaced by
#unique_node_id = (rx, ry)
# end deprecation
unique_node_id = (rx, ry)

if unique_node_id in self.__unique_node_index:
for index in self.__unique_node_index[unique_node_id]:
Expand Down
13 changes: 0 additions & 13 deletions ogr2osm/translation_base_class.py
Expand Up @@ -78,19 +78,6 @@ def merge_tags(self, geometry_type, tags_existing_geometry, tags_new_geometry):
return tags


def get_unique_node_identifier(self, rounded_x, rounded_y, tags):
'''
DEPRECATED -- USE merge_tags IF YOU WANT TO DISABLE MERGING!
This method is used to identify identical nodes for merging. By default
only the rounded coordinates are taken into account, but you can extend
this with some tags as desired. The return value should be a hashable
type, if you don't want to merge you can just return a counter value.
Note: this function will not be called for nodes belonging to a way,
they are always identified by the tuple (rounded_x, rounded_y).
'''
return (rounded_x, rounded_y)


def process_feature_post(self, osmgeometry, ogrfeature, ogrgeometry):
'''
This method is called after the creation of an OsmGeometry object. The
Expand Down

0 comments on commit 26cbbf0

Please sign in to comment.