當前位置: 首頁>>代碼示例>>Java>>正文


Java GeometryFactory.createMultiLineString方法代碼示例

本文整理匯總了Java中com.vividsolutions.jts.geom.GeometryFactory.createMultiLineString方法的典型用法代碼示例。如果您正苦於以下問題:Java GeometryFactory.createMultiLineString方法的具體用法?Java GeometryFactory.createMultiLineString怎麽用?Java GeometryFactory.createMultiLineString使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.vividsolutions.jts.geom.GeometryFactory的用法示例。


在下文中一共展示了GeometryFactory.createMultiLineString方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: nodeLines

import com.vividsolutions.jts.geom.GeometryFactory; //導入方法依賴的package包/類
public Collection<Geometry> nodeLines(final Collection<Geometry> lines) {
	final GeometryFactory gf = new GeometryFactory();
	final Geometry linesGeom = gf.createMultiLineString(GeometryFactory
			.toLineStringArray(lines));
	Geometry unionInput = gf.createMultiLineString(null);
	final Geometry point = extractPoint(lines);
	if (point != null)
		unionInput = point;

	final Geometry noded = linesGeom.union(unionInput);
	final List<Geometry> nodedList = new ArrayList<Geometry>();
	nodedList.add(noded);
	return nodedList;
}
 
開發者ID:geowe,項目名稱:sig-seguimiento-vehiculos,代碼行數:15,代碼來源:LineNoder.java

示例2: smoothMultiLineString

import com.vividsolutions.jts.geom.GeometryFactory; //導入方法依賴的package包/類
private static Geometry smoothMultiLineString(GeometryFactory factory,
        GeometrySmoother smoother, Geometry geom, double fit) {

    final int N = geom.getNumGeometries();
    LineString[] smoothed = new LineString[N];

    for (int i = 0; i < N; i++) {
        smoothed[i] = (LineString) smoothLineString(factory, smoother, geom.getGeometryN(i),
                fit);
    }

    return factory.createMultiLineString(smoothed);
}
 
開發者ID:GIScience,項目名稱:openrouteservice,代碼行數:14,代碼來源:JTS.java

示例3: lines

import com.vividsolutions.jts.geom.GeometryFactory; //導入方法依賴的package包/類
public static Geometry lines(List<LineString> lineStrings,
                             GeometryFactory factory) {
    if (lineStrings.size() == 1) {
        return lineStrings.get(0);
    }
    return factory.createMultiLineString(lineStrings
            .toArray(new LineString[lineStrings.size()]));
}
 
開發者ID:gegy1000,項目名稱:Earth,代碼行數:9,代碼來源:GeometryUtil.java

示例4: getEdges

import com.vividsolutions.jts.geom.GeometryFactory; //導入方法依賴的package包/類
/**
 * Gets the geometry for the edges in the subdivision as a {@link MultiLineString}
 * containing 2-point lines.
 *
 * @param geomFact the GeometryFactory to use
 * @return a MultiLineString
 */
public Geometry getEdges(GeometryFactory geomFact) {
    List quadEdges = this.getPrimaryEdges(false);
    LineString[] edges = new LineString[quadEdges.size()];
    int i = 0;
    for (Object quadEdge : quadEdges) {
        QuadEdge qe = (QuadEdge) quadEdge;
        edges[i++] = geomFact.createLineString(new Coordinate[] {
                qe.orig().getCoordinate(), qe.dest().getCoordinate() });
    }
    return geomFact.createMultiLineString(edges);
}
 
開發者ID:gegy1000,項目名稱:Earth,代碼行數:19,代碼來源:QuadEdgeSubdivision.java

示例5: createMultiLineString

import com.vividsolutions.jts.geom.GeometryFactory; //導入方法依賴的package包/類
public static MultiLineString createMultiLineString(
        List<LineString> lineStrings, GeometryFactory factory) {
    LineString[] strings = lineStrings.toArray(new LineString[lineStrings
            .size()]);
    return factory.createMultiLineString(strings);
}
 
開發者ID:gegy1000,項目名稱:Earth,代碼行數:7,代碼來源:GeometryUtil.java


注:本文中的com.vividsolutions.jts.geom.GeometryFactory.createMultiLineString方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。