Esempio n. 1
0
        public CropZone ImportCropZone(ISOPartfield isoPartfield)
        {
            CropZone cropZone = new CropZone();

            //Cropzone ID
            ImportIDs(cropZone.Id, isoPartfield.PartfieldID);

            //Field ID
            if (!string.IsNullOrEmpty(isoPartfield.FieldIdRef))
            {
                cropZone.FieldId = TaskDataMapper.InstanceIDMap.GetADAPTID(isoPartfield.FieldIdRef).Value;  //Cropzone has a defined parent field in the ISO XML
            }
            else
            {
                cropZone.FieldId = TaskDataMapper.InstanceIDMap.GetADAPTID(isoPartfield.PartfieldID).Value;  //Field had a crop assigned and we created a single cropzone
            }

            //Area
            var numericValue = new NumericValue(new CompositeUnitOfMeasure("m2").ToModelUom(), (double)(isoPartfield.PartfieldArea));

            cropZone.Area = new NumericRepresentationValue(RepresentationInstanceList.vrReportedFieldArea.ToModelRepresentation(), numericValue.UnitOfMeasure, numericValue);

            //Name
            cropZone.Description = isoPartfield.PartfieldDesignator;

            //Boundary
            PolygonMapper         polygonMapper    = new PolygonMapper(TaskDataMapper);
            IEnumerable <Polygon> boundaryPolygons = polygonMapper.ImportPolygons(isoPartfield.Polygons).ToList();

            if (boundaryPolygons.Any())
            {
                MultiPolygon boundary = new MultiPolygon();
                boundary.Polygons       = boundaryPolygons.ToList();
                cropZone.BoundingRegion = boundary;
            }

            //Guidance
            GuidanceGroupMapper         guidanceGroupMapper = new GuidanceGroupMapper(TaskDataMapper);
            IEnumerable <GuidanceGroup> groups = guidanceGroupMapper.ImportGuidanceGroups(isoPartfield.GuidanceGroups);

            if (groups.Any())
            {
                if (DataModel.Catalog.GuidanceGroups == null)
                {
                    DataModel.Catalog.GuidanceGroups = new List <GuidanceGroup>();
                }
                DataModel.Catalog.GuidanceGroups.AddRange(groups);
                cropZone.GuidanceGroupIds = groups.Select(g => g.Id.ReferenceId).ToList();
            }

            //Crop
            int?adaptCropID = TaskDataMapper.InstanceIDMap.GetADAPTID(isoPartfield.CropTypeIdRef);

            if (adaptCropID.HasValue)
            {
                cropZone.CropId = adaptCropID.Value;
            }

            return(cropZone);
        }
Esempio n. 2
0
        public VectorPrescription ImportVectorPrescription(ISOTask task, WorkItem workItem)
        {
            VectorPrescription vectorRx = new VectorPrescription();

            ImportSharedPrescriptionProperties(task, workItem, vectorRx);
            vectorRx.RxShapeLookups = new List <RxShapeLookup>();
            foreach (ISOTreatmentZone treatmentZone in task.TreatmentZones)
            {
                RxShapeLookup shapeLookup = new RxShapeLookup();

                //Rates
                shapeLookup.Rates = new List <RxRate>();
                foreach (ISOProcessDataVariable pdv in treatmentZone.ProcessDataVariables)
                {
                    int?productID = TaskDataMapper.InstanceIDMap.GetADAPTID(pdv.ProductIdRef);
                    if (productID.HasValue)
                    {
                        shapeLookup.Rates.Add(PrescriptionMapper.ImportAndConvertRate(productID.Value, pdv, vectorRx));
                    }
                }

                //Shapes
                PolygonMapper polygonMapper = new PolygonMapper(TaskDataMapper);
                shapeLookup.Shape          = new MultiPolygon();
                shapeLookup.Shape.Polygons = polygonMapper.ImportPolygons(treatmentZone.Polygons).ToList();

                //Add to the collection
                vectorRx.RxShapeLookups.Add(shapeLookup);
            }

            return(vectorRx);
        }
