Example #1
0
        /// <summary>
        /// 
        /// </summary>
        public GMLTesting() 
        {
            point = Factory.CreatePoint(new Coordinate(100, 100));

            ICoordinate[] coordinates = new ICoordinate[]
            {
                 new Coordinate(10,10),
                 new Coordinate(20,20),
                 new Coordinate(20,10),                 
            };
            line = Factory.CreateLineString(coordinates);

            coordinates = new ICoordinate[]
            {
                new Coordinate(100,100),
                new Coordinate(200,100),
                new Coordinate(200,200),                
                new Coordinate(100,200),
                new Coordinate(100,100),
            };
            ICoordinate[] interior1 = new ICoordinate[] 
            { 
                new Coordinate(120,120),
                new Coordinate(180,120),
                new Coordinate(180,180),                
                new Coordinate(120,180),
                new Coordinate(120,120),
            };
            ILinearRing linearRing = Factory.CreateLinearRing(coordinates);
            ILinearRing[] holes = new ILinearRing[] { Factory.CreateLinearRing(interior1), };
            polygon = Factory.CreatePolygon(linearRing, holes);

            coordinates = new ICoordinate[]
            {
                new Coordinate(100,100),
                new Coordinate(200,200),
                new Coordinate(300,300),                
                new Coordinate(400,400),
                new Coordinate(500,500),
            };
            multiPoint = Factory.CreateMultiPoint(coordinates);

            writer = new GMLWriter();
            reader = new GMLReader();
        }
Example #2
0
 /// <summary>
 /// Returns the feature representation as GML 2.1.1 XML document.
 /// This XML document is based on <c>Geometry.xsd</c> schema.
 /// NO features or XLink are implemented here!
 /// </summary>        
 public XmlReader ToGMLFeature()
 {
     GMLWriter writer = new GMLWriter();
     return writer.Write(this);
 }