/** * fluent setter * @see #setCoordinates(List<Coordinate>) * * @param coordinates * required parameter */ public LineString withCoordinates(final List<Coordinate> coordinates) { this.setCoordinates(coordinates); return this; }
/** * Create an instance of {@link LineString} * */ public static LineString createLineString() { return new LineString(); }
/** * fluent setter * @see #setAltitudeMode(Object) * * @param altitudeMode * required parameter */ public LineString withAltitudeMode(final AltitudeMode altitudeMode) { this.setAltitudeMode(altitudeMode); return this; }
public void applyExtrusion(de.micromata.opengis.kml.v_2_2_0.Geometry kmlGeometry) { if(kmlGeometry instanceof de.micromata.opengis.kml.v_2_2_0.Polygon) { de.micromata.opengis.kml.v_2_2_0.Polygon polygon = (de.micromata.opengis.kml.v_2_2_0.Polygon) kmlGeometry; polygon.setExtrude(extrudeEnabled); polygon.setAltitudeMode(AltitudeMode.RELATIVE_TO_GROUND); } else if(kmlGeometry instanceof de.micromata.opengis.kml.v_2_2_0.LinearRing) { de.micromata.opengis.kml.v_2_2_0.LinearRing ring = (de.micromata.opengis.kml.v_2_2_0.LinearRing) kmlGeometry; ring.setExtrude(extrudeEnabled); ring.setTessellate(true); ring.setAltitudeMode(AltitudeMode.RELATIVE_TO_GROUND); } else if(kmlGeometry instanceof de.micromata.opengis.kml.v_2_2_0.LineString) { de.micromata.opengis.kml.v_2_2_0.LineString ls = (de.micromata.opengis.kml.v_2_2_0.LineString) kmlGeometry; ls.setExtrude(extrudeEnabled); ls.setTessellate(true); ls.setAltitudeMode(AltitudeMode.RELATIVE_TO_GROUND); } else if(kmlGeometry instanceof de.micromata.opengis.kml.v_2_2_0.Point) { de.micromata.opengis.kml.v_2_2_0.Point point = (de.micromata.opengis.kml.v_2_2_0.Point) kmlGeometry; point.setExtrude(extrudeEnabled); point.setAltitudeMode(AltitudeMode.RELATIVE_TO_GROUND); } else if(kmlGeometry instanceof MultiGeometry) { de.micromata.opengis.kml.v_2_2_0.MultiGeometry mg = (de.micromata.opengis.kml.v_2_2_0.MultiGeometry) kmlGeometry; for(de.micromata.opengis.kml.v_2_2_0.Geometry g : mg.getGeometry()) { applyExtrusion(g); } } }
return convertLinearRing((LinearRing) geometry); } else if (geometry instanceof LineString) { de.micromata.opengis.kml.v_2_2_0.LineString kmlLine = new de.micromata.opengis.kml.v_2_2_0.LineString(); List<de.micromata.opengis.kml.v_2_2_0.Coordinate> kmlCoordinates = dumpCoordinateSequence(((LineString) geometry) .getCoordinateSequence()); kmlLine.setCoordinates(kmlCoordinates); return kmlLine; } else if (geometry instanceof Polygon) {
.withDescription(htmlDescription).withVisibility(true) .withStyleUrl("#" + styleID).createAndSetLineString() .withAltitudeMode(AltitudeMode.CLAMP_TO_GROUND) .setCoordinates(coordsList);
@Override public LineString clone() { LineString copy; copy = ((LineString) super.clone()); copy.coordinates = new ArrayList<Coordinate>((getCoordinates().size())); for (Coordinate iter: coordinates) { copy.coordinates.add(iter.clone()); } copy.lineStringSimpleExtension = new ArrayList<Object>((getLineStringSimpleExtension().size())); for (Object iter: lineStringSimpleExtension) { copy.lineStringSimpleExtension.add(iter); } copy.lineStringObjectExtension = new ArrayList<AbstractObject>((getLineStringObjectExtension().size())); for (AbstractObject iter: lineStringObjectExtension) { copy.lineStringObjectExtension.add(iter.clone()); } return copy; }
/** * fluent setter * @see #setExtrude(Boolean) * * @param extrude * required parameter */ public LineString withExtrude(final Boolean extrude) { this.setExtrude(extrude); return this; }
/** * fluent setter * @see #setTessellate(Boolean) * * @param tessellate * required parameter */ public LineString withTessellate(final Boolean tessellate) { this.setTessellate(tessellate); return this; }
/** * add a value to the coordinates property collection * * @param coordinates * required parameter * @return * <tt>true</tt> (as general contract of <tt>Collection.add</tt>). */ public LineString addToCoordinates(final String coordinates) { this.getCoordinates().add(new Coordinate(coordinates)); return this; }
/** * add a value to the lineStringSimpleExtension property collection * * @param lineStringSimpleExtension * Objects of the following type are allowed in the list: {@link Object} * @return * <tt>true</tt> (as general contract of <tt>Collection.add</tt>). */ public LineString addToLineStringSimpleExtension(final Object lineStringSimpleExtension) { this.getLineStringSimpleExtension().add(lineStringSimpleExtension); return this; }
/** * add a value to the lineStringObjectExtension property collection * * @param lineStringObjectExtension * Objects of the following type are allowed in the list: {@link AbstractObject} * @return * <tt>true</tt> (as general contract of <tt>Collection.add</tt>). */ public LineString addToLineStringObjectExtension(final AbstractObject lineStringObjectExtension) { this.getLineStringObjectExtension().add(lineStringObjectExtension); return this; }
/** * fluent setter * @see #setLineStringObjectExtension(List<AbstractObject>) * * @param lineStringObjectExtension * required parameter */ public LineString withLineStringObjectExtension(final List<AbstractObject> lineStringObjectExtension) { this.setLineStringObjectExtension(lineStringObjectExtension); return this; }
.withDescription(line.getHTMLDescription()) .withVisibility(true).createAndSetLineString() .withAltitudeMode(AltitudeMode.CLAMP_TO_GROUND) .setCoordinates(line.getCoordinatesList());
@Override public LineString clone() { LineString copy; copy = ((LineString) super.clone()); copy.coordinates = new ArrayList<Coordinate>((getCoordinates().size())); for (Coordinate iter: coordinates) { copy.coordinates.add(iter.clone()); } copy.lineStringSimpleExtension = new ArrayList<Object>((getLineStringSimpleExtension().size())); for (Object iter: lineStringSimpleExtension) { copy.lineStringSimpleExtension.add(iter); } copy.lineStringObjectExtension = new ArrayList<AbstractObject>((getLineStringObjectExtension().size())); for (AbstractObject iter: lineStringObjectExtension) { copy.lineStringObjectExtension.add(iter.clone()); } return copy; }
/** * fluent setter * @see #setExtrude(Boolean) * * @param extrude * required parameter */ public LineString withExtrude(final Boolean extrude) { this.setExtrude(extrude); return this; }
/** * fluent setter * @see #setTessellate(Boolean) * * @param tessellate * required parameter */ public LineString withTessellate(final Boolean tessellate) { this.setTessellate(tessellate); return this; }
/** * add a value to the coordinates property collection * * @param coordinates * required parameter * @return * <tt>true</tt> (as general contract of <tt>Collection.add</tt>). */ public LineString addToCoordinates(final String coordinates) { this.getCoordinates().add(new Coordinate(coordinates)); return this; }
/** * add a value to the lineStringSimpleExtension property collection * * @param lineStringSimpleExtension * Objects of the following type are allowed in the list: {@link Object} * @return * <tt>true</tt> (as general contract of <tt>Collection.add</tt>). */ public LineString addToLineStringSimpleExtension(final Object lineStringSimpleExtension) { this.getLineStringSimpleExtension().add(lineStringSimpleExtension); return this; }
/** * add a value to the lineStringObjectExtension property collection * * @param lineStringObjectExtension * Objects of the following type are allowed in the list: {@link AbstractObject} * @return * <tt>true</tt> (as general contract of <tt>Collection.add</tt>). */ public LineString addToLineStringObjectExtension(final AbstractObject lineStringObjectExtension) { this.getLineStringObjectExtension().add(lineStringObjectExtension); return this; }