Esempio n. 3
0
        public GuidanceGroup ImportGuidanceGroup(ISOGuidanceGroup isoGuidanceGroup)
        {
            GuidanceGroup adaptGroup = new GuidanceGroup();

            //ID
            ImportIDs(adaptGroup.Id, isoGuidanceGroup.GuidanceGroupId);

            //Description
            adaptGroup.Description = isoGuidanceGroup.GuidanceGroupDesignator;

            //Patterns
            if (isoGuidanceGroup.GuidancePatterns.Any())
            {
                GuidancePatternMapper patternMapper = new GuidancePatternMapper(TaskDataMapper);
                adaptGroup.GuidancePatternIds = patternMapper.ImportGuidancePatterns(isoGuidanceGroup.GuidancePatterns).Select(p => p.Id.ReferenceId).ToList();
            }

            //Boundaries
            if (isoGuidanceGroup.BoundaryPolygons != null)
            {
                PolygonMapper polygonMapper = new PolygonMapper(TaskDataMapper);
                adaptGroup.BoundingPolygon          = new MultiPolygon();
                adaptGroup.BoundingPolygon.Polygons = new List <Polygon>();
                adaptGroup.BoundingPolygon.Polygons.AddRange(polygonMapper.ImportBoundaryPolygons(isoGuidanceGroup.BoundaryPolygons));
            }

            return(adaptGroup);
        }
Esempio n. 4
0
        public Field ImportField(ISOPartfield isoPartfield)
        {
            Field field = new Field();

            //Field ID
            ImportIDs(field.Id, isoPartfield.PartfieldID);

            //Farm ID
            field.FarmId = TaskDataMapper.InstanceIDMap.GetADAPTID(isoPartfield.FarmIdRef);

            //Area
            var numericValue = new NumericValue(new CompositeUnitOfMeasure("m2").ToModelUom(), (double)(isoPartfield.PartfieldArea));

            field.Area = new NumericRepresentationValue(RepresentationInstanceList.vrReportedFieldArea.ToModelRepresentation(), numericValue.UnitOfMeasure, numericValue);

            //Name
            field.Description = isoPartfield.PartfieldDesignator;

            //Boundary
            PolygonMapper         polygonMapper    = new PolygonMapper(TaskDataMapper);
            IEnumerable <Polygon> boundaryPolygons = polygonMapper.ImportPolygons(isoPartfield.Polygons).ToList();

            if (boundaryPolygons.Any())
            {
                MultiPolygon boundary = new MultiPolygon();
                boundary.Polygons = boundaryPolygons.ToList();
                FieldBoundary fieldBoundary = new FieldBoundary
                {
                    FieldId     = field.Id.ReferenceId,
                    SpatialData = boundary,
                };

                //Add the boundary to the Catalog
                if (DataModel.Catalog.FieldBoundaries == null)
                {
                    DataModel.Catalog.FieldBoundaries = new List <FieldBoundary>();
                }
                DataModel.Catalog.FieldBoundaries.Add(fieldBoundary);

                field.ActiveBoundaryId = fieldBoundary.Id.ReferenceId;
            }

            //Guidance
            GuidanceGroupMapper         guidanceGroupMapper = new GuidanceGroupMapper(TaskDataMapper);
            IEnumerable <GuidanceGroup> groups = guidanceGroupMapper.ImportGuidanceGroups(isoPartfield.GuidanceGroups);

            if (groups.Any())
            {
                field.GuidanceGroupIds = groups.Select(g => g.Id.ReferenceId).ToList();
            }

            //TODO any obstacle, flag, entry, etc. data
            //TODO store Partfield Code as ContextItem

            return(field);
        }
Esempio n. 5
0
        public ISOPartfield ExportField(Field adaptField)
        {
            ISOPartfield isoField = new ISOPartfield();

            //Field ID
            string fieldID = adaptField.Id.FindIsoId() ?? GenerateId();

            isoField.PartfieldID = fieldID;
            ExportIDs(adaptField.Id, fieldID);
            ExportContextItems(adaptField.ContextItems, fieldID, "ADAPT_Context_Items:Field");

            //Customer & Farm ID
            ExportFarmAndGrower(adaptField, isoField);

            //isoField.PartfieldCode = ? //TODO ContextItem?

            //Area
            if (adaptField.Area != null)
            {
                isoField.PartfieldArea = (uint)(adaptField.Area.Value.ConvertToUnit(new CompositeUnitOfMeasure("m2")));
            }

            //Name
            isoField.PartfieldDesignator = adaptField.Description;

            //Boundary
            PolygonMapper polygonMapper = new PolygonMapper(TaskDataMapper);
            FieldBoundary boundary      = DataModel.Catalog.FieldBoundaries.SingleOrDefault(b => b.FieldId == adaptField.Id.ReferenceId);

            if (boundary != null)
            {
                IEnumerable <ISOPolygon> isoPolygons = polygonMapper.ExportPolygons(boundary.SpatialData.Polygons, ISOEnumerations.ISOPolygonType.PartfieldBoundary);
                isoField.Polygons.AddRange(isoPolygons);
            }

            //Guidance
            if (DataModel.Catalog.GuidanceGroups != null)
            {
                List <GuidanceGroup> groups = new List <GuidanceGroup>();
                foreach (int groupID in adaptField.GuidanceGroupIds)
                {
                    GuidanceGroup group = DataModel.Catalog.GuidanceGroups.SingleOrDefault(g => g.Id.ReferenceId == groupID);
                    if (group != null)
                    {
                        groups.Add(group);
                    }
                }
                GuidanceGroupMapper ggpMapper = TaskDataMapper.GuidanceGroupMapper;
                isoField.GuidanceGroups = ggpMapper.ExportGuidanceGroups(groups).ToList();
            }

            //TODO any obstacle, flag, entry, etc. data pending fixes to InteriorBoundaryAttribute class

            return(isoField);
        }
