当前位置: 首页>>代码示例>>C#>>正文


C# IProjection类代码示例

本文整理汇总了C#中IProjection的典型用法代码示例。如果您正苦于以下问题:C# IProjection类的具体用法?C# IProjection怎么用?C# IProjection使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IProjection类属于命名空间,在下文中一共展示了IProjection类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetProjectionArgument

 private static SqlString GetProjectionArgument(ICriteriaQuery criteriaQuery, ICriteria criteria,
                                                IProjection projection, int loc,
                                                IDictionary<string, IFilter> enabledFilters)
 {
     SqlString sql = projection.ToSqlString(criteria, loc, criteriaQuery, enabledFilters);
     return sql.Substring(0, sql.LastIndexOfCaseInsensitive(" as "));
 }
开发者ID:pvginkel,项目名称:NHibernate.OData,代码行数:7,代码来源:OperatorProjection.cs

示例2: StyleOsmStreamSceneTarget

 /// <summary>
 /// Creates a new MapCSS scene target.
 /// </summary>
 /// <param name="mapCSSInterpreter"></param>
 /// <param name="scene"></param>
 /// <param name="projection"></param>
 public StyleOsmStreamSceneTarget(StyleInterpreter mapCSSInterpreter, 
     Scene2D scene, IProjection projection)
 {
     _projection = projection;
     _scene = scene;
     _mapCSSInterpreter = mapCSSInterpreter;
 }
开发者ID:vcotlearov,项目名称:OsmSharp,代码行数:13,代码来源:StyleOsmStreamSceneTarget.cs

示例3: LayerGpx

        /// <summary>
        /// Creates a new OSM data layer.
        /// </summary>
        /// <param name="projection"></param>
        public LayerGpx(IProjection projection)
        {
            _projection = projection;

            this.Scene = new Scene2DSimple();
            this.Scene.BackColor = SimpleColor.FromKnownColor(KnownColor.Transparent).Value;
        }
开发者ID:robert-hickey,项目名称:OsmSharp,代码行数:11,代码来源:LayerGpx.cs

示例4: CreateCoordinateOperation

        public static IMathTransform CreateCoordinateOperation(IProjection projection, IEllipsoid ellipsoid)
        {
            ParameterList parameterList = new ParameterList();
            for(int i=0; i< projection.NumParameters; i++)
            {
                ProjectionParameter param = projection.GetParameter(i);
                parameterList.Add(param.Name,param.Value);
            }
            parameterList.Add("semi_major",ellipsoid.SemiMajorAxis);
            parameterList.Add("semi_minor",ellipsoid.SemiMinorAxis);

            IMathTransform transform = null;
            switch(projection.Name.ToLower())
            {
                case "mercator":
                    //1SP
                    transform = new MercatorProjection(parameterList);
                    break;
                case "transverse_mercator":
                    transform = new TransverseMercatorProjection(parameterList);
                    break;
                case "albers":
                    transform = new AlbersProjection(parameterList);
                    break;
                case "lambert":
                    transform = new LambertConformalConic2SPProjection(parameterList);
                    break;
                default:
                    throw new NotSupportedException(String.Format(System.Globalization.CultureInfo.InvariantCulture, "Projection {0} is not supported.",projection.AuthorityCode));
            }
            return transform;
        }
开发者ID:vmoll,项目名称:geotools,代码行数:32,代码来源:CoordinateTransformationFactory.cs

示例5: IsVersionExist

 public bool IsVersionExist(IProjection projection)
 {
     using (var con = db.OpenDbConnection())
     {
         return con.Count<ProjectionVersionDto>(x => x.ProjectionName == GetName(projection)) > 0;
     }
 }
开发者ID:mojamcpds,项目名称:NEventStore.Cqrs,代码行数:7,代码来源:VersioningRepository.cs

