src/main/java/org/opensha/commons/data/region/CaliforniaRegions.java
private static LocationList readCoords(BufferedReader br) {
		try {
			LocationList ll = new LocationList();
			String[] vals;
	        String s;
	        while ((s = br.readLine()) != null) {
	        	vals = s.trim().split(",");
	        	double lat = Double.valueOf(vals[0]);
	        	double lon = Double.valueOf(vals[1]);
	        	// keep backwards compatibility
	        	Location loc = Location.backwardsCompatible(lat, lon, 0d);
	        	ll.add(loc);
	        }
	        br.close();
	        return ll;
		} catch (Exception e) {
			e.printStackTrace();
			return null;
		}
	}
/*
	 * Reads coordinate pairs from a file. Each line of the file should have
	 * a comma-delimited lat-ln pair e.g. 41.23,-117.89
	 */
Reads coordinate pairs from a file. Each line of the file should have
a comma-delimited lat-ln pair e.g.
Reads coordinate pairs from a file . Each line of the file should have a comma - delimited lat - ln pair e . g .
private static LocationList readCoords(BufferedReader br) {
		try {
			LocationList ll = new LocationList();
			String[] vals;
	        String s;
	        while ((s = br.readLine()) != null) {
	        	vals = s.trim().split(",");
	        	double lat = Double.valueOf(vals[0]);
	        	double lon = Double.valueOf(vals[1]);
	        	Location loc = Location.backwardsCompatible(lat, lon, 0d);
	        	ll.add(loc);
	        }
	        br.close();
	        return ll;
		} catch (Exception e) {
			e.printStackTrace();
			return null;
		}
	}
private static LocationList readCoords ( BufferedReader br ) { try { LocationList ll = new LocationList ( ) ; String [ ] vals ; String s ; while ( ( s = br . readLine ( ) ) != null ) { vals = s . trim ( ) . split ( "," ) ; double lat = Double . valueOf ( vals [ 0 ] ) ; double lon = Double . valueOf ( vals [ 1 ] ) ; Location loc = Location . backwardsCompatible ( lat , lon , 0d ) ; ll . add ( loc ) ; } br . close ( ) ; return ll ; } catch ( Exception e ) { e . printStackTrace ( ) ; return null ; } }
Reads coordinate pairs from a file.
Reads coordinate pairs from a file .
// keep backwards compatibility