/// <summary>
        /// This method produces instances of type <see cref="EasyMap.Geometries.MultiPolygon"/>.
        /// </summary>
        /// <returns>The created geometries</returns>
        internal override Collection <Geometry> createGeometries()
        {
            MultiPolygon multiPolygon = null;

            IPathNode multiPolygonNode     = new PathNode(_GMLNS, "MultiPolygon", (NameTable)_XmlReader.NameTable);
            IPathNode multiSurfaceNode     = new PathNode(_GMLNS, "MultiSurface", (NameTable)_XmlReader.NameTable);
            IPathNode multiPolygonNodeAlt  = new AlternativePathNodesCollection(multiPolygonNode, multiSurfaceNode);
            IPathNode polygonMemberNode    = new PathNode(_GMLNS, "polygonMember", (NameTable)_XmlReader.NameTable);
            IPathNode surfaceMemberNode    = new PathNode(_GMLNS, "surfaceMember", (NameTable)_XmlReader.NameTable);
            IPathNode polygonMemberNodeAlt = new AlternativePathNodesCollection(polygonMemberNode, surfaceMemberNode);
            IPathNode linearRingNode       = new PathNode(_GMLNS, "LinearRing", (NameTable)_XmlReader.NameTable);

            string[] labelValue = new string[1];
            bool     geomFound  = false;

            try
            {
                // Reading the entire feature's node makes it possible to collect label values that may appear before or after the geometry property
                while ((_FeatureReader = GetSubReaderOf(_XmlReader, null, _FeatureNode)) != null)
                {
                    while (
                        (_GeomReader =
                             GetSubReaderOf(_FeatureReader, labelValue, multiPolygonNodeAlt, polygonMemberNodeAlt)) != null)
                    {
                        multiPolygon = new MultiPolygon();
                        GeometryFactory       geomFactory = new PolygonFactory(_GeomReader, _FeatureTypeInfo);
                        Collection <Geometry> polygons    = geomFactory.createGeometries();

                        foreach (Polygon polygon in polygons)
                        {
                            multiPolygon.Polygons.Add(polygon);
                        }

                        _Geoms.Add(multiPolygon);
                        geomFound = true;
                    }
                    if (geomFound)
                    {
                        AddLabel(labelValue[0], _Geoms[_Geoms.Count - 1]);
                    }
                    geomFound = false;
                }
            }
            catch (Exception ex)
            {
                Trace.TraceError("An exception occured while parsing a multi-polygon geometry: " + ex.Message);
                throw ex;
            }

            return(_Geoms);
        }
        /// <summary>
        /// This method detects the geometry type from 'GetFeature' response and uses a geometry factory to create the
        /// appropriate geometries.
        /// </summary>
        /// <returns></returns>
        internal override Collection <Geometry> createGeometries()
        {
            GeometryFactory geomFactory = null;

            string geometryTypeString = string.Empty;
            string serviceException   = null;

            if (_QuickGeometries)
            {
                _MultiGeometries = false;
            }

            IPathNode pointNode              = new PathNode(_GMLNS, "Point", (NameTable)_XmlReader.NameTable);
            IPathNode lineStringNode         = new PathNode(_GMLNS, "LineString", (NameTable)_XmlReader.NameTable);
            IPathNode polygonNode            = new PathNode(_GMLNS, "Polygon", (NameTable)_XmlReader.NameTable);
            IPathNode multiPointNode         = new PathNode(_GMLNS, "MultiPoint", (NameTable)_XmlReader.NameTable);
            IPathNode multiLineStringNode    = new PathNode(_GMLNS, "MultiLineString", (NameTable)_XmlReader.NameTable);
            IPathNode multiCurveNode         = new PathNode(_GMLNS, "MultiCurve", (NameTable)_XmlReader.NameTable);
            IPathNode multiLineStringNodeAlt = new AlternativePathNodesCollection(multiLineStringNode, multiCurveNode);
            IPathNode multiPolygonNode       = new PathNode(_GMLNS, "MultiPolygon", (NameTable)_XmlReader.NameTable);
            IPathNode multiSurfaceNode       = new PathNode(_GMLNS, "MultiSurface", (NameTable)_XmlReader.NameTable);
            IPathNode multiPolygonNodeAlt    = new AlternativePathNodesCollection(multiPolygonNode, multiSurfaceNode);

            while (_XmlReader.Read())
            {
                if (_XmlReader.NodeType == XmlNodeType.Element)
                {
                    if (_MultiGeometries)
                    {
                        if (multiPointNode.Matches(_XmlReader))
                        {
                            geomFactory        = new MultiPointFactory(_HttpClientUtil, _FeatureTypeInfo, _LabelInfo);
                            geometryTypeString = "MultiPointPropertyType";
                            break;
                        }
                        if (multiLineStringNodeAlt.Matches(_XmlReader))
                        {
                            geomFactory        = new MultiLineStringFactory(_HttpClientUtil, _FeatureTypeInfo, _LabelInfo);
                            geometryTypeString = "MultiLineStringPropertyType";
                            break;
                        }
                        if (multiPolygonNodeAlt.Matches(_XmlReader))
                        {
                            geomFactory        = new MultiPolygonFactory(_HttpClientUtil, _FeatureTypeInfo, _LabelInfo);
                            geometryTypeString = "MultiPolygonPropertyType";
                            break;
                        }
                    }

                    if (pointNode.Matches(_XmlReader))
                    {
                        geomFactory        = new PointFactory(_HttpClientUtil, _FeatureTypeInfo, _LabelInfo);
                        geometryTypeString = "PointPropertyType";
                        break;
                    }
                    if (lineStringNode.Matches(_XmlReader))
                    {
                        geomFactory        = new LineStringFactory(_HttpClientUtil, _FeatureTypeInfo, _LabelInfo);
                        geometryTypeString = "LineStringPropertyType";
                        break;
                    }
                    if (polygonNode.Matches(_XmlReader))
                    {
                        geomFactory        = new PolygonFactory(_HttpClientUtil, _FeatureTypeInfo, _LabelInfo);
                        geometryTypeString = "PolygonPropertyType";
                        break;
                    }
                    if (_ServiceExceptionNode.Matches(_XmlReader))
                    {
                        serviceException = _XmlReader.ReadInnerXml();
                        Trace.TraceError("A service exception occured: " + serviceException);
                        throw new Exception("A service exception occured: " + serviceException);
                    }
                }
            }

            _FeatureTypeInfo.Geometry._GeometryType = geometryTypeString;

            if (geomFactory != null)
            {
                return(_QuickGeometries
                           ? geomFactory.createQuickGeometries(geometryTypeString)
                           : geomFactory.createGeometries());
            }
            return(_Geoms);
        }