Hi,

The exported gml describes a multipolygon with two polygons and not a
polygon with a hole.

A polygon with a hole therefor is described by an outer and innerBoundary
for this polygon.

<gml:featureMember>
<cit:Feature gml:fid="0">
<!-- <gml:MultiPolygon
gml:srsName="http://www.opengis.net/gml/srs/epsg.xml#25830";> -->
<gml:polygonMember>
<gml:Polygon gml:srsName="http://www.opengis.net/gml/srs/epsg.xml#25830";>
<gml:outerBoundaryIs>
<gml:LinearRing>
<gml:coordinates>...</gml:coordinates>
</gml:LinearRing>
</gml:outerBoundaryIs>
<!--
</gml:Polygon>
</gml:polygonMember>
<gml:polygonMember>
<gml:Polygon gml:srsName="http://www.opengis.net/gml/srs/epsg.xml#25830";>
-->
<gml:innerBoundaryIs>
<gml:LinearRing>
<gml:coordinates>...</gml:coordinates>
</gml:LinearRing>
</gml:innerBoundaryIs>
</gml:Polygon>
</gml:polygonMember>
<!-- </gml:MultiPolygon> -->
<PLAN>06-0009</PLAN>
<TH>48</TH>
<MUN>22</MUN>
<POL>4</POL>
<PAR>1</PAR>
<SUB>1</SUB>
<UA>1</UA>
<UI>1</UI>
<TOPONIMO>a</TOPONIMO>
</cit:Feature>
</gml:featureMember>
 
Arnd

-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von David Alda
Fernandez de Lezea
Gesendet: Donnerstag, 22. März 2012 12:18
An: [email protected]
Betreff: [OpenLayers-Users] Problems loading GML with hole

Hi list,
 
I'm facing some problems while loading a GML file that has a geometry with a
hole. The GML is exported from gvSIG. Then I try to load it with Openlayers,
but I can't get the geometry drawn with the hole. I get two geometries
drawn. I attach the gml to the email. I'm using OpenLayers 2.9.
 
My parsing code
 
        var theParser = new OpenLayers.Format.GML();
      theParser.internalProjection = null;
      theParser.externalProjection = null;
      theParser.extractStyles = false;
      theParser.extractAttributes = true;
 
      var features = theParser.read(req);
 
Any ideas?

Thanks in advance.
 
Un saludo,


David Alda Fernández de Lecea
GIS Analista Programadorea / Analista Programador GIS KONTSULTORIA  UNITATEA
/ UNIDAD DE CONSULTORÍA

Granja Modelo s/n
01192 Arkaute Araba
T 945 003 295 F 945 003 290
[email protected] | www.hazi.es <http://www.hazi.es/> 



<blocked::http://www.hazi.es/> *********************  LEGE OHARRA
*******************   AVISO LEGAL   *******************   DISCLAIMER
******************

Mezu hau pertsonala eta isilpekoa da eta baimenik gabeko erabilera debekatua
dago legalki. Jasotzailea ez bazara ezabatu mezua, bidali eta kontserbatu
gabe.

Este mensaje es personal y confidencial y su uso no autorizado está
prohibido legalmente. Si usted no es el destinatario, proceda a borrarlo,
sin reenviarlo ni conservarlo.

This message is personal and confidential, unauthorised use is legally
prohibited. If you are not the intended recipient, delete it without
resending or backing it.


_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to