Statistics
| Revision:

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

History | View | Annotate | Download (3.24 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.gml.GMLTags;
7
import org.gvsig.gpe.xml.writer.Writer;
8

    
9
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
10
 *
11
 * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
12
 *
13
 * This program is free software; you can redistribute it and/or
14
 * modify it under the terms of the GNU General Public License
15
 * as published by the Free Software Foundation; either version 2
16
 * of the License, or (at your option) any later version.
17
 *
18
 * This program is distributed in the hope that it will be useful,
19
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21
 * GNU General Public License for more details.
22
 *
23
 * You should have received a copy of the GNU General Public License
24
 * along with this program; if not, write to the Free Software
25
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
26
 *
27
 * For more information, contact:
28
 *
29
 *  Generalitat Valenciana
30
 *   Conselleria d'Infraestructures i Transport
31
 *   Av. Blasco Ib??ez, 50
32
 *   46010 VALENCIA
33
 *   SPAIN
34
 *
35
 *      +34 963862235
36
 *   gvsig@gva.es
37
 *      www.gvsig.gva.es
38
 *
39
 *    or
40
 *
41
 *   IVER T.I. S.A
42
 *   Salamanca 50
43
 *   46005 Valencia
44
 *   Spain
45
 *
46
 *   +34 963163400
47
 *   dac@iver.es
48
 */
49
/* CVS MESSAGES:
50
 *
51
 * $Id: MultiPointWriter.java 11697 2007-05-16 13:00:48Z csanchez $
52
 * $Log$
53
 * Revision 1.5  2007-05-16 13:00:48  csanchez
54
 * Actualizaci?n de libGPE-GML
55
 *
56
 * Revision 1.4  2007/05/14 11:18:12  jorpiell
57
 * Add the ErrorHandler to all the methods
58
 *
59
 * Revision 1.3  2007/05/08 10:24:16  jorpiell
60
 * Add comments to create javadocs
61
 *
62
 * Revision 1.2  2007/04/14 16:07:30  jorpiell
63
 * The writer has been created
64
 *
65
 * Revision 1.1  2007/04/13 13:16:00  jorpiell
66
 * Add the multiple geometries
67
 *
68
 *
69
 */
70
/**
71
 * It writes a gml:MultiPointType object. Example:
72
 * <p>
73
 * <pre>
74
 * <code> 
75
 * &lt;MultiPoint gid="c731" srsName="http://www.opengis.net/gml/srs/epsg.xml#4326"&gt;
76
 * &lt;pointMember&gt;
77
 * &lt;Point gid="P6776"&gt;
78
 * &lt;coord&gt;&lt;X&gt;50.0&lt;/X&gt;&lt;Y&gt;50.0&lt;/Y&gt;&lt;/coord&gt;
79
 * &lt;/Point&gt;
80
 * &lt;/pointMember&gt;
81
 * &lt;pointMember&gt;
82
 * &lt;Point gid="P6777"&gt;
83
 * &lt;coord&gt;&lt;X&gt;50.0&lt;/X&gt;&lt;Y&gt;50.0&lt;/Y&gt;&lt;/coord&gt;
84
 * &lt;/Point&gt;
85
 * &lt;/pointMember&gt;
86
 * &lt;/MultiPoint&gt;
87
 * </code>
88
 * </pre>
89
 * </p> 
90
 * @author Jorge Piera LLodr? (jorge.piera@iver.es)
91
 */
92
public class MultiPointWriter {
93
        
94
        /**
95
         * It writes a gml:multiPoint init tag
96
         * @param writer
97
         * Writer to write the labels
98
         * @param errorHandler
99
         * To add the errors
100
         * @param id
101
         * Geometry ID
102
         * @param srs
103
         * Spatial reference system
104
         * @throws IOException
105
         */
106
        public static void start(Writer writer, GPEErrorHandler errorHandler, String id, String srs) throws IOException{
107
                GeometriesWriter.startGeometry(writer, errorHandler, GMLTags.GML_MULTIPOINT, id, srs);
108
        }
109
        
110
        /**
111
         * It writes a gml:multiPoint end tag
112
         * @param writer
113
         * Writer to write the labels
114
         * @param errorHandler
115
         * To add the errors
116
         * @throws IOException
117
         */
118
        public static void end(Writer writer, GPEErrorHandler errorHandler) throws IOException{
119
                GeometriesWriter.endGeometry(writer, errorHandler, GMLTags.GML_MULTIPOINT);                
120
        }
121
}