コード例 #1
0
        public void CellLength_Negative()
        {
            RasterIO.Metadata metadata = NewRasterMetadataForDriverManager();
            SetAbscissaAndOrdinateRes(metadata, -12345);

            TryRun("CellLength_Negative");
        }
コード例 #2
0
        public void CellLength_Zero()
        {
            RasterIO.Metadata metadata = NewRasterMetadataForDriverManager();
            SetAbscissaAndOrdinateRes(metadata, 0);

            TryRun("CellLength_Zero");
        }
コード例 #3
0
        public void CellLength_NoUnits()
        {
            RasterIO.Metadata metadata = NewRasterMetadataForDriverManager();
            SetAbscissaAndOrdinateRes(metadata, 25);

            TryRun("CellLength_NoUnits");
            AssertCellLength(25);
        }
コード例 #4
0
        public void CellLength_WidthNotEqualHeight()
        {
            RasterIO.Metadata metadata = NewRasterMetadataForDriverManager();
            metadata[AbscissaResolution.Name] = 25.0f;
            metadata[OrdinateResolution.Name] = 20.0f;

            TryRun("CellLength_WidthNot=Height");
        }
コード例 #5
0
        public void CellLength_MapAndScenarioDiffer()
        {
            RasterIO.Metadata metadata = NewRasterMetadataForDriverManager();
            SetAbscissaAndOrdinateRes(metadata, 25);
            metadata[PlanarDistanceUnits.Name] = PlanarDistanceUnits.Meters;

            TryRun("CellLength_MapAndScenarioDiffer");
            AssertCellLength(35);
        }
コード例 #6
0
        public void CellLength_Map100ft()
        {
            RasterIO.Metadata metadata = NewRasterMetadataForDriverManager();
            SetAbscissaAndOrdinateRes(metadata, 100);
            metadata[PlanarDistanceUnits.Name] = PlanarDistanceUnits.SurveyFeet;

            TryRun("CellLength_Map100ft");
            float cellLength = (float)(100.0 * 1200.0 / 3937);

            AssertCellLength(cellLength);
        }
コード例 #7
0
        //---------------------------------------------------------------------

        private RasterIO.Metadata NewRasterMetadataForDriverManager()
        {
            RasterIO.Metadata metadata = new RasterIO.Metadata();
            rasterDriverMgr.RasterMetadata = metadata;
            return metadata;
        }
コード例 #8
0
        //---------------------------------------------------------------------

        private RasterIO.Metadata NewRasterMetadataForDriverManager()
        {
            RasterIO.Metadata metadata = new RasterIO.Metadata();
            rasterDriverMgr.RasterMetadata = metadata;
            return(metadata);
        }
コード例 #9
0
        //---------------------------------------------------------------------

        private void SetAbscissaAndOrdinateRes(RasterIO.Metadata metadata,
                                               float length)
        {
            metadata[AbscissaResolution.Name] = length;
            metadata[OrdinateResolution.Name] = length;
        }