本文整理汇总了Java中mil.nga.wkb.geom.MultiLineString.getLineStrings方法的典型用法代码示例。如果您正苦于以下问题:Java MultiLineString.getLineStrings方法的具体用法?Java MultiLineString.getLineStrings怎么用?Java MultiLineString.getLineStrings使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mil.nga.wkb.geom.MultiLineString
的用法示例。
在下文中一共展示了MultiLineString.getLineStrings方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: convertMultiLineString
import mil.nga.wkb.geom.MultiLineString; //导入方法依赖的package包/类
/**
* Test the MultiLineString conversion
*
* @param converter
* @param multiLineString
*/
private static void convertMultiLineString(
GoogleMapShapeConverter converter, MultiLineString multiLineString) {
MultiPolylineOptions polylines = converter.toPolylines(multiLineString);
TestCase.assertNotNull(polylines);
TestCase.assertFalse(polylines.getPolylineOptions().isEmpty());
List<LineString> lineStrings = multiLineString.getLineStrings();
compareLineStringsAndPolylines(converter, lineStrings,
polylines.getPolylineOptions());
MultiLineString multiLineString2 = converter
.toMultiLineStringFromOptions(polylines);
compareLineStrings(lineStrings, multiLineString2.getLineStrings());
}
示例2: toPolylines
import mil.nga.wkb.geom.MultiLineString; //导入方法依赖的package包/类
/**
* Convert a {@link MultiLineString} to a {@link MultiPolylineOptions}
*
* @param multiLineString
* @return
*/
public MultiPolylineOptions toPolylines(MultiLineString multiLineString) {
MultiPolylineOptions polylines = new MultiPolylineOptions();
for (LineString lineString : multiLineString.getLineStrings()) {
PolylineOptions polyline = toPolyline(lineString);
polylines.add(polyline);
}
return polylines;
}
示例3: validateMultiLineString
import mil.nga.wkb.geom.MultiLineString; //导入方法依赖的package包/类
/**
* Validate Multi Line String
*
* @param topGeometry
* @param multiLineString
*/
private static void validateMultiLineString(Geometry topGeometry,
MultiLineString multiLineString) {
TestCase.assertEquals(GeometryType.MULTILINESTRING,
multiLineString.getGeometryType());
validateZAndM(topGeometry, multiLineString);
for (LineString lineString : multiLineString.getLineStrings()) {
validateLineString(topGeometry, lineString);
}
}
示例4: transform
import mil.nga.wkb.geom.MultiLineString; //导入方法依赖的package包/类
/**
* Transform the projected multi line string
*
* @param multiLineString
* @return projected multi line string
*/
public MultiLineString transform(MultiLineString multiLineString) {
MultiLineString to = new MultiLineString(multiLineString.hasZ(),
multiLineString.hasM());
for (LineString lineString : multiLineString.getLineStrings()) {
LineString toLineString = transform(lineString);
to.addLineString(toLineString);
}
return to;
}
示例5: addMultiLineStringMessage
import mil.nga.wkb.geom.MultiLineString; //导入方法依赖的package包/类
/**
* Add MultiLineString
*
* @param envelope
* @param multiLineString
*/
private static void addMultiLineStringMessage(GeometryEnvelope envelope,
MultiLineString multiLineString) {
updateHasZandM(envelope, multiLineString);
List<LineString> lineStrings = multiLineString.getLineStrings();
for (LineString lineString : lineStrings) {
addLineStringMessage(envelope, lineString);
}
}
示例6: addMultiLineStringMessage
import mil.nga.wkb.geom.MultiLineString; //导入方法依赖的package包/类
/**
* Add MultiLineString message
*
* @param message
* @param multiLineString
*/
private static void addMultiLineStringMessage(StringBuilder message,
MultiLineString multiLineString) {
message.append(LineString.class.getSimpleName() + "s: "
+ multiLineString.numLineStrings());
List<LineString> lineStrings = multiLineString.getLineStrings();
for (int i = 0; i < lineStrings.size(); i++) {
LineString lineString = lineStrings.get(i);
message.append("\n\n");
message.append(LineString.class.getSimpleName() + " " + (i + 1));
message.append("\n");
addLineStringMessage(message, lineString);
}
}
示例7: getMultiLineString
import mil.nga.wkb.geom.MultiLineString; //导入方法依赖的package包/类
/**
* Get MultiLineString object
*
* @param multiLineString
* @return multi line string object
*/
private static Object getMultiLineString(MultiLineString multiLineString) {
List<Object> jsonObject = new ArrayList<>();
List<LineString> lineStrings = multiLineString.getLineStrings();
for (int i = 0; i < lineStrings.size(); i++) {
LineString lineString = lineStrings.get(i);
jsonObject.add(getLineString(lineString));
}
return jsonObject;
}
示例8: writeMultiLineString
import mil.nga.wkb.geom.MultiLineString; //导入方法依赖的package包/类
/**
* Write a Multi Line String
*
* @param writer
* @param multiLineString
* @throws IOException
*/
public static void writeMultiLineString(ByteWriter writer,
MultiLineString multiLineString) throws IOException {
writer.writeInt(multiLineString.numLineStrings());
for (LineString lineString : multiLineString.getLineStrings()) {
writeGeometry(writer, lineString);
}
}
示例9: toPolylines
import mil.nga.wkb.geom.MultiLineString; //导入方法依赖的package包/类
/**
* Convert a {@link MultiLineString} to a {@link MultiPolylineOptions}
*
* @param multiLineString
* @return
*/
public List<Polyline> toPolylines(MultiLineString multiLineString) {
List<Polyline> lines = new ArrayList<>();
for (LineString lineString : multiLineString.getLineStrings()) {
Polyline polyline = toPolyline(lineString);
lines.add(polyline);
}
return lines;
}
示例10: minimize
import mil.nga.wkb.geom.MultiLineString; //导入方法依赖的package包/类
/**
* Minimize the multi line string
*
* @param multiLineString
* multi line string
* @param maxX
* max positive x value in the geometry projection
*/
private static void minimize(MultiLineString multiLineString, double maxX) {
List<LineString> lineStrings = multiLineString.getLineStrings();
for (LineString lineString : lineStrings) {
minimize(lineString, maxX);
}
}
示例11: normalize
import mil.nga.wkb.geom.MultiLineString; //导入方法依赖的package包/类
/**
* Normalize the multi line string
*
* @param multiLineString
* multi line string
* @param maxX
* max positive x value in the geometry projection
*/
private static void normalize(MultiLineString multiLineString, double maxX) {
List<LineString> lineStrings = multiLineString.getLineStrings();
for (LineString lineString : lineStrings) {
normalize(lineString, maxX);
}
}