コード例 #1
0
        static void GeoJSON1Test(string shpPath)
        {
            IFeatureSet fs      = FeatureSet.Open(shpPath);
            var         geoJson = fs.ToGeoJSON(false);

            Console.WriteLine(geoJson);
            var geojsonPath = Path.ChangeExtension(shpPath, ".json");

            if (File.Exists(geojsonPath))
            {
                File.Delete(geojsonPath);
            }

            using var sw = new StreamWriter(geojsonPath, false);
            sw.WriteLine(geoJson);
        }