Revision 37960 trunk/libraries/libGPE-KML/src/org/gvsig/gpe/kml/parser/v21/geometries/PolygonTypeBinding.java
PolygonTypeBinding.java | ||
---|---|---|
4 | 4 |
|
5 | 5 |
import javax.xml.namespace.QName; |
6 | 6 |
|
7 |
import org.gvsig.gpe.kml.parser.GPEDeafultKmlParser;
|
|
7 |
import org.gvsig.gpe.kml.parser.GPEDefaultKmlParser;
|
|
8 | 8 |
import org.gvsig.gpe.kml.utils.Kml2_1_Tags; |
9 | 9 |
import org.gvsig.gpe.parser.ICoordinateIterator; |
10 | 10 |
import org.gvsig.gpe.xml.stream.IXmlStreamReader; |
... | ... | |
124 | 124 |
* @throws XmlStreamException |
125 | 125 |
* @throws IOException |
126 | 126 |
*/ |
127 |
public Object parse(IXmlStreamReader parser,GPEDeafultKmlParser handler) throws XmlStreamException, IOException {
|
|
127 |
public Object parse(IXmlStreamReader parser,GPEDefaultKmlParser handler) throws XmlStreamException, IOException {
|
|
128 | 128 |
boolean endFeature = false; |
129 | 129 |
int currentTag; |
130 | 130 |
Object polygon = null; |
... | ... | |
137 | 137 |
while (!endFeature){ |
138 | 138 |
switch(currentTag){ |
139 | 139 |
case IXmlStreamReader.START_ELEMENT: |
140 |
if (CompareUtils.compareWithNamespace(tag,Kml2_1_Tags.OUTERBOUNDARYIS)){ |
|
140 |
if (CompareUtils.compareWithOutNamespace(tag,Kml2_1_Tags.OUTERBOUNDARYIS)){
|
|
141 | 141 |
OuterBoundaryIsBinding coordinatesBinding = handler.getProfile().getOuterBoundaryIsBinding(); |
142 | 142 |
ICoordinateIterator coordinatesIterator = coordinatesBinding.parse(parser, handler); |
143 | 143 |
polygon = handler.getContentHandler().startPolygon(id, |
144 | 144 |
coordinatesIterator, |
145 | 145 |
Kml2_1_Tags.DEFAULT_SRS); |
146 |
}else if (CompareUtils.compareWithNamespace(tag,Kml2_1_Tags.INNERBOUNDARYIS)){ |
|
146 |
}else if (CompareUtils.compareWithOutNamespace(tag,Kml2_1_Tags.INNERBOUNDARYIS)){
|
|
147 | 147 |
InnerBoundaryIsBinding innerPolygonBinding = handler.getProfile().getInnerBoundaryIsBinding(); |
148 | 148 |
ICoordinateIterator coordinatesIterator = innerPolygonBinding.parse(parser, handler); |
149 | 149 |
Object innerPolygon = handler.getContentHandler().startInnerPolygon(id, |
... | ... | |
154 | 154 |
} |
155 | 155 |
break; |
156 | 156 |
case IXmlStreamReader.END_ELEMENT: |
157 |
if (CompareUtils.compareWithNamespace(tag,Kml2_1_Tags.POLYGON)){ |
|
157 |
if (CompareUtils.compareWithOutNamespace(tag,Kml2_1_Tags.POLYGON)){
|
|
158 | 158 |
endFeature = true; |
159 | 159 |
handler.getContentHandler().endPolygon(polygon); |
160 | 160 |
} |
Also available in: Unified diff