Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Process tiger #21567

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion OsmAnd-java/src/main/java/net/osmand/osm/edit/Entity.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@


public abstract class Entity implements Serializable {
public enum EntityType {
public enum EntityType {
NODE,
WAY,
RELATION,
Expand Down Expand Up @@ -110,6 +110,7 @@ public boolean equals(Object obj) {
private int version;
private double latitude;
private double longitude;
private boolean isTiger;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generic class for isTiger flag is not suitable

public static final int MODIFY_UNKNOWN = 0;
public static final int MODIFY_DELETED = -1;
public static final int MODIFY_MODIFIED = 1;
Expand Down Expand Up @@ -200,6 +201,9 @@ public String putTagNoLC(String key, String value) {
if (tags == null) {
tags = new LinkedHashMap<String, String>();
}
if (key.equals("tiger:osmand") && value.equals("yes")) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Constant for tag is needed

isTiger = true;
}
return tags.put(key, value);
}

Expand Down Expand Up @@ -352,4 +356,8 @@ public boolean compareEntity(Entity thatObj) {
Algorithms.objectEquals(this.tags, thatObj.tags);
}
}

public boolean isTiger() {
return isTiger;
}
}
Loading