Пример #1
0
        public void WriteXML(XmlTextWriter writer)
        {
            writer.WriteStartElement("RangeDescriptor");
            tileAddress.WriteXMLToAttributes(writer);
            string quadKey = VENamingScheme.GetQuadKey(tileAddress);

            writer.WriteAttributeString("QuadTreeLocation", quadKey);
            FodderSupport.WriteQuadTreeFodderString(writer, FodderSupport.DigitsToLetters(quadKey));
            writer.WriteEndElement();
        }
Пример #2
0
        public void WriteXML(XmlTextWriter writer)
        {
            writer.WriteStartElement(crunchedFileTag);
            writer.WriteAttributeString("xmlns:rdf", "http://www.w3.org/1999/02/22-rdf-syntax-ns#");
            writer.WriteAttributeString("xmlns:dc", "http://purl.org/dc/elements/1.1/");
            writer.WriteAttributeString("xmlns:cc", "http://web.resource.org/cc/");
            writer.WriteAttributeString("Version", "1.6");
            writer.WriteAttributeString(renderDateTag, DateTime.Now.ToString());
            if (sourceMashupFilename != null)
            {
                writer.WriteAttributeString(SourceMashupFilenameAttr, sourceMashupFilename);
            }

            if (permitComposition)
            {
                WritePermitCompositionLicense(writer);
            }

            writer.WriteStartElement("BoundsList");
            foreach (TileRectangle current in boundsList)
            {
                writer.WriteStartElement("Bounds");
                writer.WriteAttributeString("zoom", current.zoom.ToString());
                writer.WriteAttributeString("X0", current.TopLeft.TileX.ToString());
                writer.WriteAttributeString("Y0", current.TopLeft.TileY.ToString());
                writer.WriteAttributeString("X1", (current.BottomRight.TileX + 1).ToString());
                writer.WriteAttributeString("Y1", (current.BottomRight.TileY + 1).ToString());
                writer.WriteEndElement();
            }

            writer.WriteEndElement();
            writer.WriteStartElement("CrunchedFileIdentifier");
            FodderSupport.WriteAppFodderString(writer, FodderSupport.MapCruncherAppIDString, "");
            writer.WriteEndElement();
            writer.WriteStartElement("MapCruncherAppVersion");
            writer.WriteAttributeString("version",
                                        MapCruncher.MSR.CVE.BackMaker.Resources.Version.ApplicationVersionNumber);
            FodderSupport.WriteAppFodderString(writer,
                                               FodderSupport.MapCruncherAppIDString,
                                               "Version" + FodderSupport.DigitsToLetters(
                                                   FodderSupport.ExtractDigits(
                                                       MapCruncher.MSR.CVE.BackMaker.Resources.Version.ApplicationVersionNumber)));
            writer.WriteEndElement();
            writer.WriteStartElement(LayerList.GetXMLTag());
            foreach (CrunchedLayer current2 in crunchedLayers)
            {
                current2.WriteXML(writer);
            }

            writer.WriteEndElement();
            writer.WriteEndElement();
        }