Ejemplo n.º 1
0
        protected static CoordSys ReadFrom(ArcXmlReader reader, CoordSys coordSys, string xmlName)
        {
            try
            {
                if (reader.HasAttributes)
                {
                    while (reader.MoveToNextAttribute())
                    {
                        string value = reader.ReadContentAsString();

                        if (value.Length > 0)
                        {
                            switch (reader.Name)
                            {
                            case "id": coordSys.ID = value; break;

                            case "string": coordSys.String = value; break;

                            case "datumtransformid": coordSys.DatumTransformID = value; break;

                            case "datumtransformstring": coordSys.DatumTransformString = value; break;
                            }
                        }
                    }

                    reader.MoveToElement();
                }

                return(coordSys);
            }
            catch (Exception ex)
            {
                if (ex is ArcXmlException)
                {
                    throw ex;
                }
                else
                {
                    throw new ArcXmlException(String.Format("Could not read {0} element.", xmlName), ex);
                }
            }
        }
Ejemplo n.º 2
0
 public GetRasterInfo(string layerID, double x, double y, CoordSys coordSys) : this(layerID, x, y)
 {
     CoordSys = coordSys;
 }
Ejemplo n.º 3
0
        public object Clone()
        {
            CoordSys clone = (CoordSys)this.MemberwiseClone();

            return(clone);
        }
Ejemplo n.º 4
0
 public GetRasterInfo(string layerID, IPoint p, CoordSys coordSys) : this(layerID, p.Coordinate.X, p.Coordinate.Y, coordSys)
 {
 }