GetRecordInfo() public method

public GetRecordInfo ( ) : ObservableCollection
return ObservableCollection
Ejemplo n.º 1
0
        private static void WriteLines(ref XmlWriter writer, ref ParcelData parcelData, ref DocumentEntry documentType, ref Configuration configuration)
        {
            writer.WriteStartElement("lines");

            // Write non radial lines
            ObservableCollection <ParcelLineRow> parcelRecord = parcelData.GetRecordInfo();
            Int32 firstId = -1, index = 0, count = 0;

            foreach (ParcelLineRow record in parcelRecord)
            {
                if (!IncompleteLine(record))
                {
                    count++;
                }
            }

            foreach (ParcelLineRow record in parcelRecord)
            {
                if (IncompleteLine(record))
                {
                    continue;
                }

                index++;
                if ((firstId == -1) && (record.Category == LineCategory.Boundary))
                {
                    firstId = record.GetFrom();
                }
                Int32 overrideTo = count == index && count != 1 ? firstId : -1;

                if (record.Category != LineCategory.Radial)
                {
                    WriteLine(ref writer, record, ref documentType, overrideTo);
                }
            }

            // Write radial lines
            foreach (ParcelLineRow record in parcelRecord)
            {
                if (record.CenterPoint == null)
                {
                    continue;
                }

                ParcelLineRow radialRecord = new ParcelLineRow(ref configuration);

                radialRecord.From     = record.From;
                radialRecord.To       = record.CenterPoint.ToString();
                radialRecord.Bearing  = GeometryUtil.RadianToDegree(record.RadialBearing1.GetValueOrDefault(0)).ToString();
                radialRecord.Distance = record.Radius;
                radialRecord.Category = LineCategory.Radial;
                WriteLine(ref writer, radialRecord, ref documentType, -1);

                radialRecord.From    = record.To;
                radialRecord.Bearing = GeometryUtil.RadianToDegree(record.RadialBearing2.GetValueOrDefault(0)).ToString();
                WriteLine(ref writer, radialRecord, ref documentType, -1);
            }

            writer.WriteEndElement(); // lines
        }
Ejemplo n.º 2
0
        private static void WritePlans(ref XmlWriter writer, ref ParcelData parcelData, ref PointDictionary pointDictionary, ref MapPoint projectedStartPoint, double scale, double rotation, ref Configuration configuration, ref DocumentEntry documentType)
        {
            ObservableCollection <ParcelLineRow> parcelRecord = parcelData.GetRecordInfo();

            writer.WriteStartElement("plans");
            writer.WriteStartElement("plan");
            writer.WriteElementString("name", parcelData.PlanName);
            writer.WriteElementString("description", documentType.Name);
            writer.WriteElementString("angleUnits", XMLDirectionUnit(parcelData.Configuration.EntryFormat));
            writer.WriteElementString("distanceUnits", GeometryUtil.PacketUnitString(configuration.EntryUnitsPerMeter));
            writer.WriteElementString("directionFormat", XMLDirectionType(parcelData.Configuration.EntryFormat));
            writer.WriteElementString("areaUnits", XMLAreaUnit(parcelData.Configuration.AreaUnit));
            writer.WriteElementString("lineParameters", "ChordBearingAndChordLengthAndRadius");

            WriteParcel(ref writer, ref parcelData, ref pointDictionary, ref projectedStartPoint, scale, rotation, ref configuration, ref documentType);

            writer.WriteEndElement();
            writer.WriteEndElement();
        }
