Parses a string representation of the latitude.

@param latitudeString
String representation of the point location
@return Latitude
@throws ParserException
On an exception
497190
public Latitude parseLatitude(final String latitudeString)
    throws ParserException
  {
    try
    {
      final Latitude latitude = new Latitude(parseAngle(latitudeString));
      return latitude;
    }
    catch (final RuntimeException e)
    {
      throw new ParserException("Cannot parse latitude: " + latitudeString);
    }

  }
923072
public long parseLocalDate(String string) throws Exception
  {
    long time = parseDate(string);

    synchronized (this) {
      setLocalTime(time);
      return getGMTTime();
    }
  }
1010792
public static Parser<Void> string(String str) {
    return Patterns.string(str).toScanner(str);
  }
166489
public static java.util.Date parseDate(String dateString, String dateFormat) {
        java.util.Date newDate = null;

        try {
            newDate = new SimpleDateFormat(dateFormat, Locale.ENGLISH)
                    .parse(dateString);
        } catch (ParseException e) {
            QuickUtils.log.d("parse error", e);
        }
        return newDate;
    }
465563
@NonNull
    static List<Address> parseJson(final byte[] jsonData,
                                   final int maxResults,
                                   final boolean parseAddressComponents)
            throws GeocoderException {
        try {
            final String jsonString = new String(jsonData, Charset.forName("UTF-8"));
            final JSONObject jsonObject = new JSONObject(jsonString);

            if (!jsonObject.has(STATUS)) {
                throw new GeocoderException(new JSONException("No \"status\" field"));
            }

            final Status status = Status.fromString(jsonObject.getString(STATUS));
            switch (status) {
                case OK:
                    if (jsonObject.has(RESULTS)) {
                        return parseResults(maxResults, parseAddressComponents, jsonObject);
                    }
                    return new ArrayList<>();

                case ZERO_RESULTS:
                    return new ArrayList<>();

                default:
                    final GeocoderException e = GeocoderException.forStatus(status);
                    try {
                        if (jsonObject.has(ERROR_MESSAGE)) {
                            e.setErrorMessage(jsonObject.getString(ERROR_MESSAGE));
                        }
                    } catch (JSONException ignored) {
                    }
                    throw e;
            }
        } catch (JSONException e) {
            throw new GeocoderException(e);
        }
    }
947509
public Geometry parseGeometry(JsonParser jsParser) throws IOException, SQLException {        
        jsParser.nextToken(); // START_OBJECT {        
        jsParser.nextToken(); // FIELD_NAME type     
        jsParser.nextToken(); // VALUE_STRING Point or whatever supported
        String geomType = jsParser.getText();
        if (geomType.equalsIgnoreCase(GeoJsonField.POINT)) {
            return parsePoint(jsParser);
        } else if (geomType.equalsIgnoreCase(GeoJsonField.MULTIPOINT)) {
            return parseMultiPoint(jsParser);
        } else if (geomType.equalsIgnoreCase(GeoJsonField.LINESTRING)) {
            return parseLinestring(jsParser);
        } else if (geomType.equalsIgnoreCase(GeoJsonField.MULTILINESTRING)) {
            return parseMultiLinestring(jsParser);
        } else if (geomType.equalsIgnoreCase(GeoJsonField.POLYGON)) {
            return parsePolygon(jsParser);
        } else if (geomType.equalsIgnoreCase(GeoJsonField.MULTIPOLYGON)) {
            return parseMultiPolygon(jsParser);
        } else if (geomType.equalsIgnoreCase(GeoJsonField.GEOMETRYCOLLECTION)) {
            return parseGeometryCollection(jsParser);
        } else {
            throw new SQLException("Unsupported geometry : " + geomType);
        }
    }
856882
private int parseOffsetDefaultLocalizedGMT(String text, int start, int[] parsedLen) {
        int idx = start;
        int offset = 0;
        int parsed = 0;
        do {
            // check global default GMT alternatives
            int gmtLen = 0;
            for (String gmt : ALT_GMT_STRINGS) {
                int len = gmt.length();
                if (text.regionMatches(true, idx, gmt, 0, len)) {
                    gmtLen = len;
                    break;
                }
            }
            if (gmtLen == 0) {
                break;
            }
            idx += gmtLen;

            // offset needs a sign char and a digit at minimum
            if (idx + 1 >= text.length()) {
                break;
            }

            // parse sign
            int sign = 1;
            char c = text.charAt(idx);
            if (c == '+') {
                sign = 1;
            } else if (c == '-') {
                sign = -1;
            } else {
                break;
            }
            idx++;

            // offset part
            // try the default pattern with the separator first
            int[] lenWithSep = {0};
            int offsetWithSep = parseDefaultOffsetFields(text, idx, DEFAULT_GMT_OFFSET_SEP, lenWithSep);
            if (lenWithSep[0] == text.length() - idx) {
                // maximum match
                offset = offsetWithSep * sign;
                idx += lenWithSep[0];
            } else {
                // try abutting field pattern
                int[] lenAbut = {0};
                int offsetAbut = parseAbuttingOffsetFields(text, idx, lenAbut);

                if (lenWithSep[0] > lenAbut[0]) {
                    offset = offsetWithSep * sign;
                    idx += lenWithSep[0];
                } else {
                    offset = offsetAbut * sign;
                    idx += lenAbut[0];
                }
            }
            parsed = idx - start;
        } while (false);

        parsedLen[0] = parsed;
        return offset;
    }
