Skip to content

Commit 2542121

Browse files
committed
initial commit
1 parent 14c33a5 commit 2542121

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Sources/AgroAPI/AgroProtocol.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,15 @@ public struct AgroPolygon: Codable {
4343
public let name: String
4444
public let geo_json: Feature
4545

46-
init(name: String, coords: [[[Double]]]) {
46+
public init(name: String, coords: [[[Double]]]) {
4747
self.name = name
4848
let prop = Properties(name: nil)
4949
let geom = Geometry(type: "Polygon", coordinates: coords)
5050
self.geo_json = Feature(type: "Feature", properties: prop, geometry: geom)
5151
}
5252

5353
/// check that the coords are polygons, and that the first and last positions of all polygons contain the same value.
54-
func isValidPoly() -> Bool {
54+
public func isValidPoly() -> Bool {
5555
for coords in geo_json.geometry.coordinates {
5656
if coords.count < 3 { return false }
5757
if coords.first != coords.last { return false }

0 commit comments

Comments
 (0)