-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add support for satdump-generated gk2a image filename parsing
- Loading branch information
Showing
4 changed files
with
38 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
Sanchez.Processing/Services/Filesystem/Parsers/Gk2ASatDumpVariantFilenameParser.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
using System.Text.RegularExpressions; | ||
|
||
namespace Sanchez.Processing.Services.Filesystem.Parsers; | ||
|
||
/// <summary> | ||
/// Parses filenames of satellite imagery received from GK-2A and processed by <c>xrit-rc</c>. | ||
/// </summary> | ||
public class Gk2ASatDumpVariantFilenameParser : AbstractFilenameParser | ||
{ | ||
protected override Regex Regex { get; } | ||
|
||
protected override string TimestampFormat => "yyyyMMddTHHmmssZ"; | ||
|
||
public Gk2ASatDumpVariantFilenameParser(string? prefix, string? suffix) | ||
{ | ||
Regex = new Regex(prefix + "([0-9]{8}T[0-9]{6}Z)" + suffix + "\\.[^ ]*", RegexOptions.Compiled); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters