Takes a folder with feature files in text format and converts them to binary.

@param featuresFolder
@param featureType
@param featureLength
@throws Exception
969611
public static void textToBinary(String featuresFolder, final String featureType, int featureLength)
			throws Exception {
		// read the folder containing the description files
		File dir = new File(featuresFolder);
		FilenameFilter filter = new FilenameFilter() {
			public boolean accept(File dir, String name) {
				if (name.endsWith("." + featureType))
					return true;
				else
					return false;
			}
		};
		String[] files = dir.list(filter);

		for (int i = 0; i < files.length; i++) {
			if (i % 100 == 0) {
				System.out.println("Converting file " + i);
			}
			BufferedReader in = new BufferedReader(new FileReader(new File(featuresFolder + files[i])));
			DataOutputStream out = new DataOutputStream(new BufferedOutputStream(new FileOutputStream(
					featuresFolder + files[i] + "b")));
			String line;
			while ((line = in.readLine()) != null) {
				String[] nums = line.split(",");
				for (int j = 0; j < featureLength; j++) {
					out.writeDouble(Double.parseDouble(nums[j]));
				}
			}
			in.close();
			out.close();
		}
	}
396797
public static ArrayList<double[]> readText(String featuresFileName, int featureLength) throws Exception {
		ArrayList<double[]> features = new ArrayList<double[]>();
		BufferedReader in = new BufferedReader(new FileReader(new File(featuresFileName)));

		String line;
		while ((line = in.readLine()) != null) {
			String[] stringVals = line.split(",");
			if (stringVals.length != featureLength) {
				in.close();
				throw new Exception("Line contains " + stringVals.length
						+ " comma separated values instead of " + featureLength + "\n" + line);
			}
			double[] vals = new double[featureLength];
			for (int j = 0; j < featureLength; j++) {
				vals[j] = Double.parseDouble(stringVals[j]);
			}
			features.add(vals);
		}
		in.close();
		return features;
	}
182377
@Api
	public void setFeatureModel(FeatureModel featureModel) throws LayerException {
		this.featureModel = featureModel;
		if (null != getLayerInfo()) {
			featureModel.setLayerInfo(getLayerInfo());
		}
		filterService.registerFeatureModel(featureModel);
	}
1052467
function(features) {
        if(!(OpenLayers.Util.isArray(features))) {
            features = [features];
        }
        var kml = this.createElementNS(this.kmlns, "kml");
        var folder = this.createFolderXML();
        for(var i=0, len=features.length; i<len; ++i) {
            folder.appendChild(this.createPlacemarkXML(features[i]));
        }
        kml.appendChild(folder);
        return OpenLayers.Format.XML.prototype.write.apply(this, [kml]);
    }
321093
public void loadRTreeIndex(FeatureTable featureTable) {
		loadRTreeIndex(featureTable.getTableName(), featureTable
				.getGeometryColumn().getName(), featureTable.getPkColumn()
				.getName());
	}
141513
protected void invokeFeature(String featureSwitch, Feature feature ) {
        if(Config.getBooleanProperty(featureSwitch,true)) {
            feature.execute();
        }
    }
590858
public static ArrayList<double[]> readBinary(String featuresFileName, int featureLength) throws Exception {
		ArrayList<double[]> features = new ArrayList<double[]>();
		DataInputStream in = new DataInputStream(new BufferedInputStream(
				new FileInputStream(featuresFileName)));

		int counter = 0;
		double[] desc = new double[featureLength];
		while (true) {
			try {
				desc[counter] = in.readDouble();
			} catch (EOFException e) {
				break;
			}
			counter++;
			if (counter == featureLength) {
				features.add(desc);
				counter = 0;
				desc = new double[featureLength];
			}
		}
		in.close();
		return features;
	}
42519
public void report(FeatureEnum name, EPUBLocation location, String value)
  {
    features.put(name, new Feature(name, location, value));
  }
417957
public static long getFileLength(String filePath) throws Exception {
        File file = new File(filePath);
        return file.length();
    }
414563
public static void writeText(String featuresFileName, double[][] features) throws Exception {
		BufferedWriter out = new BufferedWriter(new FileWriter(featuresFileName));
		for (double[] feature : features) {
			for (int j = 0; j < feature.length - 1; j++) {
				out.write(feature[j] + ",");
			}
			out.write(feature[feature.length - 1] + "\n");
		}
		out.close();
	}
