root / trunk / libraries / libGPE-GML / src / org / gvsig / gpe / gml / writer / geometries / OuterBoundaryIsWriter.java @ 11621
History | View | Annotate | Download (3.37 KB)
1 | 11158 | jorpiell | package org.gvsig.gpe.gml.writer.geometries; |
---|---|---|---|
2 | |||
3 | import java.io.IOException; |
||
4 | 11621 | jorpiell | |
5 | import org.gvsig.gpe.GPEErrorHandler; |
||
6 | 11210 | jorpiell | import org.gvsig.gpe.xml.writer.Writer; |
7 | 11158 | jorpiell | |
8 | import org.gvsig.gpe.gml.GMLTags; |
||
9 | |||
10 | /* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
|
||
11 | *
|
||
12 | * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
|
||
13 | *
|
||
14 | * This program is free software; you can redistribute it and/or
|
||
15 | * modify it under the terms of the GNU General Public License
|
||
16 | * as published by the Free Software Foundation; either version 2
|
||
17 | * of the License, or (at your option) any later version.
|
||
18 | *
|
||
19 | * This program is distributed in the hope that it will be useful,
|
||
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
22 | * GNU General Public License for more details.
|
||
23 | *
|
||
24 | * You should have received a copy of the GNU General Public License
|
||
25 | * along with this program; if not, write to the Free Software
|
||
26 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA.
|
||
27 | *
|
||
28 | * For more information, contact:
|
||
29 | *
|
||
30 | * Generalitat Valenciana
|
||
31 | * Conselleria d'Infraestructures i Transport
|
||
32 | * Av. Blasco Ib??ez, 50
|
||
33 | * 46010 VALENCIA
|
||
34 | * SPAIN
|
||
35 | *
|
||
36 | * +34 963862235
|
||
37 | * gvsig@gva.es
|
||
38 | * www.gvsig.gva.es
|
||
39 | *
|
||
40 | * or
|
||
41 | *
|
||
42 | * IVER T.I. S.A
|
||
43 | * Salamanca 50
|
||
44 | * 46005 Valencia
|
||
45 | * Spain
|
||
46 | *
|
||
47 | * +34 963163400
|
||
48 | * dac@iver.es
|
||
49 | */
|
||
50 | /* CVS MESSAGES:
|
||
51 | *
|
||
52 | * $Id$
|
||
53 | * $Log$
|
||
54 | 11621 | jorpiell | * Revision 1.7 2007-05-14 11:18:12 jorpiell
|
55 | * Add the ErrorHandler to all the methods
|
||
56 | *
|
||
57 | * Revision 1.6 2007/05/08 10:24:16 jorpiell
|
||
58 | 11489 | jorpiell | * Add comments to create javadocs
|
59 | *
|
||
60 | * Revision 1.5 2007/04/14 16:07:30 jorpiell
|
||
61 | 11210 | jorpiell | * The writer has been created
|
62 | *
|
||
63 | * Revision 1.4 2007/04/13 13:16:00 jorpiell
|
||
64 | 11204 | jorpiell | * Add the multiple geometries
|
65 | *
|
||
66 | * Revision 1.3 2007/04/12 11:36:15 jorpiell
|
||
67 | 11163 | jorpiell | * Added new geometry writers
|
68 | *
|
||
69 | * Revision 1.2 2007/04/12 10:35:04 jorpiell
|
||
70 | 11161 | jorpiell | * Add the innerboundaryIs
|
71 | *
|
||
72 | * Revision 1.1 2007/04/12 10:23:41 jorpiell
|
||
73 | 11158 | jorpiell | * Add some writers and the GPEXml parser
|
74 | *
|
||
75 | *
|
||
76 | */
|
||
77 | /**
|
||
78 | 11489 | jorpiell | * It writes a gml:outerBoundaryType object. Example:
|
79 | * <p>
|
||
80 | * <pre>
|
||
81 | * <code>
|
||
82 | * <outerBoundaryIs>
|
||
83 | * <LinearRing>
|
||
84 | * <coordinates>10.0,10.0 10.0,40.0 40.0,40.0 40.0,10.0 10.0,10.0</coordinates>
|
||
85 | * </LinearRing>
|
||
86 | * </outerBoundaryIs>
|
||
87 | * </code>
|
||
88 | * </pre>
|
||
89 | * </p>
|
||
90 | 11158 | jorpiell | * @author Jorge Piera LLodr? (jorge.piera@iver.es)
|
91 | */
|
||
92 | public class OuterBoundaryIsWriter { |
||
93 | |||
94 | 11489 | jorpiell | /**
|
95 | * It writes a gml:outerBoundaryIs init tag
|
||
96 | * @param writer
|
||
97 | * Writer to write the labels
|
||
98 | 11621 | jorpiell | * @param errorHandler
|
99 | * To add the errors
|
||
100 | 11489 | jorpiell | * @param x
|
101 | * X coordinates
|
||
102 | * @param y
|
||
103 | * Y coordinates
|
||
104 | * @param z
|
||
105 | * Z coordinates
|
||
106 | * @throws IOException
|
||
107 | */
|
||
108 | 11621 | jorpiell | public static void start(Writer writer, GPEErrorHandler errorHandler,double[] x, double[] y, |
109 | 11161 | jorpiell | double[] z) throws IOException{ |
110 | 11204 | jorpiell | writer.write("\n");
|
111 | 11163 | jorpiell | writer.write("<" +GMLTags.GML_NAMESPACE + ":" + GMLTags.GML_OUTERBOUNDARYIS + ">"); |
112 | 11621 | jorpiell | LinearRingWriter.start(writer, errorHandler, null, x, y, z, null); |
113 | 11158 | jorpiell | } |
114 | |||
115 | 11489 | jorpiell | /**
|
116 | * It writes a gml:outerBoundaryIs end tag
|
||
117 | * @param writer
|
||
118 | * Writer to write the labels
|
||
119 | 11621 | jorpiell | * @param errorHandler
|
120 | * To add the errors
|
||
121 | 11489 | jorpiell | * @throws IOException
|
122 | */
|
||
123 | 11621 | jorpiell | public static void end(Writer writer, GPEErrorHandler errorHandler) throws IOException{ |
124 | LinearRingWriter.end(writer, errorHandler); |
||
125 | 11204 | jorpiell | writer.write("\n");
|
126 | 11163 | jorpiell | writer.write("</" + GMLTags.GML_NAMESPACE + ":" + GMLTags.GML_OUTERBOUNDARYIS + ">"); |
127 | 11158 | jorpiell | } |
128 | } |