public SpatialReference createSRSfromWKT(string wkttarget, string wktsource)
        {
            ProjNet.CoordinateSystems.CoordinateSystemFactory csf      = new ProjNet.CoordinateSystems.CoordinateSystemFactory();
            ProjNet.CoordinateSystems.ICoordinateSystem       csSource = csf.CreateFromWkt(wktsource);
            ProjNet.CoordinateSystems.ICoordinateSystem       csTarget = csf.CreateFromWkt(wkttarget);
            ProjNet.CoordinateSystems.Transformations.CoordinateTransformationFactory ctf = new ProjNet.CoordinateSystems.Transformations.CoordinateTransformationFactory();
            ProjNet.CoordinateSystems.Transformations.ICoordinateTransformation       ct  = ctf.CreateFromCoordinateSystems(csSource, csTarget);
            SharpMapSpatialReference sr = new SharpMapSpatialReference();

            sr.CoordinateSystem = csSource;
            sr.MathTransform    = ct.MathTransform;
            return(sr);
        }
        /**
         * Creates a new SRS from an OSG WKT string.
         *
         * @param wkt
         *      OGC WKT (well-known text) SRS definition
         * @param reference_frame
         *      Reference frame to apply to points in this SRS
         * @return
         *      A spatial reference. Caller is responsible for deleting
         *      the return object.
         */
        public SpatialReference createSRSfromWKT(string wkt, Mogre.Matrix4 reference_frame)
        {
            //Implementar el MatrixTransform
            //rellenar el MatrixTransform usando el reference_frame
            //SetUp coordinate transformation
            ProjNet.CoordinateSystems.CoordinateSystemFactory csf      = new ProjNet.CoordinateSystems.CoordinateSystemFactory();
            ProjNet.CoordinateSystems.ICoordinateSystem       csSource = csf.CreateFromWkt(wkt);

            SharpMapSpatialReference sr = new SharpMapSpatialReference();

            sr.CoordinateSystem = csSource;
            sr.MathTransform    = new MatrixTransform(csSource.Dimension, reference_frame);
            return(sr);
        }
 public SpatialReference createSRSfromWKT(string wkttarget, string wktsource)
 {
     ProjNet.CoordinateSystems.CoordinateSystemFactory csf = new ProjNet.CoordinateSystems.CoordinateSystemFactory();
     ProjNet.CoordinateSystems.ICoordinateSystem csSource = csf.CreateFromWkt(wktsource);
     ProjNet.CoordinateSystems.ICoordinateSystem csTarget = csf.CreateFromWkt(wkttarget);
     ProjNet.CoordinateSystems.Transformations.CoordinateTransformationFactory ctf = new ProjNet.CoordinateSystems.Transformations.CoordinateTransformationFactory();
     ProjNet.CoordinateSystems.Transformations.ICoordinateTransformation ct = ctf.CreateFromCoordinateSystems(csSource, csTarget);
     SharpMapSpatialReference sr = new SharpMapSpatialReference();
     sr.CoordinateSystem = csSource;
     sr.MathTransform = ct.MathTransform;
     return sr;
 }
        /**
         * Creates a new SRS from an OSG WKT string.
         *
         * @param wkt
         *      OGC WKT (well-known text) SRS definition
         * @param reference_frame
         *      Reference frame to apply to points in this SRS
         * @return
         *      A spatial reference. Caller is responsible for deleting
         *      the return object.
         */
        public SpatialReference createSRSfromWKT(string wkt, Mogre.Matrix4 reference_frame)
        {
            //Implementar el MatrixTransform
            //rellenar el MatrixTransform usando el reference_frame
            //SetUp coordinate transformation
            ProjNet.CoordinateSystems.CoordinateSystemFactory csf = new ProjNet.CoordinateSystems.CoordinateSystemFactory();
            ProjNet.CoordinateSystems.ICoordinateSystem csSource = csf.CreateFromWkt(wkt);

            SharpMapSpatialReference sr = new SharpMapSpatialReference();
            sr.CoordinateSystem = csSource;
            sr.MathTransform = new MatrixTransform(csSource.Dimension, reference_frame);
            return sr;
        }