Skip to content

Commit

Permalink
Merge pull request #97 from thbeu/clockwise
Browse files Browse the repository at this point in the history
Define rings clockwise in test data
  • Loading branch information
rouault authored Mar 4, 2024
2 parents 20c759a + 25b93eb commit fe797f2
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 46 deletions.
8 changes: 4 additions & 4 deletions shptest.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,12 @@ static void Test_WriteArcPoly(int nSHPType, const char *pszFilename)
{
x[0] = 1.0;
y[0] = 1.0 + iShape * 3;
x[1] = 2.0;
y[1] = 1.0 + iShape * 3;
x[1] = 1.0;
y[1] = 2.0 + iShape * 3;
x[2] = 2.0;
y[2] = 2.0 + iShape * 3;
x[3] = 1.0;
y[3] = 2.0 + iShape * 3;
x[3] = 2.0;
y[3] = 1.0 + iShape * 3;
x[4] = 1.0;
y[4] = 1.0 + iShape * 3;

Expand Down
84 changes: 42 additions & 42 deletions tests/stream2.out
Original file line number Diff line number Diff line change
Expand Up @@ -169,27 +169,27 @@ Shape:0 (Arc) nVertices=5, nParts=1
Bounds:(1,1, 0)
to (2,2, 0)
(1,1, 0) Ring
(2,1, 0)
(2,2, 0)
(1,2, 0)
(2,2, 0)
(2,1, 0)
(1,1, 0)

Shape:1 (Arc) nVertices=5, nParts=1
Bounds:(1,4, 0)
to (2,5, 0)
(1,4, 0) Ring
(2,4, 0)
(2,5, 0)
(1,5, 0)
(2,5, 0)
(2,4, 0)
(1,4, 0)

Shape:2 (Arc) nVertices=5, nParts=1
Bounds:(1,7, 0)
to (2,8, 0)
(1,7, 0) Ring
(2,7, 0)
(2,8, 0)
(1,8, 0)
(2,8, 0)
(2,7, 0)
(1,7, 0)

Shape:3 (Arc) nVertices=15, nParts=3
Expand Down Expand Up @@ -222,27 +222,27 @@ Shape:0 (ArcZ) nVertices=5, nParts=1
Bounds:(1,1, 3.35, 4.45)
to (2,2, 7.35, 8.45)
(1,1, 3.35, 4.45) Ring
(2,1, 4.35, 5.45)
(1,2, 4.35, 5.45)
(2,2, 5.35, 6.45)
(1,2, 6.35, 7.45)
(2,1, 6.35, 7.45)
(1,1, 7.35, 8.45)

Shape:1 (ArcZ) nVertices=5, nParts=1
Bounds:(1,4, 13.35, 14.45)
to (2,5, 17.35, 18.45)
(1,4, 13.35, 14.45) Ring
(2,4, 14.35, 15.45)
(1,5, 14.35, 15.45)
(2,5, 15.35, 16.45)
(1,5, 16.35, 17.45)
(2,4, 16.35, 17.45)
(1,4, 17.35, 18.45)

Shape:2 (ArcZ) nVertices=5, nParts=1
Bounds:(1,7, 23.35, 24.45)
to (2,8, 27.35, 28.45)
(1,7, 23.35, 24.45) Ring
(2,7, 24.35, 25.45)
(1,8, 24.35, 25.45)
(2,8, 25.35, 26.45)
(1,8, 26.35, 27.45)
(2,7, 26.35, 27.45)
(1,7, 27.35, 28.45)

Shape:3 (ArcZ) nVertices=15, nParts=3
Expand Down Expand Up @@ -275,27 +275,27 @@ Shape:0 (ArcM) nVertices=5, nParts=1
Bounds:(1,1, 0, 4.45)
to (2,2, 0, 8.45)
(1,1, 0, 4.45) Ring
(2,1, 0, 5.45)
(1,2, 0, 5.45)
(2,2, 0, 6.45)
(1,2, 0, 7.45)
(2,1, 0, 7.45)
(1,1, 0, 8.45)

Shape:1 (ArcM) nVertices=5, nParts=1
Bounds:(1,4, 0, 14.45)
to (2,5, 0, 18.45)
(1,4, 0, 14.45) Ring
(2,4, 0, 15.45)
(1,5, 0, 15.45)
(2,5, 0, 16.45)
(1,5, 0, 17.45)
(2,4, 0, 17.45)
(1,4, 0, 18.45)

Shape:2 (ArcM) nVertices=5, nParts=1
Bounds:(1,7, 0, 24.45)
to (2,8, 0, 28.45)
(1,7, 0, 24.45) Ring
(2,7, 0, 25.45)
(1,8, 0, 25.45)
(2,8, 0, 26.45)
(1,8, 0, 27.45)
(2,7, 0, 27.45)
(1,7, 0, 28.45)

Shape:3 (ArcM) nVertices=15, nParts=3
Expand Down Expand Up @@ -328,27 +328,27 @@ Shape:0 (Polygon) nVertices=5, nParts=1
Bounds:(1,1, 0)
to (2,2, 0)
(1,1, 0) Ring
(2,1, 0)
(2,2, 0)
(1,2, 0)
(2,2, 0)
(2,1, 0)
(1,1, 0)

Shape:1 (Polygon) nVertices=5, nParts=1
Bounds:(1,4, 0)
to (2,5, 0)
(1,4, 0) Ring
(2,4, 0)
(2,5, 0)
(1,5, 0)
(2,5, 0)
(2,4, 0)
(1,4, 0)

Shape:2 (Polygon) nVertices=5, nParts=1
Bounds:(1,7, 0)
to (2,8, 0)
(1,7, 0) Ring
(2,7, 0)
(2,8, 0)
(1,8, 0)
(2,8, 0)
(2,7, 0)
(1,7, 0)

Shape:3 (Polygon) nVertices=15, nParts=3
Expand Down Expand Up @@ -381,27 +381,27 @@ Shape:0 (PolygonZ) nVertices=5, nParts=1
Bounds:(1,1, 3.35, 4.45)
to (2,2, 7.35, 8.45)
(1,1, 3.35, 4.45) Ring
(2,1, 4.35, 5.45)
(1,2, 4.35, 5.45)
(2,2, 5.35, 6.45)
(1,2, 6.35, 7.45)
(2,1, 6.35, 7.45)
(1,1, 7.35, 8.45)

Shape:1 (PolygonZ) nVertices=5, nParts=1
Bounds:(1,4, 13.35, 14.45)
to (2,5, 17.35, 18.45)
(1,4, 13.35, 14.45) Ring
(2,4, 14.35, 15.45)
(1,5, 14.35, 15.45)
(2,5, 15.35, 16.45)
(1,5, 16.35, 17.45)
(2,4, 16.35, 17.45)
(1,4, 17.35, 18.45)

Shape:2 (PolygonZ) nVertices=5, nParts=1
Bounds:(1,7, 23.35, 24.45)
to (2,8, 27.35, 28.45)
(1,7, 23.35, 24.45) Ring
(2,7, 24.35, 25.45)
(1,8, 24.35, 25.45)
(2,8, 25.35, 26.45)
(1,8, 26.35, 27.45)
(2,7, 26.35, 27.45)
(1,7, 27.35, 28.45)

Shape:3 (PolygonZ) nVertices=15, nParts=3
Expand Down Expand Up @@ -434,27 +434,27 @@ Shape:0 (PolygonM) nVertices=5, nParts=1
Bounds:(1,1, 0, 4.45)
to (2,2, 0, 8.45)
(1,1, 0, 4.45) Ring
(2,1, 0, 5.45)
(1,2, 0, 5.45)
(2,2, 0, 6.45)
(1,2, 0, 7.45)
(2,1, 0, 7.45)
(1,1, 0, 8.45)

Shape:1 (PolygonM) nVertices=5, nParts=1
Bounds:(1,4, 0, 14.45)
to (2,5, 0, 18.45)
(1,4, 0, 14.45) Ring
(2,4, 0, 15.45)
(1,5, 0, 15.45)
(2,5, 0, 16.45)
(1,5, 0, 17.45)
(2,4, 0, 17.45)
(1,4, 0, 18.45)

Shape:2 (PolygonM) nVertices=5, nParts=1
Bounds:(1,7, 0, 24.45)
to (2,8, 0, 28.45)
(1,7, 0, 24.45) Ring
(2,7, 0, 25.45)
(1,8, 0, 25.45)
(2,8, 0, 26.45)
(1,8, 0, 27.45)
(2,7, 0, 27.45)
(1,7, 0, 28.45)

Shape:3 (PolygonM) nVertices=15, nParts=3
Expand Down Expand Up @@ -487,27 +487,27 @@ Shape:0 (MultiPatch) nVertices=5, nParts=1
Bounds:(1,1, 3.35)
to (2,2, 7.35)
(1,1, 3.35) Ring
(2,1, 4.35)
(1,2, 4.35)
(2,2, 5.35)
(1,2, 6.35)
(2,1, 6.35)
(1,1, 7.35)

Shape:1 (MultiPatch) nVertices=5, nParts=1
Bounds:(1,4, 13.35)
to (2,5, 17.35)
(1,4, 13.35) Ring
(2,4, 14.35)
(1,5, 14.35)
(2,5, 15.35)
(1,5, 16.35)
(2,4, 16.35)
(1,4, 17.35)

Shape:2 (MultiPatch) nVertices=5, nParts=1
Bounds:(1,7, 23.35)
to (2,8, 27.35)
(1,7, 23.35) Ring
(2,7, 24.35)
(1,8, 24.35)
(2,8, 25.35)
(1,8, 26.35)
(2,7, 26.35)
(1,7, 27.35)

Shape:3 (MultiPatch) nVertices=15, nParts=3
Expand Down

0 comments on commit fe797f2

Please sign in to comment.