150004
public static void writeBinary(String featuresFileName, double[][] features) throws Exception {
		DataOutputStream out = new DataOutputStream(new BufferedOutputStream(new FileOutputStream(
				featuresFileName)));
		for (int i = 0; i < features.length; i++) {
			for (int j = 0; j < features[i].length; j++) {
				out.writeDouble(features[i][j]);
			}
		}
		out.close();
	}
694515
static String getValue(final Map<String, Features> featureTable, final String extension) {
        final List<String> buf = new ArrayList<>();
        for (final Features f : featureTable.values()) {
            final List<String> v = f.getFeature(extension);
            if (v != null) {
                buf.addAll(v);
            }
        }
        if (buf.isEmpty()) {
            return null;
        } else {
            return StringUtils.join(buf, ",");
        }
    }
488698
@Override
    public FeatureEpicResult getIssues(Scope project) {
        Map<String, Epic> epicMap = new HashMap<>();
        FeatureEpicResult featureEpicResult = new FeatureEpicResult();

        String lookBackDate = getUpdatedSince(project.getLastCollected());

        String issueTypes = featureSettings.getJiraIssueTypeNames() == null ? DEFAULT_ISSUE_TYPES : String.join(",", featureSettings.getJiraIssueTypeNames());

        List<Feature> features = new ArrayList<>();

        boolean isLast = false;
        long startAt = 0;

        while (!isLast) {
            try {
                String url = featureSettings.getJiraBaseUrl() + (featureSettings.getJiraBaseUrl().endsWith("/") ? "" : "/")
                        + ISSUE_BY_PROJECT_REST_SUFFIX_BY_DATE;
                url = String.format(url, project.getpId(), issueTypes.replaceAll(",", "','"), lookBackDate, issueFields, startAt);

                IssueResult temp = getFeaturesFromQueryURL(url, epicMap, null);

                features.addAll(temp.getFeatures());
                isLast = temp.getTotal() == features.size() || CollectionUtils.isEmpty(temp.getFeatures());
                startAt += temp.getPageSize();
            } catch (ParseException pe) {
                LOGGER.error("Parser exception when parsing issue", pe);
            } catch (HygieiaException e) {
                LOGGER.error("Error in calling JIRA API", e);
            }
        }
        featureEpicResult.setFeatureList(features);
        featureEpicResult.getEpicList().addAll(epicMap.values());
        return featureEpicResult;
    }
571445
public void addFeatures(Collection<String> featuresToAdd) {
        if (featuresToAdd == null) return;
        for (String feature : featuresToAdd) {
            addFeature(feature);
        }
    }
808919
public void link(String featureTable, String tileTable) {

		if (!isLinked(featureTable, tileTable)) {
			getOrCreateExtension();

			try {
				if (!featureTileLinkDao.isTableExists()) {
					geoPackage.createFeatureTileLinkTable();
				}

				FeatureTileLink link = new FeatureTileLink();
				link.setFeatureTableName(featureTable);
				link.setTileTableName(tileTable);

				featureTileLinkDao.create(link);
			} catch (SQLException e) {
				throw new GeoPackageException(
						"Failed to create feature tile link for GeoPackage: "
								+ geoPackage.getName() + ", Feature Table: "
								+ featureTable + ", Tile Table: " + tileTable,
						e);
			}
		}
	}
1200151
protected void processLAandLI(File archive, RepositoryResourceWritable resource,
                                  ProvisioningFeatureDefinition feature) throws IOException, RepositoryException {
        String LAHeader = feature.getHeader(LA_HEADER_FEATURE);
        String LIHeader = feature.getHeader(LI_HEADER_FEATURE);
        processLAandLI(archive, resource, LAHeader, LIHeader);
    }
565056
private FeatureShape getFeatureShape(Map<Long, FeatureShape> featureIds, long featureId) {

        FeatureShape featureShape = featureIds.get(featureId);
        if (featureShape == null) {
            featureShape = new FeatureShape(featureId);
            featureIds.put(featureId, featureShape);
        }
        return featureShape;
    }