def __init__(self,
                 parent_uri,
                 parent_localname,
                 long_namespace_uri,
                 long_localname,
                 lat_namespace_uri,
                 lat_localname,
                 coordinate_system="wgs84",
                 range_value_positions=False,
                 invalid_values='reject'):
        """
        Create a geospatial element attribute pair index.
        """
        validate_coordinate_system(coordinate_system)
        validate_boolean(range_value_positions)
        validate_index_invalid_value_actions(invalid_values)

        self._config = {
            'parent-namespace-uri': parent_uri,
            'parent-localname': parent_localname,
            'longitude-namespace-uri': long_namespace_uri,
            'longitude-localname': long_localname,
            'latitude-namespace-uri': lat_namespace_uri,
            'latitude-localname': lat_localname,
            'coordinate-system': coordinate_system,
            'range-value-positions': range_value_positions,
            'invalid-values': invalid_values
        }
    def __init__(self,
                 parent_uri,
                 parent_localname,
                 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 = {
            'parent-namespace-uri': parent_uri,
            'parent-localname': parent_localname,
            'namespace-uri': namespace_uri,
            'localname': localname,
            'coordinate-system': coordinate_system,
            'point-format': point_format,
            'range-value-positions': range_value_positions,
            'invalid-values': invalid_values
        }
    def set_coordinate_system(self, coordinate_system):
        """
        Sets the coordinate system used for points in the index.

        :param coordinate_system: The coordinate system.

        :return: The index object
        """
        validate_coordinate_system(coordinate_system)
        self._config['coordinate-system'] = coordinate_system
        return self
示例#4
0
    def set_coordinate_system(self, coordinate_system):
        """
        Sets the coordinate system used for points in the index.

        :param coordinate_system: The coordinate system.

        :return: The index object
        """
        validate_coordinate_system(coordinate_system)
        self._config['coordinate-system'] = coordinate_system
        return self
示例#5
0
    def __init__(self, path_expr,
                 coordinate_system="wgs84", geohash_precision=6):
        """
        Create a geospatial region index.
        """
        validate_coordinate_system(coordinate_system)
        validate_geohash_precision(geohash_precision)

        self._config = {
            'path-expression': path_expr,
            'coordinate-system': coordinate_system,
            'geohash-precision': geohash_precision
        }
示例#6
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
        }
示例#7
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
        }
示例#8
0
    def __init__(self, parent_uri, parent_localname,
                 long_namespace_uri, long_localname,
                 lat_namespace_uri, lat_localname,
                 coordinate_system="wgs84",
                 range_value_positions=False, invalid_values='reject'):
        """
        Create a geospatial element attribute pair index.
        """
        validate_coordinate_system(coordinate_system)
        validate_boolean(range_value_positions)
        validate_index_invalid_value_actions(invalid_values)

        self._config = {
            'parent-namespace-uri': parent_uri,
            'parent-localname': parent_localname,
            'longitude-namespace-uri': long_namespace_uri,
            'longitude-localname': long_localname,
            'latitude-namespace-uri': lat_namespace_uri,
            'latitude-localname': lat_localname,
            'coordinate-system': coordinate_system,
            'range-value-positions': range_value_positions,
            'invalid-values': invalid_values
        }