Ejemplo n.º 1
0
        public Point ImportPoint(ISOPoint isoPoint)
        {
            Point point = new Point();

            point.X = Convert.ToDouble(isoPoint.PointEast);
            point.Y = Convert.ToDouble(isoPoint.PointNorth);
            point.Z = isoPoint.PointUp;
            return(point);
        }
Ejemplo n.º 2
0
 internal static bool IsFieldAttributeType(ISOPoint isoPoint)
 {
     return(isoPoint.PointType == ISOPointType.FieldAccess ||
            isoPoint.PointType == ISOPointType.Flag ||
            isoPoint.PointType == ISOPointType.Homebase ||
            isoPoint.PointType == ISOPointType.Obstacle ||
            isoPoint.PointType == ISOPointType.Other ||
            isoPoint.PointType == ISOPointType.Storage);
 }
Ejemplo n.º 3
0
        public IEnumerable <ISOPoint> ExportPoints(IEnumerable <Point> adaptPoints, ISOPointType pointType)
        {
            List <ISOPoint> points = new List <ISOPoint>();

            foreach (Point adaptPoint in adaptPoints)
            {
                ISOPoint point = ExportPoint(adaptPoint, pointType);
                points.Add(point);
            }
            return(points);
        }
Ejemplo n.º 4
0
        public ISOPoint ExportPoint(Point adaptPoint, ISOPointType pointType)
        {
            ISOPoint point = new ISOPoint();

            point.PointEast  = Convert.ToDecimal(adaptPoint.X);
            point.PointNorth = Convert.ToDecimal(adaptPoint.Y);
            if (adaptPoint.Z.HasValue)
            {
                point.PointUp = (int)(adaptPoint.Z);
            }
            point.PointType = pointType;
            return(point);
        }
Ejemplo n.º 5
0
 public AttributeShape ImportAttributePoint(ISOPoint isoPoint)
 {
     if (IsFieldAttributeType(isoPoint))
     {
         return(new AttributeShape()
         {
             Shape = ImportPoint(isoPoint),
             TypeName = Enum.GetName(typeof(ISOPointType), isoPoint.PointType),
             Name = isoPoint.PointDesignator
         });
     }
     return(null);
 }