Menu

DsePolygonIterator

struct DsePolygonIterator

Public Functions

DsePolygonIterator *dse_polygon_iterator_new()

Creates a new polygon iterator.

Return

Returns an iterator that must be freed.

See

dse_polygon_iterator_free()

void dse_polygon_iterator_free(DsePolygonIterator *iterator)

Frees a polygon iterator instance.

Parameters
  • iterator:

CassError dse_polygon_iterator_reset(DsePolygonIterator *iterator, const CassValue *value)

Resets a polygon iterator so that it can be reused to process a binary representation.

Return

CASS_OK if successful, otherwise an error occurred.

Parameters
  • iterator: the iterator to reset

  • value: binary representation of the polygon

CassError dse_polygon_iterator_reset_with_wkt(DsePolygonIterator *iterator, const char *wkt)

Resets a polygon iterator so that it can be reused to parse WKT.

Note

The wkt string must remain allocated throughout the lifetime of the iterator since the iterator traverses the string without copying it.

Return

CASS_OK if successful, otherwise an error occurred.

Parameters
  • iterator: the iterator to reset

  • wkt: WKT representation of the polygon

CassError dse_polygon_iterator_reset_with_wkt_n(DsePolygonIterator *iterator, const char *wkt, size_t wkt_length)

Same as dse_polygon_iterator_reset_with_wkt(), but with lengths for string parameters.

Note

The wkt string must remain allocated throughout the lifetime of the iterator since the iterator traverses the string without copying it.

Return

CASS_OK if successful, otherwise an error occurred.

Parameters
  • iterator: the iterator to reset

  • wkt: WKT representation (string) of the polygon

  • wkt_length: length of wkt string

cass_uint32_t dse_polygon_iterator_num_rings(const DsePolygonIterator *iterator)

Gets the number rings in the polygon.

Return

The number of rings in the polygon.

Parameters
  • iterator:

CassError dse_polygon_iterator_next_num_points(DsePolygonIterator *iterator, cass_uint32_t *num_points)

Gets the number of points for the current ring.

Return

CASS_OK if successful, otherwise an error occurred.

Parameters
  • iterator:

  • num_points:

CassError dse_polygon_iterator_next_point(DsePolygonIterator *iterator, cass_double_t *x, cass_double_t *y)

Gets the next point in the current ring.

Return

CASS_OK if successful, otherwise an error occurred.

Parameters
  • iterator:

  • x:

  • y: