@Deprecated public class ParseUtils extends Object
Modifier and Type | Method and Description |
---|---|
static double[] |
parseLatitudeLongitude(double[] outLatLon,
String latLonStr)
Deprecated.
A variation of
parseLatitudeLongitude(String) that re-uses an output array. |
static double[] |
parseLatitudeLongitude(String latLonStr)
Deprecated.
Extract (by calling
parsePoint(String[], String, int) and validate the latitude and
longitude contained in the String by making sure the latitude is between 90 & -90 and longitude
is between -180 and 180. |
static String[] |
parsePoint(String[] out,
String externalVal,
int dimension)
Deprecated.
Given a string containing dimension values encoded in it, separated by commas, return a String array of length dimension
containing the values.
|
static double[] |
parsePointDouble(double[] out,
String externalVal,
int dimension)
Deprecated.
Given a string containing dimension values encoded in it, separated by commas, return a double array of length dimension
containing the values.
|
public static String[] parsePoint(String[] out, String externalVal, int dimension) throws InvalidShapeException
out
- A preallocated array. Must be size dimension. If it is not it will be resized.externalVal
- The value to parsedimension
- The expected number of values for the pointInvalidShapeException
- if the dimension specified does not match the number of values in the externalValue.public static double[] parsePointDouble(double[] out, String externalVal, int dimension) throws InvalidShapeException
out
- A preallocated array. Must be size dimension. If it is not it will be resized.externalVal
- The value to parsedimension
- The expected number of values for the pointInvalidShapeException
- if the dimension specified does not match the number of values in the externalValue.public static final double[] parseLatitudeLongitude(String latLonStr) throws InvalidShapeException
parsePoint(String[], String, int)
and validate the latitude and
longitude contained in the String by making sure the latitude is between 90 & -90 and longitude
is between -180 and 180.
The latitude is assumed to be the first part of the string and the longitude the second part.latLonStr
- The string to parse. Latitude is the first value, longitude is the second.InvalidShapeException
- if there was an error parsingpublic static final double[] parseLatitudeLongitude(double[] outLatLon, String latLonStr) throws InvalidShapeException
parseLatitudeLongitude(String)
that re-uses an output array.InvalidShapeException
parseLatitudeLongitude(String)
Copyright © 2015. All rights reserved.