Revision 11484 trunk/libraries/libGPE-KML/src/org/gvsig/gpe/kml/writer/geometries/OuterBoundaryIsWriter.java
OuterBoundaryIsWriter.java | ||
---|---|---|
49 | 49 |
* |
50 | 50 |
* $Id$ |
51 | 51 |
* $Log$ |
52 |
* Revision 1.1 2007-04-14 16:08:07 jorpiell |
|
52 |
* Revision 1.2 2007-05-08 07:53:08 jorpiell |
|
53 |
* Add comments to the writers |
|
54 |
* |
|
55 |
* Revision 1.1 2007/04/14 16:08:07 jorpiell |
|
53 | 56 |
* Kml writing support added |
54 | 57 |
* |
55 | 58 |
* |
56 | 59 |
*/ |
57 | 60 |
/** |
61 |
* It writes the outerBoundary tag. Example: |
|
62 |
* <p> |
|
63 |
* <pre> |
|
64 |
* <code> |
|
65 |
* <outerBoundaryIs> |
|
66 |
* <LinearRing> |
|
67 |
* <coordinates>10.0,10.0 10.0,40.0 40.0,40.0 40.0,10.0 10.0,10.0</coordinates> |
|
68 |
* </LinearRing> |
|
69 |
* </outerBoundaryIs> |
|
70 |
* </code> |
|
71 |
* </pre> |
|
72 |
* </p> |
|
58 | 73 |
* @author Jorge Piera LLodr? (jorge.piera@iver.es) |
74 |
* @see http://code.google.com/apis/kml/documentation/kml_tags_21.html#outerboundaryis |
|
59 | 75 |
*/ |
60 | 76 |
public class OuterBoundaryIsWriter { |
61 |
public static void start(Writer writer,double[] x, double[] y, |
|
62 |
double[] z) throws IOException{ |
|
77 |
|
|
78 |
/** |
|
79 |
* It writes the outerBoundaryIs kml init tag |
|
80 |
* @param writer |
|
81 |
* Writer to write the labels |
|
82 |
* @param longitudes |
|
83 |
* Array of longitudes (>= -180 and <= 180) |
|
84 |
* @param latitudes |
|
85 |
* Array of latitudes (>= -90 and <= 90) |
|
86 |
* @param altitudes |
|
87 |
* Array of altitudes (Meters above sea level) |
|
88 |
* @throws IOException |
|
89 |
*/ |
|
90 |
public static void start(Writer writer,double[] longitudes, double[] latitudes, |
|
91 |
double[] altitudes) throws IOException{ |
|
63 | 92 |
writer.write("\n"); |
64 | 93 |
writer.write("<" + KmlTags.OUTERBOUNDARYIS + ">"); |
65 |
LinearRingWriter.start(writer, x, y, z);
|
|
94 |
LinearRingWriter.start(writer, longitudes, latitudes, altitudes);
|
|
66 | 95 |
} |
67 | 96 |
|
97 |
/** |
|
98 |
* It writes the outerBoundaryIs end tag |
|
99 |
* @param writer |
|
100 |
* Writer to write the labels |
|
101 |
* @throws IOException |
|
102 |
*/ |
|
68 | 103 |
public static void end(Writer writer) throws IOException{ |
69 | 104 |
LinearRingWriter.end(writer); |
70 | 105 |
writer.write("\n"); |
Also available in: Unified diff