예제 #1
0
        public virtual IShape ReadShape(string value)
        {
            IShape s = LegacyShapeReadWriterFormat.ReadShapeOrNull(value, this);

            if (s == null)
            {
                try
                {
                    s = ReadShapeFromWkt(value);
                }
                catch (ParseException e)
                {
                    if (e.InnerException is InvalidShapeException)
                    {
                        throw (InvalidShapeException)e.InnerException;
                    }
                    throw new InvalidShapeException(e.ToString(), e);
                }
            }
            return(s);
        }
예제 #2
0
 public virtual string ToString(IShape shape)
 {
     return(LegacyShapeReadWriterFormat.WriteShape(shape));
 }