Skip to content

Commit

Permalink
removed empty values
Browse files Browse the repository at this point in the history
  • Loading branch information
emmanuelmathot committed Feb 7, 2023
1 parent b7ac0bd commit d6d6cba
Show file tree
Hide file tree
Showing 23 changed files with 98 additions and 93 deletions.
4 changes: 2 additions & 2 deletions src/DotNetStac/Collection/IStacSummaryItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ public interface IStacSummaryItem : IEnumerable<JToken>
/// <summary>
/// Gets or sets the summary value with the specified fields (for objects only)
/// </summary>
/// <value></value>

JToken this[object key] { get; }

/// <summary>
/// Gets the summary item as a JToken
/// </summary>
/// <value></value>

JToken AsJToken { get; }

IEnumerable<object> Enumerate();
Expand Down
2 changes: 1 addition & 1 deletion src/DotNetStac/Collection/StacSummaryItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ protected StacSummaryItem(JToken summary)
/// <summary>
/// accessor of fields in the object
/// </summary>
/// <value></value>

public JToken this[object key]
{
get
Expand Down
2 changes: 1 addition & 1 deletion src/DotNetStac/Collection/StacTemporalExtent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public StacTemporalExtent(StacTemporalExtent temporal)
/// <summary>
/// Gets or sets potential temporal extents.
/// </summary>
/// <value></value>

[JsonProperty("interval")]
public DateTime?[][] Interval { get; set; }
}
Expand Down
17 changes: 11 additions & 6 deletions src/DotNetStac/Common/Statistics.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ public class Statistics
/// <summary>
/// Initialize a new statistics object
/// </summary>
/// <param name="minimum">minimum value</param>
/// <param name="maximum">maximum value</param>
/// <param name="mean">mean value</param>
/// <param name="stdev">standard deviation</param>
/// <param name="validPercent">valid percentage</param>
[JsonConstructor]
public Statistics(double? minimum, double? maximum, double? mean, double? stdev, double? validPercent)
{
Expand All @@ -32,42 +37,42 @@ public Statistics(double? minimum, double? maximum, double? mean, double? stdev,
/// <summary>
/// Gets or sets mean value
/// </summary>
/// <value></value>

[JsonProperty("mean")]
public double? Mean { get; set; }

/// <summary>
/// Gets or sets minimum value
/// </summary>
/// <value></value>

[JsonProperty("minimum")]
public double? Minimum { get; set; }

/// <summary>
/// Gets or sets maximum value
/// </summary>
/// <value></value>

[JsonProperty("maximum")]
public double? Maximum { get; set; }

/// <summary>
/// Gets or sets standard Deviation
/// </summary>
/// <value></value>

[JsonProperty("stdev")]
public double? Stdev { get; set; }

/// <summary>
/// Gets or sets valid percentage
/// </summary>
/// <value></value>

[JsonProperty("valid_percent")]
public double? ValidPercent { get; set; }

/// <summary>
/// Gets or sets additional fields
/// </summary>
/// <value></value>

[JsonExtensionData]
public IDictionary<string, object> Properties { get => this.properties; set => this.properties = value; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public AlternateAssetObject(string href, IStacObject parent = null, string title
/// <summary>
/// Gets or sets additional fields
/// </summary>
/// <value></value>

[JsonExtensionData]
public IDictionary<string, object> Properties { get => this.properties; set => this.properties = value; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public class DatacubeDimension : IStacPropertiesContainer
/// <summary>
/// Gets or sets additional fields
/// </summary>
/// <value></value>

[JsonExtensionData]
public IDictionary<string, object> Properties { get => this.properties; set => this.properties = value; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public class DatacubeVariable : IStacPropertiesContainer
/// <summary>
/// Gets or sets additional fields
/// </summary>
/// <value></value>

[JsonExtensionData]
public IDictionary<string, object> Properties { get => this.properties; set => this.properties = value; }

Expand Down
10 changes: 5 additions & 5 deletions src/DotNetStac/Extensions/Eo/EoBandObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,35 +54,35 @@ public EoBandObject(string name, EoBandCommonName? commonName)
/// <summary>
/// Gets or sets the name commonly used to refer to the band to make it easier to search for bands across instruments.
/// </summary>
/// <value></value>

[JsonProperty("common_name")]
public EoBandCommonName? CommonName { get => this.commonName; set => this.commonName = value; }

/// <summary>
/// Gets or sets the center wavelength of the band, in micrometers (μm).
/// </summary>
/// <value></value>

[JsonProperty("center_wavelength")]
public double? CenterWavelength { get; set; }

/// <summary>
/// Gets or sets full width at half maximum (FWHM). The width of the band, as measured at half the maximum transmission, in micrometers (μm).
/// </summary>
/// <value></value>

[JsonProperty("full_width_half_max")]
public double? FullWidthHalfMax { get; set; }

/// <summary>
/// Gets or sets the solar illumination of the band, as measured at half the maximum transmission, in W/m2/micrometers.
/// </summary>
/// <value></value>

[JsonProperty("solar_illumination")]
public double? SolarIllumination { get; set; }

/// <summary>
/// Gets or sets additional fields
/// </summary>
/// <value></value>

[JsonExtensionData]
public IDictionary<string, object> Properties { get => this.properties; set => this.properties = value; }

Expand Down
12 changes: 6 additions & 6 deletions src/DotNetStac/Extensions/File/FileStacExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ internal FileStacExtension(StacAsset stacAsset) : base(JsonSchemaUrl, stacAsset)
/// <summary>
/// Gets or sets the byte order of integer values in the file. One of big-endian or little-endian.
/// </summary>
/// <value></value>

public ByteOrder ByteOrder
{
get { return this.StacPropertiesContainer.GetProperty<ByteOrder>(ByteOrderField); }
Expand All @@ -46,7 +46,7 @@ public ByteOrder ByteOrder
/// <summary>
/// Gets or sets the name commonly used to refer to the processing level to make it easier to search for product level across collections or items.
/// </summary>
/// <value></value>

public Multihash Checksum
{
get { return Multihash.Parse(this.StacPropertiesContainer.GetProperty<string>(ChecksumField)); }
Expand All @@ -56,7 +56,7 @@ public Multihash Checksum
/// <summary>
/// Gets or sets the name of the facility that produced the data.
/// </summary>
/// <value></value>

public uint? HeaderSize
{
get { return this.StacPropertiesContainer.GetProperty<uint?>(HeaderSizeField); }
Expand All @@ -66,7 +66,7 @@ public uint? HeaderSize
/// <summary>
/// Gets or sets the name of the facility that produced the data.
/// </summary>
/// <value></value>

public ulong? Size
{
get { return this.StacPropertiesContainer.GetProperty<ulong?>(SizeField); }
Expand Down Expand Up @@ -156,10 +156,10 @@ public static async Task SetFileCheckSum(this FileStacExtension fileStacExtensio
data = mem.ToArray();
fileStacExtension.Size = Convert.ToUInt64(mem.Length);
}


mh = Multihash.Sum(hashType, data);
}


fileStacExtension.Checksum = mh;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ internal ProcessingStacExtension(StacItem stacItem) : base(JsonSchemaUrl, stacIt
/// <summary>
/// Gets or sets lineage Information provided as free text information about the how observations were processed or models that were used to create the resource being described NASA ISO.
/// </summary>
/// <value></value>

public string Lineage
{
get { return this.StacPropertiesContainer.GetProperty<string>(LineageField); }
Expand All @@ -44,7 +44,7 @@ public string Lineage
/// <summary>
/// Gets or sets the name commonly used to refer to the processing level to make it easier to search for product level across collections or items.
/// </summary>
/// <value></value>

public string Level
{
get { return this.StacPropertiesContainer.GetProperty<string>(LevelField); }
Expand All @@ -54,7 +54,7 @@ public string Level
/// <summary>
/// Gets or sets the name of the facility that produced the data.
/// </summary>
/// <value></value>

public string Facility
{
get { return this.StacPropertiesContainer.GetProperty<string>(FacilityField); }
Expand All @@ -64,7 +64,7 @@ public string Facility
/// <summary>
/// Gets a dictionary with name/version for key/value describing one or more softwares that produced the data.
/// </summary>
/// <value></value>

public IDictionary<string, string> Software
{
get
Expand Down
12 changes: 6 additions & 6 deletions src/DotNetStac/Extensions/Raster/RasterBandObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,29 +56,29 @@ public RasterBand()
/// <summary>
/// Gets or sets the data type of the band.
/// </summary>
/// <value></value>

[JsonProperty("data_type")]
[JsonConverter(typeof(StringEnumConverter))]
public DataType? DataType { get => this.dataType; set => this.dataType = value; }

/// <summary>
/// Gets or sets the actual number of bits used for this band.
/// </summary>
/// <value></value>

[JsonProperty("bits_per_sample")]
public int? BitsPerSample { get; set; }

/// <summary>
/// Gets or sets average spatial resolution (in meters) of the pixels in the band.
/// </summary>
/// <value></value>

[JsonProperty("spatial_resolution")]
public double? SpatialResolution { get; set; }

/// <summary>
/// Gets or sets statistics of all the pixels in the band
/// </summary>
/// <value></value>

[JsonProperty("statistics")]
public Statistics Statistics { get; set; }

Expand Down Expand Up @@ -112,14 +112,14 @@ public RasterBand()
/// <summary>
/// Gets or sets histogram distribution information of the pixels values in the band
/// </summary>
/// <value></value>

[JsonProperty("histogram")]
public RasterHistogram Histogram { get; set; }

/// <summary>
/// Gets or sets additional fields
/// </summary>
/// <value></value>

[JsonExtensionData]
public IDictionary<string, object> Properties { get => this.properties; set => this.properties = value; }

Expand Down
8 changes: 4 additions & 4 deletions src/DotNetStac/Extensions/Raster/RasterHistogram.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,28 @@ public class RasterHistogram
/// <summary>
/// Gets or sets number of buckets of the distribution.
/// </summary>
/// <value></value>

[JsonProperty("count")]
public int? Count { get; set; }

/// <summary>
/// Gets or sets minimum value of the distribution. Also the mean value of the first bucket.
/// </summary>
/// <value></value>

[JsonProperty("min")]
public double? Min { get; set; }

/// <summary>
/// Gets or sets minimum value of the distribution. Also the mean value of the last bucket.
/// </summary>
/// <value></value>

[JsonProperty("max")]
public double? Max { get; set; }

/// <summary>
/// Gets or sets array of integer indicating the number of pixels included in the bucket.
/// </summary>
/// <value></value>

[JsonProperty("buckets")]
public double[] Buckets { get; set; }
}
Expand Down
2 changes: 1 addition & 1 deletion src/DotNetStac/Extensions/StacExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public static class StacExtensions
/// <summary>
/// Gets dictionary of extensions managed by the library
/// </summary>
/// <value></value>

public static Dictionary<string, Type> ManagedStacExtensions
{
get
Expand Down
8 changes: 4 additions & 4 deletions src/DotNetStac/Extensions/Storage/StorageStacExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ internal StorageStacExtension(IStacPropertiesContainer stacObject) : base(JsonSc
/// <summary>
/// Gets or sets the cloud provider where data is stored
/// </summary>
/// <value></value>

public string Platform
{
get { return this.StacPropertiesContainer.GetProperty<string>(PlatformField); }
Expand All @@ -42,7 +42,7 @@ public string Platform
/// <summary>
/// Gets or sets the region where the data is stored. Relevant to speed of access and inter region egress costs (as defined by PaaS provider)
/// </summary>
/// <value></value>

public string Region
{
get { return this.StacPropertiesContainer.GetProperty<string>(RegionField); }
Expand All @@ -52,7 +52,7 @@ public string Region
/// <summary>
/// Gets or sets is the data requester pays or is it data manager/cloud provider pays. Defaults to false
/// </summary>
/// <value></value>

public bool? RequesterPays
{
get { return this.StacPropertiesContainer.GetProperty<bool?>(RequesterPaysField); }
Expand All @@ -62,7 +62,7 @@ public bool? RequesterPays
/// <summary>
/// Gets or sets the title for the tier type (as defined by PaaS provider)
/// </summary>
/// <value></value>

public string Tier
{
get { return this.StacPropertiesContainer.GetProperty<string>(TierField); }
Expand Down
Loading

0 comments on commit d6d6cba

Please sign in to comment.