Statistics
| Revision:

root / trunk / libraries / libGPE-GML / src-test / org / gvsig / gpe / gml / writers / GMLWriteLineStringLayerTest.java @ 11171

History | View | Annotate | Download (2.71 KB)

1
package org.gvsig.gpe.gml.writers;
2

    
3
import java.io.File;
4
import java.io.IOException;
5

    
6
import junit.framework.TestCase;
7

    
8
import org.gvsig.gpe.GPEErrorHandlerTest;
9
import org.gvsig.gpe.gml.writer.GPEGmlWriterHandler;
10

    
11
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
12
 *
13
 * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
14
 *
15
 * This program is free software; you can redistribute it and/or
16
 * modify it under the terms of the GNU General Public License
17
 * as published by the Free Software Foundation; either version 2
18
 * of the License, or (at your option) any later version.
19
 *
20
 * This program is distributed in the hope that it will be useful,
21
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
23
 * GNU General Public License for more details.
24
 *
25
 * You should have received a copy of the GNU General Public License
26
 * along with this program; if not, write to the Free Software
27
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
28
 *
29
 * For more information, contact:
30
 *
31
 *  Generalitat Valenciana
32
 *   Conselleria d'Infraestructures i Transport
33
 *   Av. Blasco Ib??ez, 50
34
 *   46010 VALENCIA
35
 *   SPAIN
36
 *
37
 *      +34 963862235
38
 *   gvsig@gva.es
39
 *      www.gvsig.gva.es
40
 *
41
 *    or
42
 *
43
 *   IVER T.I. S.A
44
 *   Salamanca 50
45
 *   46005 Valencia
46
 *   Spain
47
 *
48
 *   +34 963163400
49
 *   dac@iver.es
50
 */
51
/* CVS MESSAGES:
52
 *
53
 * $Id: GMLWriteLineStringLayerTest.java 11171 2007-04-12 17:06:44Z jorpiell $
54
 * $Log$
55
 * Revision 1.1  2007-04-12 17:06:44  jorpiell
56
 * First GML writing tests
57
 *
58
 *
59
 */
60
/**
61
 * @author Jorge Piera LLodr? (jorge.piera@iver.es)
62
 */
63
public class GMLWriteLineStringLayerTest extends GMLWriteBaseTest {
64
        public void test1() throws IOException{
65
                GPEGmlWriterHandler writer = new GPEGmlWriterHandler("GML",
66
                                new File("testdata/tmp/lineStrings.gml"),
67
                                new GPEErrorHandlerTest());
68
                writer.initialize();
69
                writer.startLayer("1", "Rivers", "Line string layer test", "23030");
70
                writer.startBbox("bbox", generateRandomBBox(),
71
                                generateRandomBBox(),
72
                                generateRandomBBox(),
73
                                "23030");
74
                writer.endBbox();
75
                writer.startFeature("Turia","1");
76
                writer.startElement("LENGHT", new Integer("150"), Integer.class);
77
                writer.endElement();
78
                writer.startLineString("p1", generateRandomCoordinates(),
79
                                generateRandomCoordinates(),
80
                                generateRandomCoordinates(), "EPSG:23030");
81
                writer.endLineString();                
82
                writer.endFeature();
83
                writer.startFeature("Ebro","2");
84
                writer.startElement("LENGHT", new Integer("300"), Integer.class);
85
                writer.endElement();
86
                writer.startLineString("p1", generateRandomCoordinates(),
87
                                generateRandomCoordinates(),
88
                                generateRandomCoordinates(), "EPSG:23030");
89
                writer.endLineString();                
90
                writer.endFeature();
91
                writer.endLayer();
92
                writer.close();
93
        }
94

    
95
}