Skip to content

Commit 0deff33

Browse files
committed
chore: Update tool packages and format files using csharpier
1 parent 0289740 commit 0deff33

33 files changed

+126
-129
lines changed

.config/dotnet-tools.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,18 @@
33
"isRoot": true,
44
"tools": {
55
"dotnet-releaser": {
6-
"version": "0.8.5",
6+
"version": "0.11.0",
77
"commands": [
88
"dotnet-releaser"
9-
]
9+
],
10+
"rollForward": false
1011
},
1112
"csharpier": {
12-
"version": "0.27.3",
13+
"version": "0.30.6",
1314
"commands": [
1415
"dotnet-csharpier"
15-
]
16+
],
17+
"rollForward": false
1618
}
1719
}
1820
}

src/DotTerritory/Territory.Area.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public static Area Area(Geometry geometry)
3535
{
3636
Polygon polygon => CalculatePolygonArea(polygon),
3737
MultiPolygon multiPolygon => CalculateMultiPolygonArea(multiPolygon),
38-
_ => UnitsNet.Area.Zero
38+
_ => UnitsNet.Area.Zero,
3939
};
4040
}
4141

src/DotTerritory/Territory.BBoxClip.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public static Geometry BBoxClip(Geometry geometry, BBox bbox)
1010
MultiLineString multiLineString => BBoxClipMultiLineString(multiLineString, bbox),
1111
Polygon polygon => BBoxClipPolygon(polygon, bbox),
1212
MultiPolygon multiPolygon => BBoxClipMultiPolygon(multiPolygon, bbox),
13-
_ => RaiseNotSupported(geometry)
13+
_ => RaiseNotSupported(geometry),
1414
};
1515
}
1616

src/DotTerritory/Territory.BboxPolygon.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public static Polygon BboxPolygon(BBox bbox)
1111
new Coordinate(bbox.East, bbox.South),
1212
new Coordinate(bbox.East, bbox.North),
1313
new Coordinate(bbox.West, bbox.North),
14-
new Coordinate(bbox.West, bbox.South)
14+
new Coordinate(bbox.West, bbox.South),
1515
]
1616
)
1717
);

src/DotTerritory/Territory.BooleanPointInPolygon.cs

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,10 @@ public static bool BooleanPointInPolygon(
104104
{
105105
Polygon polygon => BooleanPointInPolygon(point, polygon, ignoreBoundary),
106106
MultiPolygon multiPolygon => BooleanPointInPolygon(point, multiPolygon, ignoreBoundary),
107-
_
108-
=> throw new ArgumentException(
109-
"Geometry must be a Polygon or MultiPolygon",
110-
nameof(polygonFeature)
111-
)
107+
_ => throw new ArgumentException(
108+
"Geometry must be a Polygon or MultiPolygon",
109+
nameof(polygonFeature)
110+
),
112111
};
113112
}
114113

@@ -136,11 +135,10 @@ public static bool BooleanPointInPolygon(
136135
{
137136
Polygon p => BooleanPointInPolygon(point, p, ignoreBoundary),
138137
MultiPolygon mp => BooleanPointInPolygon(point, mp, ignoreBoundary),
139-
_
140-
=> throw new ArgumentException(
141-
"Geometry must be a Polygon or MultiPolygon",
142-
nameof(polygon)
143-
)
138+
_ => throw new ArgumentException(
139+
"Geometry must be a Polygon or MultiPolygon",
140+
nameof(polygon)
141+
),
144142
};
145143
}
146144

src/DotTerritory/Territory.CleanCoords.cs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,10 @@ public static Geometry CleanCoords(Geometry geometry)
2323
MultiLineString multiLineString => CleanMultiLineString(multiLineString),
2424
Polygon polygon => CleanPolygon(polygon),
2525
MultiPolygon multiPolygon => CleanMultiPolygon(multiPolygon),
26-
_
27-
=> throw new ArgumentException(
28-
$"Geometry type {geometry.GeometryType} not supported",
29-
nameof(geometry)
30-
)
26+
_ => throw new ArgumentException(
27+
$"Geometry type {geometry.GeometryType} not supported",
28+
nameof(geometry)
29+
),
3130
};
3231
}
3332

src/DotTerritory/Territory.Envelope.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public static Polygon Envelope(BBox bbox)
3434
new Coordinate(east, north),
3535
new Coordinate(east, south),
3636
new Coordinate(west, south),
37-
new Coordinate(west, north) // Close the ring
37+
new Coordinate(west, north), // Close the ring
3838
};
3939

4040
// Create the linear ring for the polygon shell

src/DotTerritory/Territory.Explode.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ private static Coordinate[] GetCoordinates(Geometry geom)
4343
MultiLineString multiLine => multiLine.Coordinates,
4444
MultiPolygon multiPolygon => multiPolygon.Coordinates,
4545
GeometryCollection collection => GetCoordinatesFromCollection(collection),
46-
_ => []
46+
_ => [],
4747
};
4848
}
4949

src/DotTerritory/Territory.Invariant.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public static string GetType(Geometry geometry)
8282
MultiLineString _ => "MultiLineString",
8383
MultiPolygon _ => "MultiPolygon",
8484
GeometryCollection _ => "GeometryCollection",
85-
_ => geometry.GeometryType // Fallback, though NTS types usually map directly
85+
_ => geometry.GeometryType, // Fallback, though NTS types usually map directly
8686
};
8787
}
8888

src/DotTerritory/Territory.LineIntersect.cs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,15 @@ public static GeometryCollection LineIntersect(LineString line1, LineString line
3939
return intersection switch
4040
{
4141
Point point => line1.Factory.CreateGeometryCollection([point]),
42-
MultiPoint multiPoint
43-
=> line1.Factory.CreateGeometryCollection(
44-
Enumerable
45-
.Range(0, multiPoint.NumGeometries)
46-
.Select(i => multiPoint.GetGeometryN(i))
47-
.ToArray()
48-
),
42+
MultiPoint multiPoint => line1.Factory.CreateGeometryCollection(
43+
Enumerable
44+
.Range(0, multiPoint.NumGeometries)
45+
.Select(i => multiPoint.GetGeometryN(i))
46+
.ToArray()
47+
),
4948
LineString lineString => ExtractPointsFromLineString(lineString),
5049
GeometryCollection collection => ExtractPointsFromCollection(collection),
51-
_ => line1.Factory.CreateGeometryCollection()
50+
_ => line1.Factory.CreateGeometryCollection(),
5251
};
5352
}
5453

0 commit comments

Comments
 (0)