|
49 | 49 | ],
|
50 | 50 | [0],
|
51 | 51 | {'type':'Polygon','coordinates':[
|
52 |
| - shapefile.rewind([(1,1),(1,9),(9,9),(9,1),(1,1)]), |
| 52 | + [(1,1),(1,9),(9,9),(9,1),(1,1)], |
53 | 53 | ]}
|
54 | 54 | ),
|
55 | 55 | (shapefile.POLYGON, # single polygon, holes (ordered)
|
|
59 | 59 | ],
|
60 | 60 | [0,5,5+5],
|
61 | 61 | {'type':'Polygon','coordinates':[
|
62 |
| - shapefile.rewind([(1,1),(1,9),(9,9),(9,1),(1,1)]), # exterior |
63 |
| - shapefile.rewind([(2,2),(4,2),(4,4),(2,4),(2,2)]), # hole 1 |
64 |
| - shapefile.rewind([(5,5),(7,5),(7,7),(5,7),(5,5)]), # hole 2 |
| 62 | + [(1,1),(1,9),(9,9),(9,1),(1,1)], # exterior |
| 63 | + [(2,2),(4,2),(4,4),(2,4),(2,2)], # hole 1 |
| 64 | + [(5,5),(7,5),(7,7),(5,7),(5,5)], # hole 2 |
65 | 65 | ]}
|
66 | 66 | ),
|
67 | 67 | (shapefile.POLYGON, # single polygon, holes (unordered)
|
|
72 | 72 | ],
|
73 | 73 | [0,5,5+5],
|
74 | 74 | {'type':'Polygon','coordinates':[
|
75 |
| - shapefile.rewind([(1,1),(1,9),(9,9),(9,1),(1,1)]), # exterior |
76 |
| - shapefile.rewind([(2,2),(4,2),(4,4),(2,4),(2,2)]), # hole 1 |
77 |
| - shapefile.rewind([(5,5),(7,5),(7,7),(5,7),(5,5)]), # hole 2 |
| 75 | + [(1,1),(1,9),(9,9),(9,1),(1,1)], # exterior |
| 76 | + [(2,2),(4,2),(4,4),(2,4),(2,2)], # hole 1 |
| 77 | + [(5,5),(7,5),(7,7),(5,7),(5,5)], # hole 2 |
78 | 78 | ]}
|
79 | 79 | ),
|
80 | 80 | (shapefile.POLYGON, # multi polygon, no holes
|
|
84 | 84 | [0,5],
|
85 | 85 | {'type':'MultiPolygon','coordinates':[
|
86 | 86 | [ # poly 1
|
87 |
| - shapefile.rewind([(1,1),(1,9),(9,9),(9,1),(1,1)]), |
| 87 | + [(1,1),(1,9),(9,9),(9,1),(1,1)], |
88 | 88 | ],
|
89 | 89 | [ # poly 2
|
90 |
| - shapefile.rewind([(11,11),(11,19),(19,19),(19,11),(11,11)]), |
| 90 | + [(11,11),(11,19),(19,19),(19,11),(11,11)], |
91 | 91 | ],
|
92 | 92 | ]}
|
93 | 93 | ),
|
|
102 | 102 | [0,5,10,15,20,25],
|
103 | 103 | {'type':'MultiPolygon','coordinates':[
|
104 | 104 | [ # poly 1
|
105 |
| - shapefile.rewind([(1,1),(1,9),(9,9),(9,1),(1,1)]), # exterior |
106 |
| - shapefile.rewind([(2,2),(4,2),(4,4),(2,4),(2,2)]), # hole 1 |
107 |
| - shapefile.rewind([(5,5),(7,5),(7,7),(5,7),(5,5)]), # hole 2 |
| 105 | + [(1,1),(1,9),(9,9),(9,1),(1,1)], # exterior |
| 106 | + [(2,2),(4,2),(4,4),(2,4),(2,2)], # hole 1 |
| 107 | + [(5,5),(7,5),(7,7),(5,7),(5,5)], # hole 2 |
108 | 108 | ],
|
109 | 109 | [ # poly 2
|
110 |
| - shapefile.rewind([(11,11),(11,19),(19,19),(19,11),(11,11)]), # exterior |
111 |
| - shapefile.rewind([(12,12),(14,12),(14,14),(12,14),(12,12)]), # hole 1 |
112 |
| - shapefile.rewind([(15,15),(17,15),(17,17),(15,17),(15,15)]), # hole 2 |
| 110 | + [(11,11),(11,19),(19,19),(19,11),(11,11)], # exterior |
| 111 | + [(12,12),(14,12),(14,14),(12,14),(12,12)], # hole 1 |
| 112 | + [(15,15),(17,15),(17,17),(15,17),(15,15)], # hole 2 |
113 | 113 | ],
|
114 | 114 | ]}
|
115 | 115 | ),
|
|
123 | 123 | [0,5,10,15,20],
|
124 | 124 | {'type':'MultiPolygon','coordinates':[
|
125 | 125 | [ # poly 1
|
126 |
| - shapefile.rewind([(1,1),(1,9),(9,9),(9,1),(1,1)]), # exterior 1 |
127 |
| - shapefile.rewind([(2,2),(8,2),(8,8),(2,8),(2,2)]), # hole 1.1 |
| 126 | + [(1,1),(1,9),(9,9),(9,1),(1,1)], # exterior 1 |
| 127 | + [(2,2),(8,2),(8,8),(2,8),(2,2)], # hole 1.1 |
128 | 128 | ],
|
129 | 129 | [ # poly 2
|
130 |
| - shapefile.rewind([(3,3),(3,7),(7,7),(7,3),(3,3)]), # exterior 2 |
131 |
| - shapefile.rewind([(4,4),(6,4),(6,6),(4,6),(4,4)]), # hole 2.1 |
| 130 | + [(3,3),(3,7),(7,7),(7,3),(3,3)], # exterior 2 |
| 131 | + [(4,4),(6,4),(6,6),(4,6),(4,4)], # hole 2.1 |
132 | 132 | ],
|
133 | 133 | [ # poly 3
|
134 |
| - shapefile.rewind([(4.5,4.5),(4.5,5.5),(5.5,5.5),(5.5,4.5),(4.5,4.5)]), # exterior 3 |
| 134 | + [(4.5,4.5),(4.5,5.5),(5.5,5.5),(5.5,4.5),(4.5,4.5)], # exterior 3 |
135 | 135 | ],
|
136 | 136 | ]}
|
137 | 137 | ),
|
|
145 | 145 | [0,5,10,15,20+3],
|
146 | 146 | {'type':'MultiPolygon','coordinates':[
|
147 | 147 | [ # poly 1
|
148 |
| - shapefile.rewind([(1,1),(1,9),(9,9),(9,1),(1,1)]), # exterior 1 |
149 |
| - shapefile.rewind([(2,2),(3,3),(4,2),(8,2),(8,8),(4,8),(2,8),(2,4),(2,2)]), # hole 1.1 |
| 148 | + [(1,1),(1,9),(9,9),(9,1),(1,1)], # exterior 1 |
| 149 | + [(2,2),(3,3),(4,2),(8,2),(8,8),(4,8),(2,8),(2,4),(2,2)], # hole 1.1 |
150 | 150 | ],
|
151 | 151 | [ # poly 2
|
152 |
| - shapefile.rewind([(3,3),(3,7),(7,7),(7,3),(3,3)]), # exterior 2 |
153 |
| - shapefile.rewind([(4,4),(4,4),(6,4),(6,4),(6,4),(6,6),(4,6),(4,4)]), # hole 2.1 |
| 152 | + [(3,3),(3,7),(7,7),(7,3),(3,3)], # exterior 2 |
| 153 | + [(4,4),(4,4),(6,4),(6,4),(6,4),(6,6),(4,6),(4,4)], # hole 2.1 |
154 | 154 | ],
|
155 | 155 | [ # poly 3
|
156 |
| - shapefile.rewind([(4.5,4.5),(4.5,5.5),(5.5,5.5),(5.5,4.5),(4.5,4.5)]), # exterior 3 |
| 156 | + [(4.5,4.5),(4.5,5.5),(5.5,5.5),(5.5,4.5),(4.5,4.5)], # exterior 3 |
157 | 157 | ],
|
158 | 158 | ]}
|
159 | 159 | ),
|
|
169 | 169 | [0,5,10,15,20,25,30],
|
170 | 170 | {'type':'MultiPolygon','coordinates':[
|
171 | 171 | [ # poly 1
|
172 |
| - shapefile.rewind([(1,1),(1,9),(9,9),(9,1),(1,1)]), # exterior |
173 |
| - shapefile.rewind([(2,2),(4,2),(4,4),(2,4),(2,2)]), # hole 1 |
174 |
| - shapefile.rewind([(5,5),(7,5),(7,7),(5,7),(5,5)]), # hole 2 |
| 172 | + [(1,1),(1,9),(9,9),(9,1),(1,1)], # exterior |
| 173 | + [(2,2),(4,2),(4,4),(2,4),(2,2)], # hole 1 |
| 174 | + [(5,5),(7,5),(7,7),(5,7),(5,5)], # hole 2 |
175 | 175 | ],
|
176 | 176 | [ # poly 2
|
177 |
| - shapefile.rewind([(11,11),(11,19),(19,19),(19,11),(11,11)]), # exterior |
178 |
| - shapefile.rewind([(12,12),(14,12),(14,14),(12,14),(12,12)]), # hole 1 |
179 |
| - shapefile.rewind([(15,15),(17,15),(17,17),(15,17),(15,15)]), # hole 2 |
| 177 | + [(11,11),(11,19),(19,19),(19,11),(11,11)], # exterior |
| 178 | + [(12,12),(14,12),(14,14),(12,14),(12,12)], # hole 1 |
| 179 | + [(15,15),(17,15),(17,17),(15,17),(15,15)], # hole 2 |
180 | 180 | ],
|
181 |
| - [ # poly 3 (orphaned hole) |
182 |
| - # Note: due to the hole-to-exterior conversion, should return the same ring orientation |
| 181 | + [ # poly 3 (orphaned hole) |
183 | 182 | [(95,95),(97,95),(97,97),(95,97),(95,95)], # exterior
|
184 | 183 | ],
|
185 | 184 | ]}
|
|
191 | 190 | [0,5],
|
192 | 191 | {'type':'MultiPolygon','coordinates':[
|
193 | 192 | [ # poly 1
|
194 |
| - # Note: due to the hole-to-exterior conversion, should return the same ring orientation |
195 | 193 | [(1,1),(9,1),(9,9),(1,9),(1,1)],
|
196 | 194 | ],
|
197 | 195 | [ # poly 2
|
198 |
| - # Note: due to the hole-to-exterior conversion, should return the same ring orientation |
199 | 196 | [(11,11),(19,11),(19,19),(11,19),(11,11)],
|
200 | 197 | ],
|
201 | 198 | ]}
|
|
0 commit comments