Esempio n. 6
0
        public ISOGuidancePattern ExportGuidancePattern(GuidancePattern adaptGuidancePattern)
        {
            ISOGuidancePattern gpn = new ISOGuidancePattern();

            //ID
            string gpnID = adaptGuidancePattern.Id.FindIsoId() ?? GenerateId();

            gpn.GuidancePatternId = gpnID;
            ExportIDs(adaptGuidancePattern.Id, gpnID);

            gpn.GuidancePatternDesignator = adaptGuidancePattern.Description;
            gpn.GuidancePatternType       = ExportGuidancePatternType(adaptGuidancePattern.GuidancePatternType);
            gpn.PropagationDirection      = ExportPropagationDirection(adaptGuidancePattern.PropagationDirection);
            gpn.Extension = ExportExtension(adaptGuidancePattern.Extension);
            gpn.Heading   = ExportHeading(adaptGuidancePattern);
            if (adaptGuidancePattern.GpsSource != null)
            {
                gpn.GNSSMethod = ExportGNSSMethod(adaptGuidancePattern.GpsSource.SourceType);
                if (adaptGuidancePattern.GpsSource.HorizontalAccuracy != null)
                {
                    gpn.HorizontalAccuracy = (decimal)adaptGuidancePattern.GpsSource.HorizontalAccuracy.AsConvertedDouble("m").Value;
                }
                if (adaptGuidancePattern.GpsSource.VerticalAccuracy != null)
                {
                    gpn.VerticalAccuracy = (decimal)adaptGuidancePattern.GpsSource.VerticalAccuracy.AsConvertedDouble("m").Value;
                }
            }
            gpn.OriginalSRID        = adaptGuidancePattern.OriginalEpsgCode;
            gpn.NumberOfSwathsLeft  = (uint?)adaptGuidancePattern.NumbersOfSwathsLeft;
            gpn.NumberOfSwathsRight = (uint?)adaptGuidancePattern.NumbersOfSwathsRight;

            //Pattern
            LineStringMapper lineStringMapper = new LineStringMapper(TaskDataMapper);

            gpn.LineString = lineStringMapper.ExportGuidancePattern(adaptGuidancePattern);

            if (adaptGuidancePattern is PivotGuidancePattern pivot &&
                pivot.DefinitionMethod == PivotGuidanceDefinitionEnum.PivotGuidancePatternCenterRadius &&
                pivot.Radius != null)
            {
                gpn.Radius = (uint)pivot.Radius.AsConvertedInt("mm").Value;
                gpn.GuidancePatternOptions = ISOGuidancePatternOption.FullCircle;
            }

            //Boundary
            if (adaptGuidancePattern.BoundingPolygon != null)
            {
                PolygonMapper polygonMapper = new PolygonMapper(TaskDataMapper);
                gpn.BoundaryPolygons = polygonMapper.ExportMultipolygon(adaptGuidancePattern.BoundingPolygon, ISOPolygonType.Other).ToList();
            }

            return(gpn);
        }
