将ShapeFile 读取为 FeatureCollection:
public bool ShpToFeatureCollection1(string filename, out FeatureCollection collection)
{
collection = null;
try
{
var featureCollection = new Collection<DotSpatial.NetTopologySuite.Features.IFeature>();
if (!File.Exists(filename + ".dbf"))
{
return false;
}
var streamreader = new ShapefileStreamProviderRegistry(filename);
var dataReader = new ShapefileDataReader(streamreader, new GeometryFactory(new PrecisionModel()));
while (dataReader.Read())
{
var feature = new DotSpatial.NetTopol