|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--geography.StreetSegment
A street segment corresponding to a line in a .map file. This class exists specifically to read the data in .map files. Such files were constructed just for this homework, by taking a simple subset of the TIGER/Line data publicly available from the US Census Bureau. This class is not public. It is only visible within the geography package.
| Field Summary | |
(package private) java.lang.Integer |
housenumLeftEnd
|
(package private) java.lang.Integer |
housenumLeftStart
House numbers nearest the pStart end of this segment, on the left and right sides. |
(package private) java.lang.Integer |
housenumRightEnd
|
(package private) java.lang.Integer |
housenumRightStart
House numbers nearest the pStart end of this segment, on the left and right sides. |
(package private) java.lang.String |
name
Name of the street, e.g., "N Charles St". |
(package private) java.lang.String |
nameSuper
Base name of the "superstreet" that this is part of, e.g., "Charles St". |
(package private) geography.Point |
pEnd
Physical start and end points of this segment |
(package private) geography.Point |
pStart
Physical start and end points of this segment |
| Constructor Summary | |
StreetSegment(geography.StreetSegment ss)
Copy constructor. |
|
StreetSegment(java.lang.String line)
Constructs a StreetSegment from a line in a .map file. |
|
| Method Summary | |
private java.lang.Integer |
houseNum(java.lang.String s)
Converts a house number string like "323" or "" into an Integer like 323 or null, respectively. |
private double |
longlat(java.lang.String s)
Converts a longitude or latitude string like +39210703 into a double like 39.210703. |
geography.StreetSegment |
makeSuperStreetSegment()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
java.lang.String name
java.lang.String nameSuper
geography.Point pStart
geography.Point pEnd
java.lang.Integer housenumLeftStart
java.lang.Integer housenumRightStart
java.lang.Integer housenumLeftEnd
java.lang.Integer housenumRightEnd
| Constructor Detail |
public StreetSegment(java.lang.String line)
throws DataFormatException
public StreetSegment(geography.StreetSegment ss)
| Method Detail |
public geography.StreetSegment makeSuperStreetSegment()
private double longlat(java.lang.String s)
throws java.lang.NumberFormatException
java.lang.NumberFormatException
private java.lang.Integer houseNum(java.lang.String s)
throws java.lang.NumberFormatException
java.lang.NumberFormatException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||