Esempio n. 7
0
        private void ExportVectorPrescription(ISOTask task, VectorPrescription rx)
        {
            byte i = 0;

            foreach (RxShapeLookup shapeLookup in rx.RxShapeLookups)
            {
                ISOTreatmentZone tzn = new ISOTreatmentZone();
                tzn.TreatmentZoneCode = i++;
                foreach (RxRate rxRate in shapeLookup.Rates)
                {
                    tzn.ProcessDataVariables.Add(ExportProcessDataVariable(rxRate, rx));
                }

                PolygonMapper polygonMapper = new PolygonMapper(TaskDataMapper);
                tzn.Polygons = polygonMapper.ExportPolygons(shapeLookup.Shape.Polygons, ISOEnumerations.ISOPolygonType.TreatmentZone).ToList();
                task.TreatmentZones.Add(tzn);
            }
        }
Esempio n. 8
0
        public ISOGuidanceGroup ExportGuidanceGroup(GuidanceGroup adaptGuidanceGroup)
        {
            ISOGuidanceGroup isoGroup = new ISOGuidanceGroup();

            //ID
            string id = adaptGuidanceGroup.Id.FindIsoId() ?? GenerateId();

            isoGroup.GuidanceGroupId = id;
            ExportIDs(adaptGuidanceGroup.Id, id);

            //Designator
            isoGroup.GuidanceGroupDesignator = adaptGuidanceGroup.Description;

            //Patterns
            if (adaptGuidanceGroup.GuidancePatternIds.Any())
            {
                List <GuidancePattern> patterns = new List <GuidancePattern>();
                foreach (int adaptID in adaptGuidanceGroup.GuidancePatternIds)
                {
                    GuidancePattern adaptPattern = DataModel.Catalog.GuidancePatterns.SingleOrDefault(p => p.Id.ReferenceId == adaptID);
                    if (adaptPattern != null)
                    {
                        patterns.Add(adaptPattern);
                    }
                }
                GuidancePatternMapper patternMapper = TaskDataMapper.GuidancePatternMapper;
                isoGroup.GuidancePatterns = patternMapper.ExportGuidancePatterns(patterns).ToList();
            }

            //Boundaries
            if (adaptGuidanceGroup.BoundingPolygon != null)
            {
                PolygonMapper polygonMapper = new PolygonMapper(TaskDataMapper);
                isoGroup.BoundaryPolygons = polygonMapper.ExportMultipolygon(adaptGuidanceGroup.BoundingPolygon, ISOPolygonType.Other).ToList();
            }

            return(isoGroup);
        }
Esempio n. 9
0
        public ISOGuidancePattern ExportGuidancePattern(GuidancePattern adaptGuidancePattern)
        {
            ISOGuidancePattern gpn = new ISOGuidancePattern();

            //ID
            string gpnID = adaptGuidancePattern.Id.FindIsoId() ?? GenerateId();

            gpn.GuidancePatternId = gpnID;
            ExportIDs(adaptGuidancePattern.Id, gpnID);

            gpn.GuidancePatternDesignator = adaptGuidancePattern.Description;
            gpn.GuidancePatternType       = ExportGuidancePatternType(adaptGuidancePattern.GuidancePatternType);
            gpn.PropagationDirection      = ExportPropagationDirection(adaptGuidancePattern.PropagationDirection);
            gpn.Extension           = ExportExtension(adaptGuidancePattern.Extension);
            gpn.Heading             = ExportHeading(adaptGuidancePattern);
            gpn.GNSSMethod          = ExportGNSSMethod(adaptGuidancePattern.GpsSource.SourceType);
            gpn.HorizontalAccuracy  = (decimal)adaptGuidancePattern.GpsSource.HorizontalAccuracy.AsConvertedDouble("m");
            gpn.VerticalAccuracy    = (decimal)adaptGuidancePattern.GpsSource.VerticalAccuracy.AsConvertedDouble("m");
            gpn.OriginalSRID        = adaptGuidancePattern.OriginalEpsgCode;
            gpn.NumberOfSwathsLeft  = (uint?)adaptGuidancePattern.NumbersOfSwathsLeft;
            gpn.NumberOfSwathsRight = (uint?)adaptGuidancePattern.NumbersOfSwathsRight;

            //Pattern
            LineStringMapper lineStringMapper = new LineStringMapper(TaskDataMapper);

            switch (adaptGuidancePattern.GuidancePatternType)
            {
            case GuidancePatternTypeEnum.AbCurve:
                AbCurve curve = adaptGuidancePattern as AbCurve;
                gpn.LineString = lineStringMapper.ExportLineString(curve.Shape[0], ISOLineStringType.GuidancePattern);     //Only first linestring used.
                break;

            case GuidancePatternTypeEnum.AbLine:
                AbLine     abLine = adaptGuidancePattern as AbLine;
                LineString line   = new LineString {
                    Points = new List <Point>()
                };
                line.Points.Add(abLine.A);
                line.Points.Add(abLine.B);
                gpn.LineString = lineStringMapper.ExportLineString(line, ISOLineStringType.GuidancePattern);
                break;

            case GuidancePatternTypeEnum.APlus:
                APlus      aPlus     = adaptGuidancePattern as APlus;
                LineString aPlusLine = new LineString {
                    Points = new List <Point>()
                };
                aPlusLine.Points.Add(aPlus.Point);
                gpn.LineString = lineStringMapper.ExportLineString(aPlusLine, ISOLineStringType.GuidancePattern);
                break;

            case GuidancePatternTypeEnum.CenterPivot:
                PivotGuidancePattern pivot     = adaptGuidancePattern as PivotGuidancePattern;
                LineString           pivotLine = new LineString {
                    Points = new List <Point>()
                };
                pivotLine.Points.Add(pivot.Center);

                if (pivot.StartPoint != null)
                {
                    pivotLine.Points.Add(pivot.StartPoint);
                    if (pivot.EndPoint != null)
                    {
                        pivotLine.Points.Add(pivot.EndPoint);
                    }
                }
                gpn.LineString = lineStringMapper.ExportLineString(pivotLine, ISOLineStringType.GuidancePattern);
                //gpn.Radius = ?  //Not implemented
                //gpn.GuidancePatternOptions = ? //Not implemented
                break;

            case GuidancePatternTypeEnum.Spiral:
                Spiral spiral = adaptGuidancePattern as Spiral;
                gpn.LineString = lineStringMapper.ExportLineString(spiral.Shape, ISOLineStringType.GuidancePattern);
                break;
            }

            //Boundary
            if (adaptGuidancePattern.BoundingPolygon != null)
            {
                PolygonMapper polygonMapper = new PolygonMapper(TaskDataMapper);
                gpn.BoundaryPolygons = polygonMapper.ExportPolygons(adaptGuidancePattern.BoundingPolygon.Polygons, ISOPolygonType.Other).ToList();
            }

            return(gpn);
        }
