Revision 11621 trunk/libraries/libGPE-GML/src/org/gvsig/gpe/gml/writer/geometries/GeometriesWriter.java
GeometriesWriter.java | ||
---|---|---|
1 | 1 |
package org.gvsig.gpe.gml.writer.geometries; |
2 | 2 |
|
3 | 3 |
import java.io.IOException; |
4 |
|
|
5 |
import org.gvsig.gpe.GPEErrorHandler; |
|
4 | 6 |
import org.gvsig.gpe.xml.writer.Writer; |
5 | 7 |
|
6 | 8 |
import org.gvsig.gpe.gml.GMLProjectionFactory; |
... | ... | |
50 | 52 |
* |
51 | 53 |
* $Id$ |
52 | 54 |
* $Log$ |
53 |
* Revision 1.5 2007-05-14 09:32:12 jorpiell |
|
55 |
* Revision 1.6 2007-05-14 11:18:12 jorpiell |
|
56 |
* Add the ErrorHandler to all the methods |
|
57 |
* |
|
58 |
* Revision 1.5 2007/05/14 09:32:12 jorpiell |
|
54 | 59 |
* Add the a new class to compare tags |
55 | 60 |
* |
56 | 61 |
* Revision 1.4 2007/05/08 10:24:16 jorpiell |
... | ... | |
78 | 83 |
* Writes a Geoemtry init tag in GML |
79 | 84 |
* @param writer |
80 | 85 |
* Writer to write the labels |
86 |
* @param errorHandler |
|
87 |
* To add the errors |
|
81 | 88 |
* @param tagName |
82 | 89 |
* Geometry type |
83 | 90 |
* @param id |
... | ... | |
86 | 93 |
* Spatial reference system |
87 | 94 |
* @throws IOException |
88 | 95 |
*/ |
89 |
public static void startGeometry(Writer writer,String tagName,String id,String srs) throws IOException{ |
|
96 |
public static void startGeometry(Writer writer,GPEErrorHandler errorHandler, String tagName,String id,String srs) throws IOException{
|
|
90 | 97 |
writer.write("\n"); |
91 | 98 |
writer.write("<" + GMLTags.GML_NAMESPACE + ":" + tagName); |
92 | 99 |
if (id != null){ |
... | ... | |
94 | 101 |
} |
95 | 102 |
if (srs != null){ |
96 | 103 |
writer.write(" " + GMLTags.GML_SRS_NAME + "='"); |
97 |
writer.write(GMLProjectionFactory.getProjection(srs));
|
|
104 |
writer.write(GMLProjectionFactory.fromGPEToGML(srs,errorHandler));
|
|
98 | 105 |
writer.write("'"); |
99 | 106 |
} |
100 | 107 |
writer.write(">"); |
... | ... | |
104 | 111 |
* Writes a Geoemtry end tag in GML |
105 | 112 |
* @param writer |
106 | 113 |
* Writer to write the labels |
114 |
* @param errorHandler |
|
115 |
* To add the errors |
|
107 | 116 |
* @param tagName |
108 | 117 |
* Geometry type |
109 | 118 |
* @throws IOException |
110 | 119 |
*/ |
111 |
public static void endGeometry(Writer writer,String tagName) throws IOException{ |
|
120 |
public static void endGeometry(Writer writer, GPEErrorHandler errorHandler,String tagName) throws IOException{
|
|
112 | 121 |
writer.write("\n"); |
113 | 122 |
writer.write("</" + GMLTags.GML_NAMESPACE + ":" + tagName + ">"); |
114 | 123 |
} |
Also available in: Unified diff