Statistics
| Revision:

root / trunk / libraries / libGPE-GML / src / org / gvsig / gpe / gml / writer / geometries / MultiPointWriter.java @ 11621

History | View | Annotate | Download (3.17 KB)

1
package org.gvsig.gpe.gml.writer.geometries;
2

    
3
import java.io.IOException;
4

    
5
import org.gvsig.gpe.GPEErrorHandler;
6
import org.gvsig.gpe.xml.writer.Writer;
7

    
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: MultiPointWriter.java 11621 2007-05-14 11:18:12Z jorpiell $
53
 * $Log$
54
 * Revision 1.4  2007-05-14 11:18:12  jorpiell
55
 * Add the ErrorHandler to all the methods
56
 *
57
 * Revision 1.3  2007/05/08 10:24:16  jorpiell
58
 * Add comments to create javadocs
59
 *
60
 * Revision 1.2  2007/04/14 16:07:30  jorpiell
61
 * The writer has been created
62
 *
63
 * Revision 1.1  2007/04/13 13:16:00  jorpiell
64
 * Add the multiple geometries
65
 *
66
 *
67
 */
68
/**
69
 * It writes a gml:MultiPointType object. Example:
70
 * <p>
71
 * <pre>
72
 * <code> 
73
 * &lt;MultiPoint gid="c731" srsName="http://www.opengis.net/gml/srs/epsg.xml#4326"&gt;
74
 * &lt;pointMember&gt;
75
 * &lt;Point gid="P6776"&gt;
76
 * &lt;coord&gt;&lt;X&gt;50.0&lt;/X&gt;&lt;Y&gt;50.0&lt;/Y&gt;&lt;/coord&gt;
77
 * &lt;/Point&gt;
78
 * &lt;/pointMember&gt;
79
 * &lt;pointMember&gt;
80
 * &lt;Point gid="P6777"&gt;
81
 * &lt;coord&gt;&lt;X&gt;50.0&lt;/X&gt;&lt;Y&gt;50.0&lt;/Y&gt;&lt;/coord&gt;
82
 * &lt;/Point&gt;
83
 * &lt;/pointMember&gt;
84
 * &lt;/MultiPoint&gt;
85
 * </code>
86
 * </pre>
87
 * </p> 
88
 * @author Jorge Piera LLodr? (jorge.piera@iver.es)
89
 */
90
public class MultiPointWriter {
91
        
92
        /**
93
         * It writes a gml:multiPoint init tag
94
         * @param writer
95
         * Writer to write the labels
96
         * @param errorHandler
97
         * To add the errors
98
         * @param id
99
         * Geometry ID
100
         * @param srs
101
         * Spatial reference system
102
         * @throws IOException
103
         */
104
        public static void start(Writer writer, GPEErrorHandler errorHandler, String id, String srs) throws IOException{
105
                GeometriesWriter.startGeometry(writer, errorHandler, GMLTags.GML_MULTIPOINT, id, srs);
106
        }
107
        
108
        /**
109
         * It writes a gml:multiPoint end tag
110
         * @param writer
111
         * Writer to write the labels
112
         * @param errorHandler
113
         * To add the errors
114
         * @throws IOException
115
         */
116
        public static void end(Writer writer, GPEErrorHandler errorHandler) throws IOException{
117
                GeometriesWriter.endGeometry(writer, errorHandler, GMLTags.GML_MULTIPOINT);                
118
        }
119
}