MapInfo Pro Developers User Group

Welcome to the MapInfo Pro Developers community!  We are a group dedicated to the discussion and understanding of MapBasic and .Net MapInfoPro AddIn development. Bring your questions and ideas here. This group includes several members of the Pro development team from around the world.

Please feel free to start a discussion in the discussion tab or join in a conversation.

Product Information  Ideas Portal  MapInfo Community Downloads

Discussions

Members

Resources

Events

 View Only

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)");