示例6: CreateCoordinateOperation

        private static IMathTransform CreateCoordinateOperation(IProjection projection, IEllipsoid ellipsoid)
        {
            List<ProjectionParameter> parameterList = new List<ProjectionParameter>(projection.NumParameters);
            for (int i = 0; i < projection.NumParameters; i++)
                parameterList.Add(projection.GetParameter(i));

            parameterList.Add(new ProjectionParameter("semi_major", ellipsoid.SemiMajorAxis));
            parameterList.Add(new ProjectionParameter("semi_minor", ellipsoid.SemiMinorAxis));

            IMathTransform transform = null;
            switch (projection.ClassName.ToLower())
            {
                case "mercator_1sp":
                case "mercator_2sp":
                    //1SP
                    transform = new Mercator(parameterList);
                    break;
                case "transverse_mercator":
                    transform = new TransverseMercator(parameterList);
                    break;
                case "albers":
                    transform = new AlbersProjection(parameterList);
                    break;
                case "lambert_conformal_conic":
                case "lambert_conformal_conic_2sp":
                    transform = new LambertConformalConic2SP(parameterList);
                    break;
                default:
                    throw new NotSupportedException(String.Format("Projection {0} is not supported.", projection.ClassName));
            }
            return transform;
        }
开发者ID:jumpinjackie,项目名称:fdotoolbox,代码行数:32,代码来源:CoordinateTransformationFactory.cs

示例7: Projection

 public Projection(ISpatialReference pSpatialReference, IWorkspace pWorkSpace)
 {
     IProjectedCoordinateSystem pProjectedCoordinateSys = pSpatialReference as IProjectedCoordinateSystem;
     m_pSpatialReference = pSpatialReference;
     m_pIProjection = pProjectedCoordinateSys.Projection;
     m_pWorkspace = pWorkSpace;
 }
开发者ID:hy1314200,项目名称:HyDM,代码行数:7,代码来源:Projection.cs

示例8: OrderBy

        public OrderBy(IProjection projection, OrderByDirection direction)
        {
            Require.NotNull(projection, "projection");

            Direction = direction;
            Projection = projection;
        }
开发者ID:justintoth,项目名称:NHibernate.OData,代码行数:7,代码来源:OrderBy.cs

示例9: GetProjectionArgument

 private static SqlString GetProjectionArgument(ICriteriaQuery criteriaQuery, ICriteria criteria,
                                                IProjection projection, int loc,
                                                IDictionary<string, IFilter> enabledFilters)
 {
     SqlString sql = projection.ToSqlString(criteria, loc, criteriaQuery, enabledFilters);
     return StringHelper.RemoveAsAliasesFromSql(sql);
 }
开发者ID:justintoth,项目名称:NHibernate.OData,代码行数:7,代码来源:OperatorProjection.cs

示例10: ProjectionWrapper

 public ProjectionWrapper(IProjection projection, ILogger log)
 {
     this.projection = projection;
     this.buferredProjection = projection as IBuferredProjection;
     this.log = log;
     Init();
 }
开发者ID:mojamcpds,项目名称:NEventStore.Cqrs,代码行数:7,代码来源:ProjectionWrapper.cs

示例11: GetFilterModifierCriterion

 /// <summary>
 /// Gets the filter modifier criterion.
 /// </summary>
 /// <param name="projection">The projection.</param>
 /// <param name="filerModifier">The filer modifier.</param>
 /// <param name="value">The value.</param>
 /// <returns>A <see cref="NHibernate.Criterion.ICriterion"/></returns>
 public static ICriterion GetFilterModifierCriterion( IProjection projection, string filerModifier, object value )
 {
     ICriterion ret = null;
     if ( filerModifier == FilterModifier.EqualTo )
     {
         ret = Restrictions.Eq ( projection, value );
     }
     else if ( filerModifier == FilterModifier.GreaterThan )
     {
         ret = ( Restrictions.Gt ( projection, value ) );
     }
     else if ( filerModifier == FilterModifier.GreaterThanOrEqualTo )
     {
         ret = ( Restrictions.Ge ( projection, value ) );
     }
     else if ( filerModifier == FilterModifier.LessThen )
     {
         ret = ( Restrictions.Lt ( projection, value ) );
     }
     else if ( filerModifier == FilterModifier.LessThenOrEqualTo )
     {
         ret = ( Restrictions.Le ( projection, value ) );
     }
     else
     {
         throw new ArgumentException ( "Invalid Filter Modifier" );
     }
     return ret;
 }
开发者ID:divyang4481,项目名称:REM,代码行数:36,代码来源:PatientListHelper.cs

示例12: GetModifiedReason

        public string GetModifiedReason(IProjection projection)
        {
            if (projection == null || projection is ICheckpointStore)
            {
                return string.Empty;
            }
            try
            {
                var dto = collection.AsQueryable().FirstOrDefault(x => x.ProjectionName == GetName(projection));

                if (dto == null)
                {
                    return "Version is absent";
                }
                if (dto.Version != projection.Version)
                {
                    return "Version is different";
                }
                if (dto.Hash != StructureHash.CalculateMD5(projection))
                {
                    return "Hash is different";
                }
                return string.Empty;
            }
            catch (Exception ex)
            {
                if (ex is SqlException || ex.Message.Contains("Invalid column name"))
                {
                    return "Invalid column name";
                }

                throw;
            }
        }
