예제 #1
0
파일: Polygon.cs 프로젝트: Mohamie/.NET-SDK
        public Polygon(LineString boundary, List <LineString> holes, ReferenceSystemEnum srs)
            : base(srs)
        {
            if (boundary == null)
            {
                throw new ArgumentException("The boundary should not be null.");
            }

            if (holes != null)
            {
                this.holes = new List <LineString>(holes);
            }

            else
            {
                this.holes = new List <LineString>();
            }

            this.boundary = boundary;
        }
예제 #2
0
        public GeoJSONParser(ReferenceSystemEnum srs, String geomClassName)
        {
            this.srs = srs;

            if (geomClassName != null)
            {
                try
                {
                    Assembly asm           = Assembly.GetExecutingAssembly();
                    T        unchekedClazz = (T)asm.CreateInstance(geomClassName);
                    geomClass = unchekedClazz;
                }
                catch
                {
                    throw new ArgumentException($"'geomClassName' contains unknown class '{geomClassName}'.");
                }
            }

            else
            {
                geomClass = null;
            }
        }
예제 #3
0
 public LineString(List <Point> points, ReferenceSystemEnum srs) : base(srs)
 {
     this.points = new List <Point>(points);
 }
예제 #4
0
 public GeoJSONParser(ReferenceSystemEnum srs) : this(srs, null)
 {
 }
예제 #5
0
파일: Point.cs 프로젝트: Mohamie/.NET-SDK
 public Point(ReferenceSystemEnum srs) : base(srs)
 {
 }
예제 #6
0
파일: Polygon.cs 프로젝트: Mohamie/.NET-SDK
 public Polygon(List <Point> boundary, List <LineString> holes, ReferenceSystemEnum srs)
     : this(new LineString(boundary, srs), holes, srs)
 {
 }
예제 #7
0
 public static T FromGeoJSON <T>(String geoJSON, ReferenceSystemEnum srs) where T : Geometry
 {
     return((T) new GeoJSONParser <T>(srs).Read(geoJSON));
 }
예제 #8
0
 public static T FromWKT <T>(String wellKnownText, ReferenceSystemEnum srs) where T : Geometry
 {
     return((T) new WKTParser(srs).Read(wellKnownText));
 }
예제 #9
0
 protected Geometry(ReferenceSystemEnum srs)
 {
     this.srs = srs;
 }
예제 #10
0
 public WKTParser(ReferenceSystemEnum srs)
 {
     this.srs = srs;
 }