Skip to content

Commit

Permalink
The definition of the dimension was centralized and unified
Browse files Browse the repository at this point in the history
  • Loading branch information
hlaebe committed Aug 25, 2023
1 parent 7058208 commit 58b3071
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/NetTopologySuite.IO.Oracle/OracleGeometryWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ namespace NetTopologySuite.IO
public class OracleGeometryWriter
{
private const int SridNull = -1;
private int dimension = 0;

/// <summary>
/// Property for spatial reference system
Expand Down Expand Up @@ -40,6 +41,8 @@ public SdoGeometry Write(Geometry geometry)
return null;
}

this.dimension = Dimension(geometry);

switch (geometry)
{
case Point point:
Expand Down Expand Up @@ -302,8 +305,7 @@ private int ProcessMultiPolygon(MultiPolygon multiPolygon, List<double> elemInfo
}

private int AddOrdinates(CoordinateSequence sequence, List<double> ords)
{
int dimension = sequence.Dimension;
{
int numOfPoints = sequence.Count;
for (int i = 0; i < numOfPoints; i++)
{
Expand All @@ -319,8 +321,7 @@ private int AddOrdinates(CoordinateSequence sequence, List<double> ords)
}

private int AddOrdinatesInReverse(CoordinateSequence sequence, List<double> ords)
{
int dimension = sequence.Dimension;
{
int numOfPoints = sequence.Count;

for (int i = numOfPoints - 1; i >= 0; i--)
Expand Down

0 comments on commit 58b3071

Please sign in to comment.