Return the ring at the specified index. The first index, 0, will always return the exterior ring. Indices > 0 will return the interior ring at the given index (e.g., poly[1] and poly[2] would return the first and second interior ring, respectively). CAREFUL:
(self, index)
| 125 | capi.destroy_geom(prev_ptr) |
| 126 | |
| 127 | def _get_single_internal(self, index): |
| 128 | """ |
| 129 | Return the ring at the specified index. The first index, 0, will |
| 130 | always return the exterior ring. Indices > 0 will return the |
| 131 | interior ring at the given index (e.g., poly[1] and poly[2] would |
| 132 | return the first and second interior ring, respectively). |
| 133 | |
| 134 | CAREFUL: Internal/External are not the same as Interior/Exterior! |
| 135 | Return a pointer from the existing geometries for use internally by the |
| 136 | object's methods. _get_single_external() returns a clone of the same |
| 137 | geometry for use by external code. |
| 138 | """ |
| 139 | if index == 0: |
| 140 | return capi.get_extring(self.ptr) |
| 141 | else: |
| 142 | # Getting the interior ring, have to subtract 1 from the index. |
| 143 | return capi.get_intring(self.ptr, index - 1) |
| 144 | |
| 145 | def _get_single_external(self, index): |
| 146 | return GEOSGeometry( |
no outgoing calls
no test coverage detected