Class Shape
java.lang.Object
org.openstreetmap.josm.data.imagery.Shape
Data class to store the outline for background imagery coverage.
Configuration data for imagery to describe the coverage area (
ImageryInfo.ImageryBounds).-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final classA list ofCoordinates that attempts to be very efficient in terms of CPU time and memory allocations. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanCheck if the coordinates are inside this shape.encodeAsString(String separator) Encodes this as a string so that it may be parsed usingShape(String, String)static StringencodeAsString(List<Shape> shapes) Encodes the shapes as a string using,and;as separatorsbooleanprivate static booleanequalsPolygon(Polygon first, Polygon second) Check that twoPolygons are equalList<org.openstreetmap.gui.jmapviewer.Coordinate>inthashCode()private static inthashPolygon(Polygon coords) Hash a polygontoString()
-
Field Details
-
coords
-
-
Constructor Details
-
Shape
-
Shape
public Shape()Constructs a new emptyShape.
-
-
Method Details
-
encodeAsString
Encodes this as a string so that it may be parsed usingShape(String, String)- Parameters:
separator- The separator- Returns:
- The string encoded shape
-
encodeAsString
Encodes the shapes as a string using,and;as separators- Parameters:
shapes- The shapes to encode- Returns:
- The string encoded shapes
-
getPoints
-
contains
Check if the coordinates are inside this shape.- Parameters:
latlon- The latlon to look for- Returns:
trueif the LatLon is inside the shape.- See Also:
-
addPoint
-
hashCode
-
equals
-
toString
-
hashPolygon
Hash a polygon- Parameters:
coords- The polygon to hash- Returns:
- The hashcode to use; equivalent to
Object.hashCode(), but zero allocations.
-
equalsPolygon
Check that twoPolygons are equal- Parameters:
first- The first polygon to checksecond- The second polygon to check- Returns:
trueif the polygons are equal
-