Exemple #1
0
        public void RunFiles()
        {
            var basePath = AppDomain.CurrentDomain.BaseDirectory;

            foreach (var filename in testFileList)
            {
                var filePath = Path.Combine(basePath, "Resources", "Kml", filename);

                var xml = File.ReadAllText(filePath);

                var json = GeoJsonConverter.FromKml(xml);
            }
        }
        public bool ToGeoJson(string xml, out string json)
        {
            json = null;

            try
            {
                json = GeoJsonConverter.FromKml(xml);

                return(true);
            }
            catch (Exception e)
            {
                logger.LogError(e, "Failed to convert Kml to GeoJson");

                return(false);
            }
        }