Exemple #1
0
        /// <summary>
        /// Returns code that correspnds to the given dialect string
        /// </summary>
        /// <param name="proj">Projection object; WKT, proj4 formats will be tested</param>
        /// <returns>EPSG code</returns>
        public int EpsgCodeByDialectString(ISpatialReference proj)
        {
            var code = EpsgCodeByDialectString(proj.ExportToProj4());

            if (code == -1)
            {
                code = EpsgCodeByDialectString(proj.ExportToWkt());
            }

            if (code == -1)
            {
                code = EpsgCodeByDialectString(proj.ExportToEsri());
            }

            return(code);
        }