Ejemplo n.º 3
0
        private static void WritePlans(ref XmlWriter writer, ref ParcelData parcelData, ref PointDictionary pointDictionary, ref MapPoint projectedStartPoint, double scale, double rotation, ref Configuration configuration, ref DocumentEntry documentType)
        {
            ObservableCollection<ParcelLineRow> parcelRecord = parcelData.GetRecordInfo();

              writer.WriteStartElement("plans");
              writer.WriteStartElement("plan");
              writer.WriteElementString("name", parcelData.PlanName);
              writer.WriteElementString("description", documentType.Name);
              writer.WriteElementString("angleUnits", XMLDirectionUnit(parcelData.Configuration.EntryFormat));
              writer.WriteElementString("distanceUnits", GeometryUtil.PacketUnitString(configuration.EntryUnitsPerMeter));
              writer.WriteElementString("directionFormat", XMLDirectionType(parcelData.Configuration.EntryFormat));
              writer.WriteElementString("areaUnits", XMLAreaUnit(parcelData.Configuration.AreaUnit));
              writer.WriteElementString("lineParameters", "ChordBearingAndChordLengthAndRadius");

              WriteParcel(ref writer, ref parcelData, ref pointDictionary, ref projectedStartPoint, scale, rotation, ref configuration, ref documentType);

              writer.WriteEndElement();
              writer.WriteEndElement();
        }
Ejemplo n.º 4
0
        private static void WriteParcel(ref XmlWriter writer, ref ParcelData parcelData, ref PointDictionary pointDictionary, ref MapPoint projectedStartPoint, double scale, double rotation, ref Configuration configuration, ref DocumentEntry documentType)
        {
            ObservableCollection<ParcelLineRow> parcelRecord = parcelData.GetRecordInfo();
              if (parcelRecord.Count == 0)
            return;

              if (rotation < 0)
            rotation += 360;

              writer.WriteStartElement("parcels");
              writer.WriteStartElement("parcel");
              writer.WriteElementString("name", parcelData.ParcelName);
              if (scale != 1.0)
            writer.WriteElementString("scale", scale.ToString(_doubleFormat));
              if (rotation != 0.0)
            writer.WriteElementString("rotation", rotation.ToString(_doubleFormat));

              string statedArea = "statedArea";
              if (parcelData.StatedArea != "")
            writer.WriteElementString(statedArea, parcelData.StatedArea);
              else if (parcelData.MiscloseArea > 0)
            writer.WriteElementString(statedArea, parcelData.MiscloseArea.ToString("F2"));
              writer.WriteElementString("joined", "false");
              writer.WriteElementString("parcelNo", "1");
              writer.WriteElementString("type", documentType.Type.ToString());
              if ((parcelData.MiscloseDistance != 0.0) && (parcelData.MiscloseBearing != 0.0))
              {
            writer.WriteElementString("miscloseDistance", parcelData.MiscloseDistance.ToString(_doubleFormat));
            writer.WriteElementString("miscloseBearing", parcelData.MiscloseBearing.ToString(_doubleFormat));
              }

              // Write document type EA object
              if (documentType.HasEA)
              {
            writer.WriteStartElement("extendedAttributes");
            writer.WriteStartElement("extendedAttribute");
            writer.WriteElementString("name", documentType.EAField);
            writer.WriteElementString("value", documentType.EAValue);
            writer.WriteElementString("type", "VT_BSTR");
            writer.WriteEndElement();
            writer.WriteEndElement();
              }

              WriteConstructionData(ref writer, ref parcelData, ref pointDictionary, ref projectedStartPoint, ref configuration, parcelRecord[0]);

              WriteLines(ref writer, ref parcelData, ref documentType, ref configuration);

              writer.WriteEndElement(); // parcel
              writer.WriteEndElement(); // parcels
        }
