public class OSMEdge extends java.lang.Object implements Shape
| Modifier and Type | Field and Description |
|---|---|
long |
edgeId |
double |
lat1 |
double |
lat2 |
double |
lon1 |
double |
lon2 |
long |
nodeId1 |
long |
nodeId2 |
java.lang.String |
tags |
long |
wayId |
| Constructor and Description |
|---|
OSMEdge() |
| Modifier and Type | Method and Description |
|---|---|
OSMEdge |
clone()
Returns a clone of this shape
|
double |
distanceTo(double x,
double y)
Gets the distance of this shape to the given point.
|
void |
draw(java.awt.Graphics g,
double xscale,
double yscale)
Draws the shape to the given graphics and scale.
|
void |
draw(java.awt.Graphics g,
Rectangle fileMBR,
int imageWidth,
int imageHeight,
double scale)
Draws a shape to the given graphics.
|
void |
fromText(Text text)
Retrieve information from the given text.
|
double |
getLength() |
Rectangle |
getMBR()
Returns minimum bounding rectangle for this shape.
|
boolean |
isIntersected(Shape s)
Returns true if this shape is intersected with the given shape
|
void |
readFields(java.io.DataInput in) |
Text |
toText(Text text)
Store current object as string in the given text appending text already there.
|
void |
write(java.io.DataOutput out) |
public long edgeId
public long nodeId1
public double lat1
public double lon1
public long nodeId2
public double lat2
public double lon2
public long wayId
public java.lang.String tags
public void write(java.io.DataOutput out)
throws java.io.IOException
java.io.IOExceptionpublic void readFields(java.io.DataInput in)
throws java.io.IOException
java.io.IOExceptionpublic Text toText(Text text)
TextSerializabletoText in interface TextSerializablepublic void fromText(Text text)
TextSerializablefromText in interface TextSerializablepublic Rectangle getMBR()
Shapepublic double distanceTo(double x,
double y)
ShapedistanceTo in interface Shapepublic boolean isIntersected(Shape s)
ShapeisIntersected in interface Shapepublic double getLength()
public void draw(java.awt.Graphics g,
Rectangle fileMBR,
int imageWidth,
int imageHeight,
double scale)
Shapedraw in interface Shapeg - - the graphics or canvas to draw tofileMBR - - the MBR of the file in which the shape is containedimageWidth - - width of the image to drawimageHeight - - height of the image to drawscale - - the scale used to convert shape coordinates to image coordinatespublic void draw(java.awt.Graphics g,
double xscale,
double yscale)
Shape