src/main/java/org/opensha/sha/earthquake/faultSysSolution/ruptures/util/GeoJSONFaultReader.java
public static List<GeoJSONFaultSection> readFaultSections(Reader reader) throws IOException {
		if (!(reader instanceof BufferedReader))
			reader = new BufferedReader(reader);
		FeatureCollection features = FeatureCollection.read(reader);
		
		List<GeoJSONFaultSection> ret = new ArrayList<>();
		
		HashSet<Integer> prevIDs = new HashSet<>();
		
		for (Feature feature : features.features) {
			GeoJSONFaultSection sect = GeoJSONFaultSection.fromFeature(feature);
			int id = sect.getSectionId();
			Preconditions.checkState(!prevIDs.contains(id), "Duplicate fault ID detected: %s", id);
			ret.add(sect);
			prevIDs.add(id);
		}
		reader.close();
		return ret;
	}
/**
	 * Loads all fault sections from the given GeoJSON.
	 *  
	 * @param reader
	 * @param includeSecondary
	 * @return
	 * @throws IOException
	 */
Loads all fault sections from the given GeoJSON.

@param reader
@param includeSecondary
@return
@throws IOException
Loads all fault sections from the given GeoJSON . @param reader @param includeSecondary @return @throws IOException
public static List<GeoJSONFaultSection> readFaultSections(Reader reader) throws IOException {
		if (!(reader instanceof BufferedReader))
			reader = new BufferedReader(reader);
		FeatureCollection features = FeatureCollection.read(reader);
		List<GeoJSONFaultSection> ret = new ArrayList<>();
		HashSet<Integer> prevIDs = new HashSet<>();
		for (Feature feature : features.features) {
			GeoJSONFaultSection sect = GeoJSONFaultSection.fromFeature(feature);
			int id = sect.getSectionId();
			Preconditions.checkState(!prevIDs.contains(id), "Duplicate fault ID detected: %s", id);
			ret.add(sect);
			prevIDs.add(id);
		}
		reader.close();
		return ret;
	}
public static List < GeoJSONFaultSection > readFaultSections ( Reader reader ) throws IOException { if ( ! ( reader instanceof BufferedReader ) ) reader = new BufferedReader ( reader ) ; FeatureCollection features = FeatureCollection . read ( reader ) ; List < GeoJSONFaultSection > ret = new ArrayList < > ( ) ; HashSet < Integer > prevIDs = new HashSet < > ( ) ; for ( Feature feature : features . features ) { GeoJSONFaultSection sect = GeoJSONFaultSection . fromFeature ( feature ) ; int id = sect . getSectionId ( ) ; Preconditions . checkState ( ! prevIDs . contains ( id ) , "Duplicate fault ID detected: %s" , id ) ; ret . add ( sect ) ; prevIDs . add ( id ) ; } reader . close ( ) ; return ret ; }
Loads all fault sections from the given GeoJSON.
Loads all fault sections from the given GeoJSON .