/** * Extracts the linear components from a single geometry. * If more than one geometry is to be processed, it is more * efficient to create a single {@link ComponentCoordinateExtracter} instance * and pass it to multiple geometries. * * @param geom the Geometry from which to extract * @return a list of Coordinates */ public static List getCoordinates(Geometry geom) { List coords = new ArrayList(); geom.apply(new ComponentCoordinateExtracter(coords)); return coords; }