Example #1
0
    def set_point_format(self, point_format):
        """
        Sets the point format used for points in the index.

        :param point_format: The point format.

        :return: The index object
        """
        validate_point_format(point_format)
        self._config['point-format'] = point_format
        return self
Example #2
0
    def __init__(self, path_expr,
                 coordinate_system="wgs84", point_format="point",
                 range_value_positions=False, invalid_values='reject'):
        """
        Create a geospatial path index.
        """
        validate_coordinate_system(coordinate_system)
        validate_point_format(point_format)
        validate_boolean(range_value_positions)
        validate_index_invalid_value_actions(invalid_values)

        self._config = {
            'path-expression': path_expr,
            'coordinate-system': coordinate_system,
            'point-format': point_format,
            'range-value-positions': range_value_positions,
            'invalid-values': invalid_values
        }
Example #3
0
    def __init__(self, namespace_uri, localname,
                 coordinate_system="wgs84", point_format="point",
                 range_value_positions=False, invalid_values='reject'):
        """
        Create a geospatial element index.
        """
        validate_coordinate_system(coordinate_system)
        validate_point_format(point_format)
        validate_boolean(range_value_positions)
        validate_index_invalid_value_actions(invalid_values)

        self._config = {
            'namespace-uri': namespace_uri,
            'localname': localname,
            'coordinate-system': coordinate_system,
            'point-format': point_format,
            'range-value-positions': range_value_positions,
            'invalid-values': invalid_values
        }