1
設置shape文件的coordinatesystem我有下面的代碼讀取shape文件集(.DBF,.PRJ,.SHP,.SHX)與NetTopologySuite.IO.ShapefileDataReader
:如何確定與ShapefileDataReader
public FeatureCollection ReadShapeFile(string localShapeFile)
{
var collection = new FeatureCollection();
var factory = new GeometryFactory();
using (var reader = new ShapefileDataReader(localShapeFile, factory))
{
var header = reader.DbaseHeader;
while (reader.Read())
{
var f = new Feature {Geometry = reader.Geometry};
var attrs = new AttributesTable();
for (var i = 0; i < header.NumFields; i++)
{
attrs.AddAttribute(header.Fields[i].Name, reader.GetValue(i));
}
f.Attributes = attrs;
collection.Add(f);
}
}
return collection;
}
該作品,但幾何對象沒有屬性來指示座標所在的參考系。
如何找出形狀文件或單個形狀所在的座標系/參照系?