+
+ # Find nodes that belong to this way only
+ def unique_nodes
+ node_ids = self.nodes.collect {|node| node.id }
+ if node_ids.length==0 then return [] end
+ node_ids_in_other_ways = []
+ way_nodes = WayNode.find(:all, :conditions => "node_id in (#{node_ids.join(',')}) and id != #{self.id}")
+ node_ids_in_other_ways = way_nodes.collect {|way_node| way_node.node_id}
+ return node_ids - node_ids_in_other_ways
+ end
+
+ # Temporary method to match interface to nodes
+ def tags_as_hash
+ return self.tags
+ end