/// <summary> /// Opens ESRI shapefile datasource, reads it into memory breaks any connection with the source. /// </summary> public static FeatureSet OpenAsInMemoryDatasource(string filename) { var sf = new Shapefile(); sf.CreateNew(string.Empty, ShpfileType.SHP_POLYGON); // reading projection string prjFilename = PathHelper.GetFullPathWithoutExtension(filename) + ".prj"; if (File.Exists(prjFilename)) { sf.GeoProjection.ReadFromFile(prjFilename); } return(sf.LoadDataFrom(filename) ? new FeatureSet(sf) : null); }
public bool LoadDataFrom(string shapefileName) { return(_shapefile.LoadDataFrom(shapefileName)); }