ThinkGeo.com    |     Documentation    |     Premium Support

Display shape file british projection

Hi


I have just downloaded the trial version of Map Suite Desktop Edition 3.0 and am trying to display a shape file but all I get is a blank screen. Here is the code I am using (with the license message):


WinformsMap1.MapUnit = GeographyUnit.Meter Dim myLayer As New ShapeFileFeatureLayer("G:\myshapefile.shp") myLayer.RequireIndex = False myLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level04 Dim lo As New LayerOverlay lo.Layers.Add(myLayer) WinformsMap1.Overlays.Add(lo) myLayer.Open() WinformsMap1.CurrentExtent = myLayer.GetBoundingBox myLayer.Close() WinformsMap1.Refresh() 


 I am guessing that thit has got something to do with the projection, the prj file has these settings:


PROJCS["British_National_Grid",GEOGCS["GCS_OSGB_1936",DATUM["D_OSGB_1936",SPHEROID["Airy_1830",6377563.396,299.3249646]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",400000.0],PARAMETER["False_Northing",-100000.0],PARAMETER["Central_Meridian",-2.0],PARAMETER["Scale_Factor",0.999601272],PARAMETER["Latitude_Of_Origin",49.0],UNIT["Meter",1.0]]


Any help would be appreciated as I have been banging my head against a wall on this.


Cheers


Will



Will,


Thanks for your interests in MapSuite product and welcome you to ThinkGeo Desktop Edition discussion forum.
 
I am wondering if the data itself is projected or not, if it is , then your code is absolutely right, if not , I think you should add projection(27700, spatialreference.org/ref/epsg/27700/) to make it work.
 
If possible, could you send us your data?
 
Thanks.
 
Yale