Skip to content

Commit 9b70be3

Browse files
committed
Merge branch 'release/2.27.1'
2 parents 6c1655d + 7cc1a45 commit 9b70be3

File tree

4 files changed

+31
-19
lines changed

4 files changed

+31
-19
lines changed

src/Stars.Console/Terradue.Stars.Console.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<PropertyGroup>
33
<OutputType>Exe</OutputType>
44
<TargetFrameworks>net6.0</TargetFrameworks>
5-
<Version>2.27.0</Version>
5+
<Version>2.27.1</Version>
66
<!-- <VersionSuffix>beta.8</VersionSuffix> -->
77
<Description>Stars is a CLI for working with Spatio Temporal Catalog such as STAC but not only</Description>
88
<Version Condition=" '$(VersionSuffix)' != '' ">$(Version)-$(VersionSuffix)</Version>

src/Stars.Data/Model/Metadata/Sentinels/SentinelSafeStacFactory.cs

Lines changed: 28 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -373,26 +373,38 @@ public virtual IGeometryObject GetGeometry()
373373
return polygon.ToGeometry().NormalizePolygon();
374374
}
375375

376-
if (measurementFrameSet.metadataWrap.xmlData.frameSet11 != null && measurementFrameSet.metadataWrap.xmlData.frameSet11.footPrint != null &&
377-
measurementFrameSet.metadataWrap.xmlData.frameSet11.footPrint.Items1[0] is ServiceModel.Ogc.Gml311.CoordinatesType)
376+
if (measurementFrameSet.metadataWrap.xmlData.frameSet11 != null && measurementFrameSet.metadataWrap.xmlData.frameSet11.footPrint != null)
378377
{
379-
ServiceModel.Ogc.Gml311.CoordinatesType coordinates = (ServiceModel.Ogc.Gml311.CoordinatesType)measurementFrameSet.metadataWrap.xmlData.frameSet11.footPrint.Items1[0];
380-
381-
var polygon = new ServiceModel.Ogc.Gml321.PolygonType();
382-
polygon.exterior = new ServiceModel.Ogc.Gml321.AbstractRingPropertyType();
383-
var linearRing = new ServiceModel.Ogc.Gml321.LinearRingType();
384-
var posList = new List<ServiceModel.Ogc.Gml321.DirectPositionListType>();
385-
386-
posList.Add(new ServiceModel.Ogc.Gml321.DirectPositionListType() { Text = coordinates.Value.Replace(",", " ") });
387-
if (posList[0].Text.Split(' ')[1] != posList[0].Text.Split(' ').Last())
378+
string coordinatesText = null;
379+
if (measurementFrameSet.metadataWrap.xmlData.frameSet11.footPrint.Items1[0] is ServiceModel.Ogc.Gml311.CoordinatesType)
388380
{
389-
posList[0].Text += " " + posList[0].Text.Split(' ')[0] + " " + posList[0].Text.Split(' ')[1];
381+
var coordinates = (ServiceModel.Ogc.Gml311.CoordinatesType)measurementFrameSet.metadataWrap.xmlData.frameSet11.footPrint.Items1[0];
382+
coordinatesText = coordinates.Value;
383+
}
384+
else if (measurementFrameSet.metadataWrap.xmlData.frameSet11.footPrint.Items1[0] is Terradue.ServiceModel.Ogc.Gml311.DirectPositionListType)
385+
{
386+
var coordinates = (Terradue.ServiceModel.Ogc.Gml311.DirectPositionListType)measurementFrameSet.metadataWrap.xmlData.frameSet11.footPrint.Items1[0];
387+
coordinatesText = coordinates.Text;
390388
}
391-
linearRing.Items = posList.ToArray();
392-
linearRing.ItemsElementName = new ServiceModel.Ogc.Gml321.ItemsChoiceType6[1] { ServiceModel.Ogc.Gml321.ItemsChoiceType6.posList };
393-
polygon.exterior.Item = linearRing;
394389

395-
return polygon.ToGeometry().NormalizePolygon();
390+
if (coordinatesText != null)
391+
{
392+
var polygon = new ServiceModel.Ogc.Gml321.PolygonType();
393+
polygon.exterior = new ServiceModel.Ogc.Gml321.AbstractRingPropertyType();
394+
var linearRing = new ServiceModel.Ogc.Gml321.LinearRingType();
395+
var posList = new List<ServiceModel.Ogc.Gml321.DirectPositionListType>();
396+
397+
posList.Add(new ServiceModel.Ogc.Gml321.DirectPositionListType() { Text = coordinatesText.Replace(",", " ") });
398+
if (posList[0].Text.Split(' ')[1] != posList[0].Text.Split(' ').Last())
399+
{
400+
posList[0].Text += " " + posList[0].Text.Split(' ')[0] + " " + posList[0].Text.Split(' ')[1];
401+
}
402+
linearRing.Items = posList.ToArray();
403+
linearRing.ItemsElementName = new ServiceModel.Ogc.Gml321.ItemsChoiceType6[1] { ServiceModel.Ogc.Gml321.ItemsChoiceType6.posList };
404+
polygon.exterior.Item = linearRing;
405+
406+
return polygon.ToGeometry().NormalizePolygon();
407+
}
396408
}
397409

398410
return null;

src/Stars.Data/Terradue.Stars.Data.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<ProjectName>Terradue.Stars.Data</ProjectName>
55
<Title>Terradue.Stars.Data</Title>
66
<Description>Collection of data Plugins for Terradue.Stars</Description>
7-
<Version>2.27.0</Version>
7+
<Version>2.27.1</Version>
88
<!-- <VersionSuffix>beta.8</VersionSuffix> -->
99
<Version Condition=" '$(VersionSuffix)' != '' ">$(Version)-$(VersionSuffix)</Version>
1010
<NoWarn>NU1603</NoWarn>

src/Stars.Services/Terradue.Stars.Services.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<TargetFramework>netstandard2.0</TargetFramework>
44
<Title>Terradue.Stars</Title>
55
<Description>Stars is a set of services for working with Spatio Temporal Catalog such as STAC but not only</Description>
6-
<Version>2.27.0</Version>
6+
<Version>2.27.1</Version>
77
<!-- <VersionSuffix>beta.8</VersionSuffix> -->
88
<Version Condition=" '$(VersionSuffix)' != '' ">$(Version)-$(VersionSuffix)</Version>
99
<AssemblyName>Terradue.Stars.Services</AssemblyName>

0 commit comments

Comments
 (0)