Skip to content

Commit

Permalink
version class from system.version
Browse files Browse the repository at this point in the history
  • Loading branch information
bozmir committed Oct 14, 2024
1 parent ff38db6 commit bef2c32
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions Assets/_Functionalities/Wms/Scripts/WMSImportAdapter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,16 +85,9 @@ public void Execute(LocalFile localFile)
if (sourceUrl.ToLower().Contains("version="))
{
wmsVersion = sourceUrl.ToLower().Split("version=")[1].Split("&")[0];
string[] numbers = wmsVersion.Split('.');
int major = int.Parse(numbers[0]);
int minor = int.Parse(numbers[1]);
int revision = int.Parse(numbers[2]);
int targetMajor = 1;
int targetMinor = 3;
int targetRevision = 0;
bool isHigherOrEqualVersion = (major > targetMajor) ||
(major == targetMajor && minor >= targetMinor) ||
(major == targetMajor && minor == targetMinor && revision >= targetRevision);
Version version = Version.Parse(wmsVersion);
wmsVersion = version.ToString();
bool isHigherOrEqualVersion = version >= Version.Parse(defaultFallbackVersion);
coordinateSystemType = isHigherOrEqualVersion ? "CRS" : "SRS";
coordinateSystemReference = defaultCoordinateSystemReference;
}
Expand Down

0 comments on commit bef2c32

Please sign in to comment.