Jun 8, 2012 at 5:36 PM
Edited Jun 12, 2012 at 7:24 PM
|
Hi there,
When I substitute the ".shp" files on the Tutorial #5 ( Projection Explorer in DotSpatial ) with ".bgd" files I got this message:
"Object reference not set to an instance of an object."
Here is the code:
//define the projection
map1.Projection = KnownCoordinateSystems.Projected.UtmNad1983.NAD1983UTMZone12N;
//add layer to map1
FeatureSet featureSet1 = new FeatureSet();
string sT = @"C:\DELETE1\20110103.bgd";
featureSet1 = (FeatureSet)DotSpatial.Data.FeatureSet.Open(sT);
//set the projection map1
featureSet1.Reproject(map1.Projection); //here is where the error message is highlighted
map1.Layers.Add(featureSet1);
Am I missing something?, does the DotSpatial library can reproject on the fly .bgd files as with .shp files?
Notice that I tested the .bgd file with MapWindowGIS so the there is no problem with the file itself
Thanks a lot
Bristol
|