Class FlaggedRelation
- java.lang.Object
-
- org.openstreetmap.atlas.checks.flag.FlaggedObject
-
- org.openstreetmap.atlas.checks.flag.FlaggedRelation
-
- All Implemented Interfaces:
java.io.Serializable,org.openstreetmap.atlas.geography.Located
public class FlaggedRelation extends FlaggedObject
A flag for aRelation- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.openstreetmap.atlas.checks.flag.FlaggedObject
AREA_TAG, COUNTRY_MISSING, EDGE_TAG, ITEM_IDENTIFIER_TAG, ITEM_TYPE_TAG, LINE_TAG, NODE_TAG, OSM_IDENTIFIER_TAG, POINT_TAG
-
-
Constructor Summary
Constructors Constructor Description FlaggedRelation(org.openstreetmap.atlas.geography.atlas.items.Relation relation)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.google.gson.JsonObjectasGeoJsonFeature(java.lang.String flagIdentifier)A GeoJSON representation of the flagged object.org.openstreetmap.atlas.geography.Rectanglebounds()booleanequals(java.lang.Object other)java.lang.StringgetCountry()java.lang.Iterable<org.openstreetmap.atlas.geography.Location>getGeometry()As relations itself do not have a geometry, the geometry of FlaggedRelation is set to null.java.util.Map<java.lang.String,java.lang.String>getProperties()inthashCode()booleanisMultipolygonRelation()Helper method to check FlaggedRelation is of multipolygon typeorg.openstreetmap.atlas.geography.atlas.items.RelationMemberListmembers()-
Methods inherited from class org.openstreetmap.atlas.checks.flag.FlaggedObject
hasCountry
-
-
-
-
Method Detail
-
asGeoJsonFeature
public com.google.gson.JsonObject asGeoJsonFeature(java.lang.String flagIdentifier)
A GeoJSON representation of the flagged object.- Specified by:
asGeoJsonFeaturein classFlaggedObject- Parameters:
flagIdentifier- We always will want to know the id of the flag associated with this flag object.- Returns:
- GeoJSON representation of the flagged object.
-
bounds
public org.openstreetmap.atlas.geography.Rectangle bounds()
- Returns:
- The bounds of the object.
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equalsin classFlaggedObject
-
getCountry
public java.lang.String getCountry()
- Overrides:
getCountryin classFlaggedObject- Returns:
- ISO country code of the country
-
getGeometry
public java.lang.Iterable<org.openstreetmap.atlas.geography.Location> getGeometry()
As relations itself do not have a geometry, the geometry of FlaggedRelation is set to null.- Specified by:
getGeometryin classFlaggedObject- Returns:
- flagged geometry
-
getProperties
public java.util.Map<java.lang.String,java.lang.String> getProperties()
- Specified by:
getPropertiesin classFlaggedObject- Returns:
- flag key-value property map
-
hashCode
public int hashCode()
- Overrides:
hashCodein classFlaggedObject
-
isMultipolygonRelation
public boolean isMultipolygonRelation()
Helper method to check FlaggedRelation is of multipolygon type- Returns:
- true if the flagged relation is a multipolygon
-
members
public org.openstreetmap.atlas.geography.atlas.items.RelationMemberList members()
- Returns:
- list of all members of the relation
-
-