Skip to content

Commit

Permalink
Added context arg in geos operations getGeometry and getGeometries
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieu17g committed Mar 9, 2022
1 parent 39b8a1c commit ee35ba7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/geos_operations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,8 @@ isClosed(obj::LineString) = isClosed(obj.ptr) # Call only on LINESTRING

# Gets sub-geomtry at index n or a vector of all sub-geometries
for geom in (:Point, :MultiPoint, :LineString, :MultiLineString, :LinearRing, :Polygon, :MultiPolygon, :GeometryCollection)
@eval getGeometry(obj::$geom, n::Integer) = geomFromGEOS(getGeometry(obj.ptr, n))
@eval getGeometries(obj::$geom) = geomFromGEOS.(getGeometries(obj.ptr))
@eval getGeometry(obj::$geom, n::Integer, context::GEOSContext = _context) = geomFromGEOS(getGeometry(obj.ptr, n, context))
@eval getGeometries(obj::$geom, context::GEOSContext = _context) = geomFromGEOS.(getGeometries(obj.ptr, context))
end

# Converts Geometry to normal form (or canonical form).
Expand Down

0 comments on commit ee35ba7

Please sign in to comment.