//Added by Rob to avoid looping through individual records
        public static void saveShapefile(string filename, GEORegionData shapeData)
        {
            ShapeFileIO sfl = new ShapeFileIO();

            sfl.use(shapeData);

            sfl.save(filename);
        }
Beispiel #2
0
        public GeoJSONCoverage(GEORegionData[] coverage)
        {
            List<GeoJSONFeature> featureList = new List<GeoJSONFeature>();
            GEORegions geometry = (GEORegions) coverage[0].geometry;
            for (int i = 0; i < geometry.count(); i++)
            {
                var geoRegion = geometry.item(i);
                Dictionary<string, object> values = new Dictionary<string, object>();
                for (int col = 0; col < coverage.Length; col++)
                {
                    var data = coverage[col];
                    values[data.name] = data.cellObject(data.itemForGEORegion(geoRegion));
                }
                featureList.Add(new GeoJSONFeature(geoRegion, values));

            }
            features = featureList.ToArray();
        }