Esempio n. 10
0
        public ISOPartfield ExportCropZone(CropZone cropZone)
        {
            ISOPartfield isoField = new ISOPartfield();

            //Field ID
            string fieldID = cropZone.Id.FindIsoId() ?? GenerateId();

            isoField.PartfieldID = fieldID;
            ExportIDs(cropZone.Id, fieldID);

            //Parent Field ID
            isoField.FieldIdRef = TaskDataMapper.InstanceIDMap.GetISOID(cropZone.FieldId);

            //Customer & Farm ID
            Field field = DataModel.Catalog.Fields.FirstOrDefault(f => f.Id.ReferenceId == cropZone.FieldId);

            if (field != null)
            {
                ExportFarmAndGrower(field, isoField);
            }


            //Area
            if (cropZone.Area != null)
            {
                isoField.PartfieldArea = (uint)(cropZone.Area.Value.ConvertToUnit(new CompositeUnitOfMeasure("m2")));
            }

            //Name
            isoField.PartfieldDesignator = cropZone.Description;

            //Boundary
            if (cropZone.BoundingRegion != null)
            {
                PolygonMapper polygonMapper = new PolygonMapper(TaskDataMapper);
                isoField.Polygons = polygonMapper.ExportPolygons(cropZone.BoundingRegion.Polygons, ISOEnumerations.ISOPolygonType.PartfieldBoundary).ToList();
            }

            //Guidance
            if (DataModel.Catalog.GuidanceGroups != null)
            {
                List <GuidanceGroup> groups = new List <GuidanceGroup>();
                foreach (int groupID in cropZone.GuidanceGroupIds)
                {
                    GuidanceGroup group = DataModel.Catalog.GuidanceGroups.SingleOrDefault(g => g.Id.ReferenceId == groupID);
                    if (group != null)
                    {
                        groups.Add(group);
                    }
                }
                GuidanceGroupMapper ggpMapper = new GuidanceGroupMapper(TaskDataMapper);
                isoField.GuidanceGroups = ggpMapper.ExportGuidanceGroups(groups).ToList();
            }

            if (cropZone.CropId.HasValue)
            {
                string isoCrop = TaskDataMapper.InstanceIDMap.GetISOID(cropZone.CropId.Value);
                isoField.CropTypeIdRef = isoCrop;
            }

            return(isoField);
        }
