Esempio n. 1
0
        public ISOLineString ExportLinearRing(LinearRing ring, ISOLineStringType lsgType)
        {
            ISOLineString lineString = new ISOLineString();

            lineString.LineStringType = lsgType;

            ISOPointType pointType = ISOPointType.Other;

            switch (lsgType)
            {
            case ISOLineStringType.PolygonExterior:
            case ISOLineStringType.PolygonInterior:
                pointType = ISOPointType.PartfieldReference;
                break;

            case ISOLineStringType.GuidancePattern:
                pointType = ISOPointType.GuidancePoint;
                break;

            case ISOLineStringType.Flag:
                pointType = ISOPointType.Flag;
                break;

            case ISOLineStringType.Obstacle:
                pointType = ISOPointType.Obstacle;
                break;
            }

            PointMapper pointMapper = new PointMapper(TaskDataMapper);

            lineString.Points = pointMapper.ExportPoints(ring.Points, pointType).ToList();
            return(lineString);
        }
Esempio n. 2
0
        public ISOLineString ExportLinearRing(LinearRing ring, ISOLineStringType lsgType)
        {
            ISOLineString lineString = new ISOLineString(TaskDataMapper.Version);

            lineString.LineStringType = lsgType;

            ISOPointType pointType = ISOPointType.Other;

            if (TaskDataMapper.Version > 3)
            {
                switch (lsgType)
                {
                case ISOLineStringType.PolygonExterior:
                case ISOLineStringType.PolygonInterior:
                    pointType = ISOPointType.PartfieldReference;
                    break;

                case ISOLineStringType.GuidancePattern:
                    pointType = ISOPointType.GuidancePoint;
                    break;

                case ISOLineStringType.Flag:
                    pointType = ISOPointType.Flag;
                    break;

                case ISOLineStringType.Obstacle:
                    pointType = ISOPointType.Obstacle;
                    break;
                }
            }
            else if (lineString.LineStringType == ISOLineStringType.Flag)
            {
                //Flag & Other (default) are the only 2 options for version 3
                pointType = ISOPointType.Flag;
            }

            PointMapper pointMapper = new PointMapper(TaskDataMapper);

            lineString.Points = pointMapper.ExportPoints(ring.Points, pointType).ToList();
            return(lineString);
        }
Esempio n. 3
0
        public IEnumerable <ISOLineString> ExportLinearRings(IEnumerable <LinearRing> adaptRings, ISOLineStringType lsgType)
        {
            List <ISOLineString> lineStrings = new List <ISOLineString>();

            foreach (LinearRing ring in adaptRings)
            {
                ISOLineString lineString = ExportLinearRing(ring, lsgType);
                lineStrings.Add(lineString);
            }
            return(lineStrings);
        }