public void CountParcels(bool on)
 {
     if (on)
     {
         Parcels.ForEach(r => Factors.Add(r));
     }
     else
     {
         Parcels.ForEach(r => Factors.Remove(r));
     }
 }
Example #2
0
        public void SaveCml(string path)
        {
            XElement xroads   = new XElement("Roads");
            XElement xparcels = new XElement("Parcels");
            XElement xspots   = new XElement("CitySpots");
            XElement xlinears = new XElement("CityLinears");
            XElement xregions = new XElement("CityRegions");

            XElement xe = new XElement("TongjiCity", xroads, xparcels, xspots, xlinears, xregions);

            xe.Add(new XAttribute("Extents", Extents.ToString()));
            xe.Add(new XAttribute("CmlVersion", CurrentCmlVersion));

            Roads.ForEach(x => xroads.Add(x.ToXElement()));
            Parcels.ForEach(x => xparcels.Add(x.ToXElement()));
            CitySpots.ForEach(x => xspots.Add(x.ToXElement()));
            CityLinears.ForEach(x => xlinears.Add(x.ToXElement()));
            CityRegions.ForEach(x => xregions.Add(x.ToXElement()));

            xe.Save(path);
        }