Package noaa.coastwatch.render.feature
Class LatLonLineReader
java.lang.Object
noaa.coastwatch.render.feature.LatLonLineReader
The LatLonLineReader
class reads sets of latitude/longitude
locations to create line features and presents the data as a
EarthDataOverlay
object. If the lat/lon data
contains out of range values (eg: -999), then the line data is broken up
into multiple segments of continuous line data using the out of range
locations as endpoints.
- Since:
- 3.8.0
- Author:
- Peter Hollemans
-
Constructor Summary
ConstructorDescriptionLatLonLineReader
(String filename) Creates a new lat/lon line reader from data in a file. -
Method Summary
Modifier and TypeMethodDescriptionGets the overlay created from the line data.static void
Tests this class.static List<EarthLocation>
readLocationData
(String filename, Datum datum) Reads a list of latitude/longitude locations in a text file, for example:static void
testLocationData
(String filename) Performs a test parsing of a list of latitude/longitude locations in a text file.
-
Constructor Details
-
LatLonLineReader
Creates a new lat/lon line reader from data in a file.- Parameters:
filename
- the filename for the lat/lon line file.- Throws:
IOException
-
-
Method Details
-
getOverlay
Gets the overlay created from the line data.- Returns:
- the overlay created from the lines read.
-
testLocationData
Performs a test parsing of a list of latitude/longitude locations in a text file.- Parameters:
filename
- the name of the text file to read.- Throws:
IOException
- if an error occurred parsing the locations, or no valid locations were found.
-
readLocationData
Reads a list of latitude/longitude locations in a text file, for example:
30.0 -150.0 31.0 -152.0 ...
Any locations with lat/lon values out of range are marked so that
EarthLocation.isValid()
returns false.- Parameters:
filename
- the name of the text file to read.datum
- the datum to use for creating the location points, or null to use WGS84.- Returns:
- the list of points read.
- Throws:
IOException
- if an error occurred parsing the locations.
-
main
Tests this class.- Parameters:
argv
- the array of command line parameters.- Throws:
Exception
-