890444
private Point parsePoint(JsonParser jp) throws IOException, SQLException {
        jp.nextToken(); // FIELD_NAME coordinates        
        String coordinatesField = jp.getText();
        if (coordinatesField.equalsIgnoreCase(GeoJsonField.COORDINATES)) {
            jp.nextToken(); // START_ARRAY [ to parse the coordinate
            Point point = GF.createPoint(parseCoordinate(jp));
            jp.nextToken();
            return point;
        } else {
            throw new SQLException("Malformed GeoJSON file. Expected 'coordinates', found '" + coordinatesField + "'");
        }
    }
882345
def parse_elements(elements):
        
        if not len(elements) in (6, 7):
            raise ValueError('Invalid GLL position data')
        # Latitude and longitude are checked for validity during Fix
        # instantiation
        latitude = parse_latitude(elements[0], elements[1])
        longitude = parse_longitude(elements[2], elements[3])
        hour, minute, second = [int(elements[4][i:i + 2])
                                for i in range(0, 6, 2)]
        usecond = int(elements[4][6:8]) * 10000
        time = datetime.time(hour, minute, second, usecond)
        active = True if elements[5] == 'A' else False
        mode = elements[6] if len(elements) == 7 else None
        return LoranPosition(latitude, longitude, time, active, mode)
787653
public ParsePosition toParsePosition() {
        ParsePosition pp = new ParsePosition(textIndex);
        pp.setErrorIndex(textErrorIndex);
        return pp;
    }
1108329
private void parse() throws ParserException {
		//skip white spaces
		skipWhitespace();
		try{
			_parse();
		}catch(Exception e){
			System.out.println("\t" + this.getClass().getSimpleName() + "->" + this.toString());
			if(!(e instanceof ParserException)){
				throw new ParserException("Error parsing", e);
			}else{
				throw (ParserException)e;
			}
		}
		skipWhitespace();
	}
903481
def latitude(self, latitude):
        """"""
        if not (-90 <= latitude <= 90):
            raise ValueError('latitude was {}, but has to be in [-90, 90]'
                             .format(latitude))
        self._latitude = latitude
639154
public String parseString(String name) {
        String property = getProperties().getProperty(name);
        if (property == null) {
            throw new NullPointerException();
        }
        return property;
    }
1238409
private String parseExemplarLocation(String text, ParsePosition pos) {
        int startIdx = pos.getIndex();
        int parsedPos = -1;
        String tzID = null;

        EnumSet<NameType> nameTypes = EnumSet.of(NameType.EXEMPLAR_LOCATION);
        Collection<MatchInfo> exemplarMatches = _tznames.find(text, startIdx, nameTypes);
        if (exemplarMatches != null) {
            MatchInfo exemplarMatch = null;
            for (MatchInfo match : exemplarMatches) {
                if (startIdx + match.matchLength() > parsedPos) {
                    exemplarMatch = match;
                    parsedPos = startIdx + match.matchLength();
                }
            }
            if (exemplarMatch != null) {
                tzID = getTimeZoneID(exemplarMatch.tzID(), exemplarMatch.mzID());
                pos.setIndex(parsedPos);
            }
        }
        if (tzID == null) {
            pos.setErrorIndex(startIdx);
        }

        return tzID;
    }
975961
private void parsePointMetadata(JsonParser jp) throws IOException, SQLException {
        jp.nextToken(); // FIELD_NAME coordinates        
        String coordinatesField = jp.getText();
        if (coordinatesField.equalsIgnoreCase(GeoJsonField.COORDINATES)) {
            jp.nextToken(); // START_ARRAY [ to parse the coordinate
            parseCoordinateMetadata(jp);            
        } else {
            throw new SQLException("Malformed GeoJSON file. Expected 'coordinates', found '" + coordinatesField + "'");
        }
    }
1093231
public static Instant toInstant(String dateTimeString) throws ParseException {

        if (dateTimeString == null) {
            return (null);
        }

        dateTimeString = dateTimeString.trim();

        if (dateTimeString.endsWith("Z")) {
            return (Instant.parse(dateTimeString));
        } else {

            // Convert UTC zoned dates to 0 offset date
            if (dateTimeString.endsWith("UTC")) {
                dateTimeString = dateTimeString.replace("UTC", "+0000");
            }

            OffsetDateTime odt = (dateTimeString.length() > 25 ?
                OffsetDateTime.parse(dateTimeString, ODT_WITH_MSEC_PARSER) :
                OffsetDateTime.parse(dateTimeString, ODT_PARSER));

            return (odt.toInstant());
        }
    }
272952
public Location parse(String locationString) throws ParserException {
		featureGlobalStart = Integer.MAX_VALUE;
		featureGlobalEnd = 1;

		Location l;
		List<Location> ll = parseLocationString(locationString, 1);

		if (ll.size() == 1) {
			l = ll.get(0);
		} else {
			l = new SimpleLocation(
					featureGlobalStart,
					featureGlobalEnd,
					Strand.UNDEFINED,
					ll);
		}
		return l;
	}