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); }
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); }
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); }