Esempio n. 11
0
        public Field ImportField(ISOPartfield isoPartfield)
        {
            Field field = new Field();

            //Field ID
            ImportIDs(field.Id, isoPartfield.PartfieldID);
            field.ContextItems = ImportContextItems(isoPartfield.PartfieldID, "ADAPT_Context_Items:Field");

            //Farm ID
            field.FarmId = TaskDataMapper.InstanceIDMap.GetADAPTID(isoPartfield.FarmIdRef);

            //Area
            var numericValue = new NumericValue(new CompositeUnitOfMeasure("m2").ToModelUom(), (double)(isoPartfield.PartfieldArea));

            field.Area = new NumericRepresentationValue(RepresentationInstanceList.vrReportedFieldArea.ToModelRepresentation(), numericValue.UnitOfMeasure, numericValue);

            //Name
            field.Description = isoPartfield.PartfieldDesignator;

            //Boundary
            FieldBoundary         fieldBoundary    = null;
            PolygonMapper         polygonMapper    = new PolygonMapper(TaskDataMapper);
            IEnumerable <Polygon> boundaryPolygons = polygonMapper.ImportBoundaryPolygons(isoPartfield.Polygons);

            if (boundaryPolygons.Any())
            {
                MultiPolygon boundary = new MultiPolygon();
                boundary.Polygons = boundaryPolygons.ToList();
                fieldBoundary     = new FieldBoundary
                {
                    FieldId     = field.Id.ReferenceId,
                    SpatialData = boundary,
                };

                //Add the boundary to the Catalog
                if (DataModel.Catalog.FieldBoundaries == null)
                {
                    DataModel.Catalog.FieldBoundaries = new List <FieldBoundary>();
                }
                DataModel.Catalog.FieldBoundaries.Add(fieldBoundary);

                field.ActiveBoundaryId = fieldBoundary.Id.ReferenceId;
            }

            //Guidance
            GuidanceGroupMapper         guidanceGroupMapper = new GuidanceGroupMapper(TaskDataMapper);
            IEnumerable <GuidanceGroup> groups = guidanceGroupMapper.ImportGuidanceGroups(isoPartfield.GuidanceGroups);

            if (groups.Any())
            {
                field.GuidanceGroupIds = groups.Select(g => g.Id.ReferenceId).ToList();
            }

            //Obstacles, flags, etc.
            if (fieldBoundary != null)
            {
                foreach (AttributeShape attributePolygon in polygonMapper.ImportAttributePolygons(isoPartfield.Polygons))
                {
                    fieldBoundary.InteriorBoundaryAttributes.Add(
                        new InteriorBoundaryAttribute()
                    {
                        Description  = attributePolygon.Name,
                        ContextItems = new List <ContextItem>()
                        {
                            new ContextItem()
                            {
                                Code = "Pr_ISOXML_Attribute_Type", Value = attributePolygon.TypeName
                            }
                        },
                        Shape = attributePolygon.Shape
                    });
                }
                if (isoPartfield.LineStrings.Any())
                {
                    LineStringMapper lsgMapper = new LineStringMapper(TaskDataMapper);
                    foreach (AttributeShape attributeLsg in lsgMapper.ImportAttributeLineStrings(isoPartfield.LineStrings))
                    {
                        fieldBoundary.InteriorBoundaryAttributes.Add(
                            new InteriorBoundaryAttribute()
                        {
                            Description  = attributeLsg.Name,
                            ContextItems = new List <ContextItem>()
                            {
                                new ContextItem()
                                {
                                    Code = "Pr_ISOXML_Attribute_Type", Value = attributeLsg.TypeName
                                }
                            },
                            Shape = attributeLsg.Shape
                        });
                    }
                }
                if (isoPartfield.Points.Any())
                {
                    PointMapper pointMapper = new PointMapper(TaskDataMapper);
                    foreach (AttributeShape attributePoint in pointMapper.ImportAttributePoints(isoPartfield.Points))
                    {
                        fieldBoundary.InteriorBoundaryAttributes.Add(
                            new InteriorBoundaryAttribute()
                        {
                            Description  = attributePoint.Name,
                            ContextItems = new List <ContextItem>()
                            {
                                new ContextItem()
                                {
                                    Code = "Pr_ISOXML_Attribute_Type", Value = attributePoint.TypeName
                                }
                            },
                            Shape = attributePoint.Shape
                        });
                    }
                }
            }

            //TODO store Partfield Code as ContextItem

            return(field);
        }