开发者ID:mojamcpds,项目名称:NEventStore.Cqrs,代码行数:34,代码来源:VersioningRepository.cs

示例13: AddProjection

        /**
         * Adds the given projection.
         *
         * @param projection the projection to add
         * @return this
         */
        public IExitOperationsCollector AddProjection(IProjection projection)
        {
            if (projection.GetType().IsAssignableFrom(distinct.GetType()))
            {
                this.distinct = (Distinct) projection;
                //TODO: Distinct doesn't work yet
                log.Error("Distinct is not ready yet");
                throw new NotSupportedException();
            }
            if (projection.GetType().IsAssignableFrom(rowCountProjection.GetType()))
            {
                rowCountProjection = (RowCountProjection) projection;
            }
            if (projection.GetType().IsAssignableFrom(aggregateProjection.GetType()))
            {
                if (projection.ToString().ToLower().StartsWith("avg"))
                {
                    this.avgProjection = (AggregateProjection)projection;
                }
                else
                {
                    this.aggregateProjection = (AggregateProjection)projection;
                }
            }
            else
            {
                log.Error("Adding an unsupported Projection: " + projection.GetType().Name);
                throw new NotSupportedException();
            }

            return this;
        }
开发者ID:hazzik,项目名称:nhcontrib-all,代码行数:38,代码来源:ExitOperationsCriteriaCollector.cs

示例14: ProjectedCoordinateSystem

        /// <summary>
        /// Initializes a new instance of the ProjectedCoordinateSystem class.
        /// </summary>
        /// <param name="horizontalDatum">The horizontal datum to use.</param>
        /// <param name="axisInfoArray">An array of IAxisInfo representing the axis information.</param>
        /// <param name="geographicCoordSystem">The geographic coordinate system.</param>
        /// <param name="linearUnit">The linear units to use.</param>
        /// <param name="projection">The projection to use.</param>
        /// <param name="remarks">Remarks about this object.</param>
        /// <param name="authority">The name of the authority.</param>
        /// <param name="authorityCode">The code the authority uses to identidy this object.</param>
        /// <param name="name">The name of the object.</param>
        /// <param name="alias">The alias of the object.</param>
        /// <param name="abbreviation">The abbreviated name of this object.</param>
        internal ProjectedCoordinateSystem(
			IHorizontalDatum horizontalDatum,
			IAxisInfo[] axisInfoArray,
			IGeographicCoordinateSystem geographicCoordSystem,
			ILinearUnit linearUnit,
			IProjection projection,
			string remarks, string authority, string authorityCode, string name, string alias, string abbreviation)
            : base(remarks, authority, authorityCode, name, alias, abbreviation)
        {
            if (axisInfoArray==null)
            {
                throw new ArgumentNullException("axisInfoArray");
            }
            if (geographicCoordSystem==null)
            {
                throw new ArgumentNullException("geographicCoordSystem");
            }
            if (projection==null)
            {
                throw new ArgumentNullException("projection");
            }
            if (linearUnit==null)
            {
                throw new ArgumentNullException("linearUnit");
            }
            _horizontalDatum=horizontalDatum;
            _axisInfoArray=  axisInfoArray;
            _geographicCoordSystem = geographicCoordSystem;
            _projection=	 projection;
            _linearUnit = linearUnit;
        }
开发者ID:vmoll,项目名称:geotools,代码行数:45,代码来源:ProjectedCoordinateSystem.cs

示例15: QuadKeyToRect

        public static Rectangle QuadKeyToRect(IProjection projection, QuadKey quadKey)
        {
            var boundingBox = QuadKeyToBoundingBox(quadKey);
            var minPoint = projection.Project(boundingBox.MinPoint, 0);
            var maxPoint = projection.Project(boundingBox.MaxPoint, 0);

            return new Rectangle(minPoint.x, minPoint.z, maxPoint.x - minPoint.x, maxPoint.z - minPoint.z);
        }
开发者ID:RagnarDanneskjold,项目名称:utymap,代码行数:8,代码来源:GeoUtils.cs


注:本文中的IProjection类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。