Ejemplo n.º 5
0
        private static void WriteLines(ref XmlWriter writer, ref ParcelData parcelData, ref DocumentEntry documentType, ref Configuration configuration)
        {
            writer.WriteStartElement("lines");

              // Write non radial lines
              ObservableCollection<ParcelLineRow> parcelRecord = parcelData.GetRecordInfo();
              Int32 firstId = -1, index = 0, count = 0;
              foreach (ParcelLineRow record in parcelRecord)
            if (!IncompleteLine(record))
              count++;

              foreach (ParcelLineRow record in parcelRecord)
              {
            if (IncompleteLine(record))
              continue;

            index++;
            if ((firstId == -1) && (record.Category == LineCategory.Boundary))
              firstId = record.GetFrom();
            Int32 overrideTo = count == index && count != 1 ? firstId : -1;

            if (record.Category != LineCategory.Radial)
              WriteLine(ref writer, record, ref documentType, overrideTo);
              }

              // Write radial lines
              foreach (ParcelLineRow record in parcelRecord)
              {
            if (record.CenterPoint == null)
              continue;

            ParcelLineRow radialRecord = new ParcelLineRow(ref configuration);

            radialRecord.From = record.From;
            radialRecord.To = record.CenterPoint.ToString();
            radialRecord.Bearing = GeometryUtil.RadianToDegree(record.RadialBearing1.GetValueOrDefault(0)).ToString();
            radialRecord.Distance = record.Radius;
            radialRecord.Category = LineCategory.Radial;
            WriteLine(ref writer, radialRecord, ref documentType, -1);

            radialRecord.From = record.To;
            radialRecord.Bearing = GeometryUtil.RadianToDegree(record.RadialBearing2.GetValueOrDefault(0)).ToString();
            WriteLine(ref writer, radialRecord, ref documentType, -1);
              }

              writer.WriteEndElement(); // lines
        }
Ejemplo n.º 6
0
        private static void WriteParcel(ref XmlWriter writer, ref ParcelData parcelData, ref PointDictionary pointDictionary, ref MapPoint projectedStartPoint, double scale, double rotation, ref Configuration configuration, ref DocumentEntry documentType)
        {
            ObservableCollection <ParcelLineRow> parcelRecord = parcelData.GetRecordInfo();

            if (parcelRecord.Count == 0)
            {
                return;
            }

            if (rotation < 0)
            {
                rotation += 360;
            }

            writer.WriteStartElement("parcels");
            writer.WriteStartElement("parcel");
            writer.WriteElementString("name", parcelData.ParcelName);
            if (scale != 1.0)
            {
                writer.WriteElementString("scale", scale.ToString(_doubleFormat));
            }
            if (rotation != 0.0)
            {
                writer.WriteElementString("rotation", rotation.ToString(_doubleFormat));
            }

            string statedArea = "statedArea";

            if (parcelData.StatedArea != "")
            {
                writer.WriteElementString(statedArea, parcelData.StatedArea);
            }
            else if (parcelData.MiscloseArea > 0)
            {
                writer.WriteElementString(statedArea, parcelData.MiscloseArea.ToString("F2"));
            }
            writer.WriteElementString("joined", "false");
            writer.WriteElementString("parcelNo", "1");
            writer.WriteElementString("type", documentType.Type.ToString());
            if ((parcelData.MiscloseDistance != 0.0) && (parcelData.MiscloseBearing != 0.0))
            {
                writer.WriteElementString("miscloseDistance", parcelData.MiscloseDistance.ToString(_doubleFormat));
                writer.WriteElementString("miscloseBearing", parcelData.MiscloseBearing.ToString(_doubleFormat));
            }

            // Write document type EA object
            if (documentType.HasEA)
            {
                writer.WriteStartElement("extendedAttributes");
                writer.WriteStartElement("extendedAttribute");
                writer.WriteElementString("name", documentType.EAField);
                writer.WriteElementString("value", documentType.EAValue);
                writer.WriteElementString("type", "VT_BSTR");
                writer.WriteEndElement();
                writer.WriteEndElement();
            }

            WriteConstructionData(ref writer, ref parcelData, ref pointDictionary, ref projectedStartPoint, ref configuration, parcelRecord[0]);

            WriteLines(ref writer, ref parcelData, ref documentType, ref configuration);

            writer.WriteEndElement(); // parcel
            writer.WriteEndElement(); // parcels
        }