public void PopulateGeostationary() { var options = new GeostationaryOptions { HazeAmount = 0.5f, Longitude = 147, Tint = "ff0000", SpatialResolution = Constants.Satellite.SpatialResolution.TwoKm, InterpolationType = InterpolationOptions.N, Force = false, Verbose = false, Quiet = true }; var renderOptions = OptionsParser.Populate(options); Assert.NotNull(renderOptions.GeostationaryRender); renderOptions.GeostationaryRender.Longitude.Should().Be(147); renderOptions.GeostationaryRender.HazeAmount.Should().Be(0.5f); renderOptions.InterpolationType.Should().Be(InterpolationType.NearestNeighbour); renderOptions.ImageSize.Should().Be(Constants.Satellite.ImageSize.TwoKm); renderOptions.ImageOffset.Should().Be(Constants.Satellite.Offset.TwoKm); renderOptions.Force.Should().BeFalse(); renderOptions.Verbose.Should().BeFalse(); renderOptions.Quiet.Should().BeTrue(); }
public static RenderOptions Populate(GeostationaryOptions options) { var renderOptions = ProcessBaseOptions(options); renderOptions.GeostationaryRender = new GeostationaryRenderOptions(options.Longitude, options.HazeAmount); return(renderOptions); }
private static RenderOptions ParseGeostationaryOptions(GeostationaryOptions options) { var validation = new GeostationaryOptionsValidator().Validate(options); if (validation.IsValid) { return(OptionsParser.Populate(options)); } throw new ValidationException(validation.Errors); }
public static RenderOptions Populate(GeostationaryOptions options) { var renderOptions = ProcessBaseOptions(options); renderOptions.GeostationaryRender = new GeostationaryRenderOptions( ToOptionalAngle(options.LongitudeDegrees), ToOptionalAngle(options.EndLongitudeDegrees), options.InverseRotation, options.HazeAmount, options.HazeOpacity); return(renderOptions);