MapInfo Pro Developers User Group

Expand all | Collapse all

I'm trying to create a table using c# in dotNet and am having trouble with the createcoordsys clause.

  • 1.  I'm trying to create a table using c# in dotNet and am having trouble with the createcoordsys clause.

    Posted 08-20-2018 13:00

    I'm trying to set the co-ordsys but I'm having trouble with the syntax to create a clause for the standard British National Grid. I've tried using the text below, but it isn't correct.

    Any ideas?

    Thanks

        public static MapInfo.Geometry.CoordSys SetCoordSys()

           {

               AffineTransform transform = Session.Current.CoordSysFactory.CreateAffineTransform(DistanceUnit.Meter, 1, 0, 0, 0, 1, 0);

               MapInfo.Geometry.CoordSys sCoordSys = Session.Current.CoordSysFactory.CreateCoordSys(CoordSysType.TransverseMercator ,79, DistanceUnit.Meter, -2, 49, 0,0,0,0.9996012717, 400000, -100000,0, transform);

               return sCoordSys;

           }



  • 2.  RE: I'm trying to create a table using c# in dotNet and am having trouble with the createcoordsys clause.

    Posted 08-21-2018 08:08

    Found a different method which works:

    CoordSys sCoordSys = Session.Current.CoordSysFactory.CreateFromPrjString("8, 33, 7, -2, 49, 0.9996012717, 400000, -100000 bounds(1,1) (680000, 1250000)");