-
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.
Merge pull request #105 from FCWYzzr/master
Add name parsing support for Satdump GK-2A Plugin generated gk2a image
- Loading branch information
Showing
5 changed files
with
39 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
.idea/ | ||
.vs/ | ||
bin/ | ||
obj/ | ||
*.DotSettings.user | ||
|
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