.geojson
class: Point
- class Point(**kwargs)[source]
Represents a GeoJSON
Pointas a Python object, inheriting fromgeojson.Pointwith additional methods to conform to theHighchartsMetastandard interface.Class Inheritance
digraph inheritancea2febaa40b { bgcolor=transparent; rankdir=TB; size="8.0, 12.0"; "base.GeoJSON" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="A class representing a GeoJSON object."]; "geometry.Geometry" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="Represents an abstract base class for a WGS84 geometry."]; "base.GeoJSON" -> "geometry.Geometry" [arrowsize=0.5,style="setlinewidth(0.5)"]; "geometry.Point" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled"]; "geometry.Geometry" -> "geometry.Point" [arrowsize=0.5,style="setlinewidth(0.5)"]; "metaclasses.HighchartsMeta" [URL="../internals.html#highcharts_maps.metaclasses.HighchartsMeta",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Metaclass that is used to define the standard interface exposed for serializable"]; "utility_classes.geojson.GeoJSONBase" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="Base class used to implement standard methods that can be mixed-in to the"]; "metaclasses.HighchartsMeta" -> "utility_classes.geojson.GeoJSONBase" [arrowsize=0.5,style="setlinewidth(0.5)"]; "utility_classes.geojson.Point" [URL="#highcharts_maps.utility_classes.geojson.Point",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Represents a GeoJSON ``Point`` as a Python object, inheriting from"]; "utility_classes.geojson.GeoJSONBase" -> "utility_classes.geojson.Point" [arrowsize=0.5,style="setlinewidth(0.5)"]; "geometry.Point" -> "utility_classes.geojson.Point" [arrowsize=0.5,style="setlinewidth(0.5)"]; }- check_list_errors(checkFunc, lst)
Validation helper function.
- clear() None. Remove all items from D.
- copy(other=None, overwrite=True, **kwargs)
Copy the configuration settings from this instance to the
otherinstance.- Parameters:
other (
GeoJSONBase) – The target instance to which the properties of this instance should be copied. IfNone, will create a new instance and populate it with properties copied fromself. Defaults toNone.overwrite (
bool) – ifTrue, properties inotherthat are already set will be overwritten by their counterparts inself. Defaults toTrue.kwargs – Additional keyword arguments. Some special descendents of
HighchartsMetamay have special implementations of this method which rely on additional keyword arguments.
- Returns:
A mutated version of
otherwith new property values
- classmethod from_dict(as_dict: dict, allow_snake_case: bool = True)
Construct an instance of the class from a
dictobject.
- classmethod from_js_literal(as_str_or_file, allow_snake_case: bool = True, _break_loop_on_failure: bool = False)
Return a Python object representation of a Highcharts JavaScript object literal.
- Parameters:
as_str_or_file (
str) – The JavaScript object literal, represented either as astror as a filename which contains the JS object literal.allow_snake_case (
bool) – IfTrue, interpretssnake_casekeys as equivalent tocamelCasekeys. Defaults toTrue._break_loop_on_failure (
bool) – IfTrue, will break any looping operations in the event of a failure. Otherwise, will attempt to repair the failure. Defaults toFalse.
- Returns:
A Python object representation of the Highcharts JavaScript object literal.
- Return type:
HighchartsMeta
- classmethod from_json(as_json_or_file: str | bytes, allow_snake_case: bool = True)
Construct an instance of the class from a JSON string.
- Parameters:
as_json_or_file – The JSON string for the object or the filename of a file that contains the JSON string.
allow_snake_case (
bool) – IfTrue, interpretssnake_casekeys as equivalent tocamelCasekeys. Defaults toTrue.
- Returns:
A Python objcet representation of
as_json.- Return type:
HighchartsMeta
- fromkeys(value=None, /)
Create a new dictionary with keys from iterable and values set to value.
- get(key, default=None, /)
Return the value for key if key is in the dictionary, else default.
- items() a set-like object providing a view on D's items
- keys() a set-like object providing a view on D's keys
- pop(k[, d]) v, remove specified key and return the corresponding value.
If the key is not found, return the default if given; otherwise, raise a KeyError.
- popitem()
Remove and return a (key, value) pair as a 2-tuple.
Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty.
- setdefault(key, default=None, /)
Insert key with a value of default if key is not in the dictionary.
Return the value for key if key is in the dictionary, else default.
- to_dict() dict
Generate a
dictrepresentation of the object compatible with the Highcharts JavaScript library.Note
The
dictrepresentation has a property structure and naming convention that is intentionally consistent with the Highcharts JavaScript library. This is not Pythonic, but it makes managing the interplay between the two languages much, much simpler.
- classmethod to_instance(ob, default=None, strict=False)
Encode a GeoJSON
dictinto anGeoJSONBaseobject.Note
Assumes the caller knows that the
dictshould satisfy a GeoJSON type.- Parameters:
cls (
dict) –dictcontaining the elements to be encoded into a GeoJSON object.ob (
geojson.base.GeoJSON) – GeoJSON object into which to encode thedictprovided incls.default (
geojson.base.GeoJSON) – A default instance to append the content of thedict. Defaults toNone.strict (
bool) – Raise error if unable to coerce particular keys or attributes to a valid GeoJSON structure. Defaults toFalse.
- Returns:
A GeoJSON object with the dict’s elements as its constituents.
- Return type:
geojson.base.GeoJSON- Raises:
TypeError – If the input
dictcontains items that are not valid GeoJSON types.UnicodeEncodeError – If the input
dictcontains items of a type that contain non-ASCII characters.AttributeError – If the input
dictcontains items that are not valid GeoJSON types.
- to_js_literal(filename=None, encoding='utf-8') str | None
Return the object represented as a
strcontaining the JavaScript object literal.
- to_json(filename=None, encoding='utf-8')
Generate a JSON string/byte string representation of the object compatible with the Highcharts JavaScript library.
Note
This method will either return a standard
stror abytesobject depending on the JSON serialization library you are using. For example, if your environment has orjson, the result will be abytesrepresentation of the string.- Parameters:
- Returns:
A JSON representation of the object compatible with the Highcharts library.
- Return type:
- static trim_dict(untrimmed: dict, to_json: bool = False) dict
Remove keys from
untrimmedwhose values areNoneand convert values that have.to_dict()methods.
- static trim_iterable(untrimmed, to_json=False)
Convert any
EnforcedNullTypevalues inuntrimmedto'null'.
- update([E, ]**F) None. Update D from dict/iterable E and F.
If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]
- values() an object providing a view on D's values
class: MultiPoint
- class MultiPoint(**kwargs)[source]
Represents a GeoJSON
MultiPointas a Python object, inheriting fromgeojson.MultiPointwith additional methods to conform to theHighchartsMetastandard interface.Class Inheritance
digraph inheritanceeb9feff241 { bgcolor=transparent; rankdir=TB; size="8.0, 12.0"; "base.GeoJSON" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="A class representing a GeoJSON object."]; "geometry.Geometry" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="Represents an abstract base class for a WGS84 geometry."]; "base.GeoJSON" -> "geometry.Geometry" [arrowsize=0.5,style="setlinewidth(0.5)"]; "geometry.MultiPoint" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled"]; "geometry.Geometry" -> "geometry.MultiPoint" [arrowsize=0.5,style="setlinewidth(0.5)"]; "metaclasses.HighchartsMeta" [URL="../internals.html#highcharts_maps.metaclasses.HighchartsMeta",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Metaclass that is used to define the standard interface exposed for serializable"]; "utility_classes.geojson.GeoJSONBase" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="Base class used to implement standard methods that can be mixed-in to the"]; "metaclasses.HighchartsMeta" -> "utility_classes.geojson.GeoJSONBase" [arrowsize=0.5,style="setlinewidth(0.5)"]; "utility_classes.geojson.MultiPoint" [URL="#highcharts_maps.utility_classes.geojson.MultiPoint",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Represents a GeoJSON ``MultiPoint`` as a Python object, inheriting from"]; "utility_classes.geojson.GeoJSONBase" -> "utility_classes.geojson.MultiPoint" [arrowsize=0.5,style="setlinewidth(0.5)"]; "geometry.MultiPoint" -> "utility_classes.geojson.MultiPoint" [arrowsize=0.5,style="setlinewidth(0.5)"]; }- check_list_errors(checkFunc, lst)
Validation helper function.
- clear() None. Remove all items from D.
- copy(other=None, overwrite=True, **kwargs)
Copy the configuration settings from this instance to the
otherinstance.- Parameters:
other (
GeoJSONBase) – The target instance to which the properties of this instance should be copied. IfNone, will create a new instance and populate it with properties copied fromself. Defaults toNone.overwrite (
bool) – ifTrue, properties inotherthat are already set will be overwritten by their counterparts inself. Defaults toTrue.kwargs – Additional keyword arguments. Some special descendents of
HighchartsMetamay have special implementations of this method which rely on additional keyword arguments.
- Returns:
A mutated version of
otherwith new property values
- classmethod from_dict(as_dict: dict, allow_snake_case: bool = True)
Construct an instance of the class from a
dictobject.
- classmethod from_js_literal(as_str_or_file, allow_snake_case: bool = True, _break_loop_on_failure: bool = False)
Return a Python object representation of a Highcharts JavaScript object literal.
- Parameters:
as_str_or_file (
str) – The JavaScript object literal, represented either as astror as a filename which contains the JS object literal.allow_snake_case (
bool) – IfTrue, interpretssnake_casekeys as equivalent tocamelCasekeys. Defaults toTrue._break_loop_on_failure (
bool) – IfTrue, will break any looping operations in the event of a failure. Otherwise, will attempt to repair the failure. Defaults toFalse.
- Returns:
A Python object representation of the Highcharts JavaScript object literal.
- Return type:
HighchartsMeta
- classmethod from_json(as_json_or_file: str | bytes, allow_snake_case: bool = True)
Construct an instance of the class from a JSON string.
- Parameters:
as_json_or_file – The JSON string for the object or the filename of a file that contains the JSON string.
allow_snake_case (
bool) – IfTrue, interpretssnake_casekeys as equivalent tocamelCasekeys. Defaults toTrue.
- Returns:
A Python objcet representation of
as_json.- Return type:
HighchartsMeta
- fromkeys(value=None, /)
Create a new dictionary with keys from iterable and values set to value.
- get(key, default=None, /)
Return the value for key if key is in the dictionary, else default.
- items() a set-like object providing a view on D's items
- keys() a set-like object providing a view on D's keys
- pop(k[, d]) v, remove specified key and return the corresponding value.
If the key is not found, return the default if given; otherwise, raise a KeyError.
- popitem()
Remove and return a (key, value) pair as a 2-tuple.
Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty.
- setdefault(key, default=None, /)
Insert key with a value of default if key is not in the dictionary.
Return the value for key if key is in the dictionary, else default.
- to_dict() dict
Generate a
dictrepresentation of the object compatible with the Highcharts JavaScript library.Note
The
dictrepresentation has a property structure and naming convention that is intentionally consistent with the Highcharts JavaScript library. This is not Pythonic, but it makes managing the interplay between the two languages much, much simpler.
- classmethod to_instance(ob, default=None, strict=False)
Encode a GeoJSON
dictinto anGeoJSONBaseobject.Note
Assumes the caller knows that the
dictshould satisfy a GeoJSON type.- Parameters:
cls (
dict) –dictcontaining the elements to be encoded into a GeoJSON object.ob (
geojson.base.GeoJSON) – GeoJSON object into which to encode thedictprovided incls.default (
geojson.base.GeoJSON) – A default instance to append the content of thedict. Defaults toNone.strict (
bool) – Raise error if unable to coerce particular keys or attributes to a valid GeoJSON structure. Defaults toFalse.
- Returns:
A GeoJSON object with the dict’s elements as its constituents.
- Return type:
geojson.base.GeoJSON- Raises:
TypeError – If the input
dictcontains items that are not valid GeoJSON types.UnicodeEncodeError – If the input
dictcontains items of a type that contain non-ASCII characters.AttributeError – If the input
dictcontains items that are not valid GeoJSON types.
- to_js_literal(filename=None, encoding='utf-8') str | None
Return the object represented as a
strcontaining the JavaScript object literal.
- to_json(filename=None, encoding='utf-8')
Generate a JSON string/byte string representation of the object compatible with the Highcharts JavaScript library.
Note
This method will either return a standard
stror abytesobject depending on the JSON serialization library you are using. For example, if your environment has orjson, the result will be abytesrepresentation of the string.- Parameters:
- Returns:
A JSON representation of the object compatible with the Highcharts library.
- Return type:
- static trim_dict(untrimmed: dict, to_json: bool = False) dict
Remove keys from
untrimmedwhose values areNoneand convert values that have.to_dict()methods.
- static trim_iterable(untrimmed, to_json=False)
Convert any
EnforcedNullTypevalues inuntrimmedto'null'.
- update([E, ]**F) None. Update D from dict/iterable E and F.
If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]
- values() an object providing a view on D's values
class: LineString
- class LineString(**kwargs)[source]
Represents a GeoJSON
LineStringas a Python object, inheriting fromgeojson.LineStringwith additional methods to conform to theHighchartsMetastandard interface.Class Inheritance
digraph inheritanceb4e6c78eb3 { bgcolor=transparent; rankdir=TB; size="8.0, 12.0"; "base.GeoJSON" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="A class representing a GeoJSON object."]; "geometry.Geometry" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="Represents an abstract base class for a WGS84 geometry."]; "base.GeoJSON" -> "geometry.Geometry" [arrowsize=0.5,style="setlinewidth(0.5)"]; "geometry.LineString" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled"]; "geometry.MultiPoint" -> "geometry.LineString" [arrowsize=0.5,style="setlinewidth(0.5)"]; "geometry.MultiPoint" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled"]; "geometry.Geometry" -> "geometry.MultiPoint" [arrowsize=0.5,style="setlinewidth(0.5)"]; "metaclasses.HighchartsMeta" [URL="../internals.html#highcharts_maps.metaclasses.HighchartsMeta",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Metaclass that is used to define the standard interface exposed for serializable"]; "utility_classes.geojson.GeoJSONBase" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="Base class used to implement standard methods that can be mixed-in to the"]; "metaclasses.HighchartsMeta" -> "utility_classes.geojson.GeoJSONBase" [arrowsize=0.5,style="setlinewidth(0.5)"]; "utility_classes.geojson.LineString" [URL="#highcharts_maps.utility_classes.geojson.LineString",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Represents a GeoJSON ``LineString`` as a Python object, inheriting from"]; "utility_classes.geojson.GeoJSONBase" -> "utility_classes.geojson.LineString" [arrowsize=0.5,style="setlinewidth(0.5)"]; "geometry.LineString" -> "utility_classes.geojson.LineString" [arrowsize=0.5,style="setlinewidth(0.5)"]; }- check_list_errors(checkFunc, lst)
Validation helper function.
- clear() None. Remove all items from D.
- copy(other=None, overwrite=True, **kwargs)
Copy the configuration settings from this instance to the
otherinstance.- Parameters:
other (
GeoJSONBase) – The target instance to which the properties of this instance should be copied. IfNone, will create a new instance and populate it with properties copied fromself. Defaults toNone.overwrite (
bool) – ifTrue, properties inotherthat are already set will be overwritten by their counterparts inself. Defaults toTrue.kwargs – Additional keyword arguments. Some special descendents of
HighchartsMetamay have special implementations of this method which rely on additional keyword arguments.
- Returns:
A mutated version of
otherwith new property values
- classmethod from_dict(as_dict: dict, allow_snake_case: bool = True)
Construct an instance of the class from a
dictobject.
- classmethod from_js_literal(as_str_or_file, allow_snake_case: bool = True, _break_loop_on_failure: bool = False)
Return a Python object representation of a Highcharts JavaScript object literal.
- Parameters:
as_str_or_file (
str) – The JavaScript object literal, represented either as astror as a filename which contains the JS object literal.allow_snake_case (
bool) – IfTrue, interpretssnake_casekeys as equivalent tocamelCasekeys. Defaults toTrue._break_loop_on_failure (
bool) – IfTrue, will break any looping operations in the event of a failure. Otherwise, will attempt to repair the failure. Defaults toFalse.
- Returns:
A Python object representation of the Highcharts JavaScript object literal.
- Return type:
HighchartsMeta
- classmethod from_json(as_json_or_file: str | bytes, allow_snake_case: bool = True)
Construct an instance of the class from a JSON string.
- Parameters:
as_json_or_file – The JSON string for the object or the filename of a file that contains the JSON string.
allow_snake_case (
bool) – IfTrue, interpretssnake_casekeys as equivalent tocamelCasekeys. Defaults toTrue.
- Returns:
A Python objcet representation of
as_json.- Return type:
HighchartsMeta
- fromkeys(value=None, /)
Create a new dictionary with keys from iterable and values set to value.
- get(key, default=None, /)
Return the value for key if key is in the dictionary, else default.
- items() a set-like object providing a view on D's items
- keys() a set-like object providing a view on D's keys
- pop(k[, d]) v, remove specified key and return the corresponding value.
If the key is not found, return the default if given; otherwise, raise a KeyError.
- popitem()
Remove and return a (key, value) pair as a 2-tuple.
Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty.
- setdefault(key, default=None, /)
Insert key with a value of default if key is not in the dictionary.
Return the value for key if key is in the dictionary, else default.
- to_dict() dict
Generate a
dictrepresentation of the object compatible with the Highcharts JavaScript library.Note
The
dictrepresentation has a property structure and naming convention that is intentionally consistent with the Highcharts JavaScript library. This is not Pythonic, but it makes managing the interplay between the two languages much, much simpler.
- classmethod to_instance(ob, default=None, strict=False)
Encode a GeoJSON
dictinto anGeoJSONBaseobject.Note
Assumes the caller knows that the
dictshould satisfy a GeoJSON type.- Parameters:
cls (
dict) –dictcontaining the elements to be encoded into a GeoJSON object.ob (
geojson.base.GeoJSON) – GeoJSON object into which to encode thedictprovided incls.default (
geojson.base.GeoJSON) – A default instance to append the content of thedict. Defaults toNone.strict (
bool) – Raise error if unable to coerce particular keys or attributes to a valid GeoJSON structure. Defaults toFalse.
- Returns:
A GeoJSON object with the dict’s elements as its constituents.
- Return type:
geojson.base.GeoJSON- Raises:
TypeError – If the input
dictcontains items that are not valid GeoJSON types.UnicodeEncodeError – If the input
dictcontains items of a type that contain non-ASCII characters.AttributeError – If the input
dictcontains items that are not valid GeoJSON types.
- to_js_literal(filename=None, encoding='utf-8') str | None
Return the object represented as a
strcontaining the JavaScript object literal.
- to_json(filename=None, encoding='utf-8')
Generate a JSON string/byte string representation of the object compatible with the Highcharts JavaScript library.
Note
This method will either return a standard
stror abytesobject depending on the JSON serialization library you are using. For example, if your environment has orjson, the result will be abytesrepresentation of the string.- Parameters:
- Returns:
A JSON representation of the object compatible with the Highcharts library.
- Return type:
- static trim_dict(untrimmed: dict, to_json: bool = False) dict
Remove keys from
untrimmedwhose values areNoneand convert values that have.to_dict()methods.
- static trim_iterable(untrimmed, to_json=False)
Convert any
EnforcedNullTypevalues inuntrimmedto'null'.
- update([E, ]**F) None. Update D from dict/iterable E and F.
If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]
- values() an object providing a view on D's values
class: MultiLineString
- class MultiLineString(**kwargs)[source]
Represents a GeoJSON
MultiLineStringas a Python object, inheriting fromgeojson.MultiLineStringwith additional methods to conform to theHighchartsMetastandard interface.Class Inheritance
digraph inheritancefc5c46d702 { bgcolor=transparent; rankdir=TB; size="8.0, 12.0"; "base.GeoJSON" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="A class representing a GeoJSON object."]; "geometry.Geometry" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="Represents an abstract base class for a WGS84 geometry."]; "base.GeoJSON" -> "geometry.Geometry" [arrowsize=0.5,style="setlinewidth(0.5)"]; "geometry.MultiLineString" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled"]; "geometry.Geometry" -> "geometry.MultiLineString" [arrowsize=0.5,style="setlinewidth(0.5)"]; "metaclasses.HighchartsMeta" [URL="../internals.html#highcharts_maps.metaclasses.HighchartsMeta",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Metaclass that is used to define the standard interface exposed for serializable"]; "utility_classes.geojson.GeoJSONBase" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="Base class used to implement standard methods that can be mixed-in to the"]; "metaclasses.HighchartsMeta" -> "utility_classes.geojson.GeoJSONBase" [arrowsize=0.5,style="setlinewidth(0.5)"]; "utility_classes.geojson.MultiLineString" [URL="#highcharts_maps.utility_classes.geojson.MultiLineString",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Represents a GeoJSON ``MultiLineString`` as a Python object, inheriting from"]; "utility_classes.geojson.GeoJSONBase" -> "utility_classes.geojson.MultiLineString" [arrowsize=0.5,style="setlinewidth(0.5)"]; "geometry.MultiLineString" -> "utility_classes.geojson.MultiLineString" [arrowsize=0.5,style="setlinewidth(0.5)"]; }- check_list_errors(checkFunc, lst)
Validation helper function.
- clear() None. Remove all items from D.
- copy(other=None, overwrite=True, **kwargs)
Copy the configuration settings from this instance to the
otherinstance.- Parameters:
other (
GeoJSONBase) – The target instance to which the properties of this instance should be copied. IfNone, will create a new instance and populate it with properties copied fromself. Defaults toNone.overwrite (
bool) – ifTrue, properties inotherthat are already set will be overwritten by their counterparts inself. Defaults toTrue.kwargs – Additional keyword arguments. Some special descendents of
HighchartsMetamay have special implementations of this method which rely on additional keyword arguments.
- Returns:
A mutated version of
otherwith new property values
- classmethod from_dict(as_dict: dict, allow_snake_case: bool = True)
Construct an instance of the class from a
dictobject.
- classmethod from_js_literal(as_str_or_file, allow_snake_case: bool = True, _break_loop_on_failure: bool = False)
Return a Python object representation of a Highcharts JavaScript object literal.
- Parameters:
as_str_or_file (
str) – The JavaScript object literal, represented either as astror as a filename which contains the JS object literal.allow_snake_case (
bool) – IfTrue, interpretssnake_casekeys as equivalent tocamelCasekeys. Defaults toTrue._break_loop_on_failure (
bool) – IfTrue, will break any looping operations in the event of a failure. Otherwise, will attempt to repair the failure. Defaults toFalse.
- Returns:
A Python object representation of the Highcharts JavaScript object literal.
- Return type:
HighchartsMeta
- classmethod from_json(as_json_or_file: str | bytes, allow_snake_case: bool = True)
Construct an instance of the class from a JSON string.
- Parameters:
as_json_or_file – The JSON string for the object or the filename of a file that contains the JSON string.
allow_snake_case (
bool) – IfTrue, interpretssnake_casekeys as equivalent tocamelCasekeys. Defaults toTrue.
- Returns:
A Python objcet representation of
as_json.- Return type:
HighchartsMeta
- fromkeys(value=None, /)
Create a new dictionary with keys from iterable and values set to value.
- get(key, default=None, /)
Return the value for key if key is in the dictionary, else default.
- items() a set-like object providing a view on D's items
- keys() a set-like object providing a view on D's keys
- pop(k[, d]) v, remove specified key and return the corresponding value.
If the key is not found, return the default if given; otherwise, raise a KeyError.
- popitem()
Remove and return a (key, value) pair as a 2-tuple.
Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty.
- setdefault(key, default=None, /)
Insert key with a value of default if key is not in the dictionary.
Return the value for key if key is in the dictionary, else default.
- to_dict() dict
Generate a
dictrepresentation of the object compatible with the Highcharts JavaScript library.Note
The
dictrepresentation has a property structure and naming convention that is intentionally consistent with the Highcharts JavaScript library. This is not Pythonic, but it makes managing the interplay between the two languages much, much simpler.
- classmethod to_instance(ob, default=None, strict=False)
Encode a GeoJSON
dictinto anGeoJSONBaseobject.Note
Assumes the caller knows that the
dictshould satisfy a GeoJSON type.- Parameters:
cls (
dict) –dictcontaining the elements to be encoded into a GeoJSON object.ob (
geojson.base.GeoJSON) – GeoJSON object into which to encode thedictprovided incls.default (
geojson.base.GeoJSON) – A default instance to append the content of thedict. Defaults toNone.strict (
bool) – Raise error if unable to coerce particular keys or attributes to a valid GeoJSON structure. Defaults toFalse.
- Returns:
A GeoJSON object with the dict’s elements as its constituents.
- Return type:
geojson.base.GeoJSON- Raises:
TypeError – If the input
dictcontains items that are not valid GeoJSON types.UnicodeEncodeError – If the input
dictcontains items of a type that contain non-ASCII characters.AttributeError – If the input
dictcontains items that are not valid GeoJSON types.
- to_js_literal(filename=None, encoding='utf-8') str | None
Return the object represented as a
strcontaining the JavaScript object literal.
- to_json(filename=None, encoding='utf-8')
Generate a JSON string/byte string representation of the object compatible with the Highcharts JavaScript library.
Note
This method will either return a standard
stror abytesobject depending on the JSON serialization library you are using. For example, if your environment has orjson, the result will be abytesrepresentation of the string.- Parameters:
- Returns:
A JSON representation of the object compatible with the Highcharts library.
- Return type:
- static trim_dict(untrimmed: dict, to_json: bool = False) dict
Remove keys from
untrimmedwhose values areNoneand convert values that have.to_dict()methods.
- static trim_iterable(untrimmed, to_json=False)
Convert any
EnforcedNullTypevalues inuntrimmedto'null'.
- update([E, ]**F) None. Update D from dict/iterable E and F.
If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]
- values() an object providing a view on D's values
class: Polygon
- class Polygon(**kwargs)[source]
Represents a GeoJSON
Polygonas a Python object, inheriting fromgeojson.Polygonwith additional methods to conform to theHighchartsMetastandard interface.Class Inheritance
digraph inheritance3a3ad24aaa { bgcolor=transparent; rankdir=TB; size="8.0, 12.0"; "base.GeoJSON" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="A class representing a GeoJSON object."]; "geometry.Geometry" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="Represents an abstract base class for a WGS84 geometry."]; "base.GeoJSON" -> "geometry.Geometry" [arrowsize=0.5,style="setlinewidth(0.5)"]; "geometry.Polygon" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled"]; "geometry.Geometry" -> "geometry.Polygon" [arrowsize=0.5,style="setlinewidth(0.5)"]; "metaclasses.HighchartsMeta" [URL="../internals.html#highcharts_maps.metaclasses.HighchartsMeta",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Metaclass that is used to define the standard interface exposed for serializable"]; "utility_classes.geojson.GeoJSONBase" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="Base class used to implement standard methods that can be mixed-in to the"]; "metaclasses.HighchartsMeta" -> "utility_classes.geojson.GeoJSONBase" [arrowsize=0.5,style="setlinewidth(0.5)"]; "utility_classes.geojson.Polygon" [URL="#highcharts_maps.utility_classes.geojson.Polygon",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Represents a GeoJSON ``Polygon`` as a Python object, inheriting from"]; "utility_classes.geojson.GeoJSONBase" -> "utility_classes.geojson.Polygon" [arrowsize=0.5,style="setlinewidth(0.5)"]; "geometry.Polygon" -> "utility_classes.geojson.Polygon" [arrowsize=0.5,style="setlinewidth(0.5)"]; }- check_list_errors(checkFunc, lst)
Validation helper function.
- clear() None. Remove all items from D.
- copy(other=None, overwrite=True, **kwargs)
Copy the configuration settings from this instance to the
otherinstance.- Parameters:
other (
GeoJSONBase) – The target instance to which the properties of this instance should be copied. IfNone, will create a new instance and populate it with properties copied fromself. Defaults toNone.overwrite (
bool) – ifTrue, properties inotherthat are already set will be overwritten by their counterparts inself. Defaults toTrue.kwargs – Additional keyword arguments. Some special descendents of
HighchartsMetamay have special implementations of this method which rely on additional keyword arguments.
- Returns:
A mutated version of
otherwith new property values
- classmethod from_dict(as_dict: dict, allow_snake_case: bool = True)
Construct an instance of the class from a
dictobject.
- classmethod from_js_literal(as_str_or_file, allow_snake_case: bool = True, _break_loop_on_failure: bool = False)
Return a Python object representation of a Highcharts JavaScript object literal.
- Parameters:
as_str_or_file (
str) – The JavaScript object literal, represented either as astror as a filename which contains the JS object literal.allow_snake_case (
bool) – IfTrue, interpretssnake_casekeys as equivalent tocamelCasekeys. Defaults toTrue._break_loop_on_failure (
bool) – IfTrue, will break any looping operations in the event of a failure. Otherwise, will attempt to repair the failure. Defaults toFalse.
- Returns:
A Python object representation of the Highcharts JavaScript object literal.
- Return type:
HighchartsMeta
- classmethod from_json(as_json_or_file: str | bytes, allow_snake_case: bool = True)
Construct an instance of the class from a JSON string.
- Parameters:
as_json_or_file – The JSON string for the object or the filename of a file that contains the JSON string.
allow_snake_case (
bool) – IfTrue, interpretssnake_casekeys as equivalent tocamelCasekeys. Defaults toTrue.
- Returns:
A Python objcet representation of
as_json.- Return type:
HighchartsMeta
- fromkeys(value=None, /)
Create a new dictionary with keys from iterable and values set to value.
- get(key, default=None, /)
Return the value for key if key is in the dictionary, else default.
- items() a set-like object providing a view on D's items
- keys() a set-like object providing a view on D's keys
- pop(k[, d]) v, remove specified key and return the corresponding value.
If the key is not found, return the default if given; otherwise, raise a KeyError.
- popitem()
Remove and return a (key, value) pair as a 2-tuple.
Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty.
- setdefault(key, default=None, /)
Insert key with a value of default if key is not in the dictionary.
Return the value for key if key is in the dictionary, else default.
- to_dict() dict
Generate a
dictrepresentation of the object compatible with the Highcharts JavaScript library.Note
The
dictrepresentation has a property structure and naming convention that is intentionally consistent with the Highcharts JavaScript library. This is not Pythonic, but it makes managing the interplay between the two languages much, much simpler.
- classmethod to_instance(ob, default=None, strict=False)
Encode a GeoJSON
dictinto anGeoJSONBaseobject.Note
Assumes the caller knows that the
dictshould satisfy a GeoJSON type.- Parameters:
cls (
dict) –dictcontaining the elements to be encoded into a GeoJSON object.ob (
geojson.base.GeoJSON) – GeoJSON object into which to encode thedictprovided incls.default (
geojson.base.GeoJSON) – A default instance to append the content of thedict. Defaults toNone.strict (
bool) – Raise error if unable to coerce particular keys or attributes to a valid GeoJSON structure. Defaults toFalse.
- Returns:
A GeoJSON object with the dict’s elements as its constituents.
- Return type:
geojson.base.GeoJSON- Raises:
TypeError – If the input
dictcontains items that are not valid GeoJSON types.UnicodeEncodeError – If the input
dictcontains items of a type that contain non-ASCII characters.AttributeError – If the input
dictcontains items that are not valid GeoJSON types.
- to_js_literal(filename=None, encoding='utf-8') str | None
Return the object represented as a
strcontaining the JavaScript object literal.
- to_json(filename=None, encoding='utf-8')
Generate a JSON string/byte string representation of the object compatible with the Highcharts JavaScript library.
Note
This method will either return a standard
stror abytesobject depending on the JSON serialization library you are using. For example, if your environment has orjson, the result will be abytesrepresentation of the string.- Parameters:
- Returns:
A JSON representation of the object compatible with the Highcharts library.
- Return type:
- static trim_dict(untrimmed: dict, to_json: bool = False) dict
Remove keys from
untrimmedwhose values areNoneand convert values that have.to_dict()methods.
- static trim_iterable(untrimmed, to_json=False)
Convert any
EnforcedNullTypevalues inuntrimmedto'null'.
- update([E, ]**F) None. Update D from dict/iterable E and F.
If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]
- values() an object providing a view on D's values
class: MultiPolygon
- class MultiPolygon(**kwargs)[source]
Represents a GeoJSON
MultiPolygonas a Python object, inheriting fromgeojson.MultiPolygonwith additional methods to conform to theHighchartsMetastandard interface.Class Inheritance
digraph inheritance9a17dd9aca { bgcolor=transparent; rankdir=TB; size="8.0, 12.0"; "base.GeoJSON" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="A class representing a GeoJSON object."]; "geometry.Geometry" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="Represents an abstract base class for a WGS84 geometry."]; "base.GeoJSON" -> "geometry.Geometry" [arrowsize=0.5,style="setlinewidth(0.5)"]; "geometry.MultiPolygon" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled"]; "geometry.Geometry" -> "geometry.MultiPolygon" [arrowsize=0.5,style="setlinewidth(0.5)"]; "metaclasses.HighchartsMeta" [URL="../internals.html#highcharts_maps.metaclasses.HighchartsMeta",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Metaclass that is used to define the standard interface exposed for serializable"]; "utility_classes.geojson.GeoJSONBase" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="Base class used to implement standard methods that can be mixed-in to the"]; "metaclasses.HighchartsMeta" -> "utility_classes.geojson.GeoJSONBase" [arrowsize=0.5,style="setlinewidth(0.5)"]; "utility_classes.geojson.MultiPolygon" [URL="#highcharts_maps.utility_classes.geojson.MultiPolygon",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Represents a GeoJSON ``MultiPolygon`` as a Python object, inheriting from"]; "utility_classes.geojson.GeoJSONBase" -> "utility_classes.geojson.MultiPolygon" [arrowsize=0.5,style="setlinewidth(0.5)"]; "geometry.MultiPolygon" -> "utility_classes.geojson.MultiPolygon" [arrowsize=0.5,style="setlinewidth(0.5)"]; }- check_list_errors(checkFunc, lst)
Validation helper function.
- clear() None. Remove all items from D.
- copy(other=None, overwrite=True, **kwargs)
Copy the configuration settings from this instance to the
otherinstance.- Parameters:
other (
GeoJSONBase) – The target instance to which the properties of this instance should be copied. IfNone, will create a new instance and populate it with properties copied fromself. Defaults toNone.overwrite (
bool) – ifTrue, properties inotherthat are already set will be overwritten by their counterparts inself. Defaults toTrue.kwargs – Additional keyword arguments. Some special descendents of
HighchartsMetamay have special implementations of this method which rely on additional keyword arguments.
- Returns:
A mutated version of
otherwith new property values
- classmethod from_dict(as_dict: dict, allow_snake_case: bool = True)
Construct an instance of the class from a
dictobject.
- classmethod from_js_literal(as_str_or_file, allow_snake_case: bool = True, _break_loop_on_failure: bool = False)
Return a Python object representation of a Highcharts JavaScript object literal.
- Parameters:
as_str_or_file (
str) – The JavaScript object literal, represented either as astror as a filename which contains the JS object literal.allow_snake_case (
bool) – IfTrue, interpretssnake_casekeys as equivalent tocamelCasekeys. Defaults toTrue._break_loop_on_failure (
bool) – IfTrue, will break any looping operations in the event of a failure. Otherwise, will attempt to repair the failure. Defaults toFalse.
- Returns:
A Python object representation of the Highcharts JavaScript object literal.
- Return type:
HighchartsMeta
- classmethod from_json(as_json_or_file: str | bytes, allow_snake_case: bool = True)
Construct an instance of the class from a JSON string.
- Parameters:
as_json_or_file – The JSON string for the object or the filename of a file that contains the JSON string.
allow_snake_case (
bool) – IfTrue, interpretssnake_casekeys as equivalent tocamelCasekeys. Defaults toTrue.
- Returns:
A Python objcet representation of
as_json.- Return type:
HighchartsMeta
- fromkeys(value=None, /)
Create a new dictionary with keys from iterable and values set to value.
- get(key, default=None, /)
Return the value for key if key is in the dictionary, else default.
- items() a set-like object providing a view on D's items
- keys() a set-like object providing a view on D's keys
- pop(k[, d]) v, remove specified key and return the corresponding value.
If the key is not found, return the default if given; otherwise, raise a KeyError.
- popitem()
Remove and return a (key, value) pair as a 2-tuple.
Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty.
- setdefault(key, default=None, /)
Insert key with a value of default if key is not in the dictionary.
Return the value for key if key is in the dictionary, else default.
- to_dict() dict
Generate a
dictrepresentation of the object compatible with the Highcharts JavaScript library.Note
The
dictrepresentation has a property structure and naming convention that is intentionally consistent with the Highcharts JavaScript library. This is not Pythonic, but it makes managing the interplay between the two languages much, much simpler.
- classmethod to_instance(ob, default=None, strict=False)
Encode a GeoJSON
dictinto anGeoJSONBaseobject.Note
Assumes the caller knows that the
dictshould satisfy a GeoJSON type.- Parameters:
cls (
dict) –dictcontaining the elements to be encoded into a GeoJSON object.ob (
geojson.base.GeoJSON) – GeoJSON object into which to encode thedictprovided incls.default (
geojson.base.GeoJSON) – A default instance to append the content of thedict. Defaults toNone.strict (
bool) – Raise error if unable to coerce particular keys or attributes to a valid GeoJSON structure. Defaults toFalse.
- Returns:
A GeoJSON object with the dict’s elements as its constituents.
- Return type:
geojson.base.GeoJSON- Raises:
TypeError – If the input
dictcontains items that are not valid GeoJSON types.UnicodeEncodeError – If the input
dictcontains items of a type that contain non-ASCII characters.AttributeError – If the input
dictcontains items that are not valid GeoJSON types.
- to_js_literal(filename=None, encoding='utf-8') str | None
Return the object represented as a
strcontaining the JavaScript object literal.
- to_json(filename=None, encoding='utf-8')
Generate a JSON string/byte string representation of the object compatible with the Highcharts JavaScript library.
Note
This method will either return a standard
stror abytesobject depending on the JSON serialization library you are using. For example, if your environment has orjson, the result will be abytesrepresentation of the string.- Parameters:
- Returns:
A JSON representation of the object compatible with the Highcharts library.
- Return type:
- static trim_dict(untrimmed: dict, to_json: bool = False) dict
Remove keys from
untrimmedwhose values areNoneand convert values that have.to_dict()methods.
- static trim_iterable(untrimmed, to_json=False)
Convert any
EnforcedNullTypevalues inuntrimmedto'null'.
- update([E, ]**F) None. Update D from dict/iterable E and F.
If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]
- values() an object providing a view on D's values
class: GeometryCollection
- class GeometryCollection(**kwargs)[source]
Represents a GeoJSON
GeometryCollectionas a Python object, inheriting fromgeojson.GeometryCollectionwith additional methods to conform to theHighchartsMetastandard interface.Class Inheritance
digraph inheritance1ed43c3b9e { bgcolor=transparent; rankdir=TB; size="8.0, 12.0"; "base.GeoJSON" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="A class representing a GeoJSON object."]; "geometry.GeometryCollection" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="Represents an abstract base class for collections of WGS84 geometries."]; "base.GeoJSON" -> "geometry.GeometryCollection" [arrowsize=0.5,style="setlinewidth(0.5)"]; "metaclasses.HighchartsMeta" [URL="../internals.html#highcharts_maps.metaclasses.HighchartsMeta",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Metaclass that is used to define the standard interface exposed for serializable"]; "utility_classes.geojson.GeoJSONBase" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="Base class used to implement standard methods that can be mixed-in to the"]; "metaclasses.HighchartsMeta" -> "utility_classes.geojson.GeoJSONBase" [arrowsize=0.5,style="setlinewidth(0.5)"]; "utility_classes.geojson.GeometryCollection" [URL="#highcharts_maps.utility_classes.geojson.GeometryCollection",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Represents a GeoJSON ``GeometryCollection`` as a Python object, inheriting from"]; "utility_classes.geojson.GeoJSONBase" -> "utility_classes.geojson.GeometryCollection" [arrowsize=0.5,style="setlinewidth(0.5)"]; "geometry.GeometryCollection" -> "utility_classes.geojson.GeometryCollection" [arrowsize=0.5,style="setlinewidth(0.5)"]; }- check_list_errors(checkFunc, lst)
Validation helper function.
- clear() None. Remove all items from D.
- copy(other=None, overwrite=True, **kwargs)
Copy the configuration settings from this instance to the
otherinstance.- Parameters:
other (
GeoJSONBase) – The target instance to which the properties of this instance should be copied. IfNone, will create a new instance and populate it with properties copied fromself. Defaults toNone.overwrite (
bool) – ifTrue, properties inotherthat are already set will be overwritten by their counterparts inself. Defaults toTrue.kwargs – Additional keyword arguments. Some special descendents of
HighchartsMetamay have special implementations of this method which rely on additional keyword arguments.
- Returns:
A mutated version of
otherwith new property values
- classmethod from_dict(as_dict: dict, allow_snake_case: bool = True)
Construct an instance of the class from a
dictobject.
- classmethod from_js_literal(as_str_or_file, allow_snake_case: bool = True, _break_loop_on_failure: bool = False)
Return a Python object representation of a Highcharts JavaScript object literal.
- Parameters:
as_str_or_file (
str) – The JavaScript object literal, represented either as astror as a filename which contains the JS object literal.allow_snake_case (
bool) – IfTrue, interpretssnake_casekeys as equivalent tocamelCasekeys. Defaults toTrue._break_loop_on_failure (
bool) – IfTrue, will break any looping operations in the event of a failure. Otherwise, will attempt to repair the failure. Defaults toFalse.
- Returns:
A Python object representation of the Highcharts JavaScript object literal.
- Return type:
HighchartsMeta
- classmethod from_json(as_json_or_file: str | bytes, allow_snake_case: bool = True)
Construct an instance of the class from a JSON string.
- Parameters:
as_json_or_file – The JSON string for the object or the filename of a file that contains the JSON string.
allow_snake_case (
bool) – IfTrue, interpretssnake_casekeys as equivalent tocamelCasekeys. Defaults toTrue.
- Returns:
A Python objcet representation of
as_json.- Return type:
HighchartsMeta
- fromkeys(value=None, /)
Create a new dictionary with keys from iterable and values set to value.
- get(key, default=None, /)
Return the value for key if key is in the dictionary, else default.
- items() a set-like object providing a view on D's items
- keys() a set-like object providing a view on D's keys
- pop(k[, d]) v, remove specified key and return the corresponding value.
If the key is not found, return the default if given; otherwise, raise a KeyError.
- popitem()
Remove and return a (key, value) pair as a 2-tuple.
Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty.
- setdefault(key, default=None, /)
Insert key with a value of default if key is not in the dictionary.
Return the value for key if key is in the dictionary, else default.
- to_dict() dict
Generate a
dictrepresentation of the object compatible with the Highcharts JavaScript library.Note
The
dictrepresentation has a property structure and naming convention that is intentionally consistent with the Highcharts JavaScript library. This is not Pythonic, but it makes managing the interplay between the two languages much, much simpler.
- classmethod to_instance(ob, default=None, strict=False)
Encode a GeoJSON
dictinto anGeoJSONBaseobject.Note
Assumes the caller knows that the
dictshould satisfy a GeoJSON type.- Parameters:
cls (
dict) –dictcontaining the elements to be encoded into a GeoJSON object.ob (
geojson.base.GeoJSON) – GeoJSON object into which to encode thedictprovided incls.default (
geojson.base.GeoJSON) – A default instance to append the content of thedict. Defaults toNone.strict (
bool) – Raise error if unable to coerce particular keys or attributes to a valid GeoJSON structure. Defaults toFalse.
- Returns:
A GeoJSON object with the dict’s elements as its constituents.
- Return type:
geojson.base.GeoJSON- Raises:
TypeError – If the input
dictcontains items that are not valid GeoJSON types.UnicodeEncodeError – If the input
dictcontains items of a type that contain non-ASCII characters.AttributeError – If the input
dictcontains items that are not valid GeoJSON types.
- to_js_literal(filename=None, encoding='utf-8') str | None
Return the object represented as a
strcontaining the JavaScript object literal.
- to_json(filename=None, encoding='utf-8')
Generate a JSON string/byte string representation of the object compatible with the Highcharts JavaScript library.
Note
This method will either return a standard
stror abytesobject depending on the JSON serialization library you are using. For example, if your environment has orjson, the result will be abytesrepresentation of the string.- Parameters:
- Returns:
A JSON representation of the object compatible with the Highcharts library.
- Return type:
- static trim_dict(untrimmed: dict, to_json: bool = False) dict
Remove keys from
untrimmedwhose values areNoneand convert values that have.to_dict()methods.
- static trim_iterable(untrimmed, to_json=False)
Convert any
EnforcedNullTypevalues inuntrimmedto'null'.
- update([E, ]**F) None. Update D from dict/iterable E and F.
If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]
- values() an object providing a view on D's values
class: Feature
- class Feature(**kwargs)[source]
Represents a GeoJSON
Featureas a Python object, inheriting fromgeojson.Featurewith additional methods to conform to theHighchartsMetastandard interface.Class Inheritance
digraph inheritance81a58794db { bgcolor=transparent; rankdir=TB; size="8.0, 12.0"; "base.GeoJSON" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="A class representing a GeoJSON object."]; "feature.Feature" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="Represents a WGS84 GIS feature."]; "base.GeoJSON" -> "feature.Feature" [arrowsize=0.5,style="setlinewidth(0.5)"]; "metaclasses.HighchartsMeta" [URL="../internals.html#highcharts_maps.metaclasses.HighchartsMeta",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Metaclass that is used to define the standard interface exposed for serializable"]; "utility_classes.geojson.Feature" [URL="#highcharts_maps.utility_classes.geojson.Feature",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Represents a GeoJSON ``Feature`` as a Python object, inheriting from"]; "utility_classes.geojson.GeoJSONBase" -> "utility_classes.geojson.Feature" [arrowsize=0.5,style="setlinewidth(0.5)"]; "feature.Feature" -> "utility_classes.geojson.Feature" [arrowsize=0.5,style="setlinewidth(0.5)"]; "utility_classes.geojson.GeoJSONBase" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="Base class used to implement standard methods that can be mixed-in to the"]; "metaclasses.HighchartsMeta" -> "utility_classes.geojson.GeoJSONBase" [arrowsize=0.5,style="setlinewidth(0.5)"]; }- check_list_errors(checkFunc, lst)
Validation helper function.
- clear() None. Remove all items from D.
- copy(other=None, overwrite=True, **kwargs)
Copy the configuration settings from this instance to the
otherinstance.- Parameters:
other (
GeoJSONBase) – The target instance to which the properties of this instance should be copied. IfNone, will create a new instance and populate it with properties copied fromself. Defaults toNone.overwrite (
bool) – ifTrue, properties inotherthat are already set will be overwritten by their counterparts inself. Defaults toTrue.kwargs – Additional keyword arguments. Some special descendents of
HighchartsMetamay have special implementations of this method which rely on additional keyword arguments.
- Returns:
A mutated version of
otherwith new property values
- classmethod from_dict(as_dict: dict, allow_snake_case: bool = True)
Construct an instance of the class from a
dictobject.
- classmethod from_js_literal(as_str_or_file, allow_snake_case: bool = True, _break_loop_on_failure: bool = False)
Return a Python object representation of a Highcharts JavaScript object literal.
- Parameters:
as_str_or_file (
str) – The JavaScript object literal, represented either as astror as a filename which contains the JS object literal.allow_snake_case (
bool) – IfTrue, interpretssnake_casekeys as equivalent tocamelCasekeys. Defaults toTrue._break_loop_on_failure (
bool) – IfTrue, will break any looping operations in the event of a failure. Otherwise, will attempt to repair the failure. Defaults toFalse.
- Returns:
A Python object representation of the Highcharts JavaScript object literal.
- Return type:
HighchartsMeta
- classmethod from_json(as_json_or_file: str | bytes, allow_snake_case: bool = True)
Construct an instance of the class from a JSON string.
- Parameters:
as_json_or_file – The JSON string for the object or the filename of a file that contains the JSON string.
allow_snake_case (
bool) – IfTrue, interpretssnake_casekeys as equivalent tocamelCasekeys. Defaults toTrue.
- Returns:
A Python objcet representation of
as_json.- Return type:
HighchartsMeta
- fromkeys(value=None, /)
Create a new dictionary with keys from iterable and values set to value.
- get(key, default=None, /)
Return the value for key if key is in the dictionary, else default.
- items() a set-like object providing a view on D's items
- keys() a set-like object providing a view on D's keys
- pop(k[, d]) v, remove specified key and return the corresponding value.
If the key is not found, return the default if given; otherwise, raise a KeyError.
- popitem()
Remove and return a (key, value) pair as a 2-tuple.
Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty.
- setdefault(key, default=None, /)
Insert key with a value of default if key is not in the dictionary.
Return the value for key if key is in the dictionary, else default.
- to_dict() dict
Generate a
dictrepresentation of the object compatible with the Highcharts JavaScript library.Note
The
dictrepresentation has a property structure and naming convention that is intentionally consistent with the Highcharts JavaScript library. This is not Pythonic, but it makes managing the interplay between the two languages much, much simpler.
- classmethod to_instance(ob, default=None, strict=False)
Encode a GeoJSON
dictinto anGeoJSONBaseobject.Note
Assumes the caller knows that the
dictshould satisfy a GeoJSON type.- Parameters:
cls (
dict) –dictcontaining the elements to be encoded into a GeoJSON object.ob (
geojson.base.GeoJSON) – GeoJSON object into which to encode thedictprovided incls.default (
geojson.base.GeoJSON) – A default instance to append the content of thedict. Defaults toNone.strict (
bool) – Raise error if unable to coerce particular keys or attributes to a valid GeoJSON structure. Defaults toFalse.
- Returns:
A GeoJSON object with the dict’s elements as its constituents.
- Return type:
geojson.base.GeoJSON- Raises:
TypeError – If the input
dictcontains items that are not valid GeoJSON types.UnicodeEncodeError – If the input
dictcontains items of a type that contain non-ASCII characters.AttributeError – If the input
dictcontains items that are not valid GeoJSON types.
- to_js_literal(filename=None, encoding='utf-8') str | None
Return the object represented as a
strcontaining the JavaScript object literal.
- to_json(filename=None, encoding='utf-8')
Generate a JSON string/byte string representation of the object compatible with the Highcharts JavaScript library.
Note
This method will either return a standard
stror abytesobject depending on the JSON serialization library you are using. For example, if your environment has orjson, the result will be abytesrepresentation of the string.- Parameters:
- Returns:
A JSON representation of the object compatible with the Highcharts library.
- Return type:
- static trim_dict(untrimmed: dict, to_json: bool = False) dict
Remove keys from
untrimmedwhose values areNoneand convert values that have.to_dict()methods.
- static trim_iterable(untrimmed, to_json=False)
Convert any
EnforcedNullTypevalues inuntrimmedto'null'.
- update([E, ]**F) None. Update D from dict/iterable E and F.
If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]
- values() an object providing a view on D's values
class: FeatureCollection
- class FeatureCollection(**kwargs)[source]
Represents a GeoJSON
FeatureCollectionas a Python object, inheriting fromgeojson.FeatureCollectionwith additional methods to conform to theHighchartsMetastandard interface.Class Inheritance
digraph inheritancee2dd834534 { bgcolor=transparent; rankdir=TB; size="8.0, 12.0"; "base.GeoJSON" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="A class representing a GeoJSON object."]; "feature.FeatureCollection" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="Represents a FeatureCollection, a set of multiple Feature objects."]; "base.GeoJSON" -> "feature.FeatureCollection" [arrowsize=0.5,style="setlinewidth(0.5)"]; "metaclasses.HighchartsMeta" [URL="../internals.html#highcharts_maps.metaclasses.HighchartsMeta",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Metaclass that is used to define the standard interface exposed for serializable"]; "utility_classes.geojson.FeatureCollection" [URL="#highcharts_maps.utility_classes.geojson.FeatureCollection",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Represents a GeoJSON ``FeatureCollection`` as a Python object, inheriting from"]; "utility_classes.geojson.GeoJSONBase" -> "utility_classes.geojson.FeatureCollection" [arrowsize=0.5,style="setlinewidth(0.5)"]; "feature.FeatureCollection" -> "utility_classes.geojson.FeatureCollection" [arrowsize=0.5,style="setlinewidth(0.5)"]; "utility_classes.geojson.GeoJSONBase" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="Base class used to implement standard methods that can be mixed-in to the"]; "metaclasses.HighchartsMeta" -> "utility_classes.geojson.GeoJSONBase" [arrowsize=0.5,style="setlinewidth(0.5)"]; }- check_list_errors(checkFunc, lst)
Validation helper function.
- clear() None. Remove all items from D.
- copy(other=None, overwrite=True, **kwargs)
Copy the configuration settings from this instance to the
otherinstance.- Parameters:
other (
GeoJSONBase) – The target instance to which the properties of this instance should be copied. IfNone, will create a new instance and populate it with properties copied fromself. Defaults toNone.overwrite (
bool) – ifTrue, properties inotherthat are already set will be overwritten by their counterparts inself. Defaults toTrue.kwargs – Additional keyword arguments. Some special descendents of
HighchartsMetamay have special implementations of this method which rely on additional keyword arguments.
- Returns:
A mutated version of
otherwith new property values
- classmethod from_dict(as_dict: dict, allow_snake_case: bool = True)
Construct an instance of the class from a
dictobject.
- classmethod from_js_literal(as_str_or_file, allow_snake_case: bool = True, _break_loop_on_failure: bool = False)
Return a Python object representation of a Highcharts JavaScript object literal.
- Parameters:
as_str_or_file (
str) – The JavaScript object literal, represented either as astror as a filename which contains the JS object literal.allow_snake_case (
bool) – IfTrue, interpretssnake_casekeys as equivalent tocamelCasekeys. Defaults toTrue._break_loop_on_failure (
bool) – IfTrue, will break any looping operations in the event of a failure. Otherwise, will attempt to repair the failure. Defaults toFalse.
- Returns:
A Python object representation of the Highcharts JavaScript object literal.
- Return type:
HighchartsMeta
- classmethod from_json(as_json_or_file: str | bytes, allow_snake_case: bool = True)
Construct an instance of the class from a JSON string.
- Parameters:
as_json_or_file – The JSON string for the object or the filename of a file that contains the JSON string.
allow_snake_case (
bool) – IfTrue, interpretssnake_casekeys as equivalent tocamelCasekeys. Defaults toTrue.
- Returns:
A Python objcet representation of
as_json.- Return type:
HighchartsMeta
- fromkeys(value=None, /)
Create a new dictionary with keys from iterable and values set to value.
- get(key, default=None, /)
Return the value for key if key is in the dictionary, else default.
- items() a set-like object providing a view on D's items
- keys() a set-like object providing a view on D's keys
- pop(k[, d]) v, remove specified key and return the corresponding value.
If the key is not found, return the default if given; otherwise, raise a KeyError.
- popitem()
Remove and return a (key, value) pair as a 2-tuple.
Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty.
- setdefault(key, default=None, /)
Insert key with a value of default if key is not in the dictionary.
Return the value for key if key is in the dictionary, else default.
- to_dict() dict
Generate a
dictrepresentation of the object compatible with the Highcharts JavaScript library.Note
The
dictrepresentation has a property structure and naming convention that is intentionally consistent with the Highcharts JavaScript library. This is not Pythonic, but it makes managing the interplay between the two languages much, much simpler.
- classmethod to_instance(ob, default=None, strict=False)
Encode a GeoJSON
dictinto anGeoJSONBaseobject.Note
Assumes the caller knows that the
dictshould satisfy a GeoJSON type.- Parameters:
cls (
dict) –dictcontaining the elements to be encoded into a GeoJSON object.ob (
geojson.base.GeoJSON) – GeoJSON object into which to encode thedictprovided incls.default (
geojson.base.GeoJSON) – A default instance to append the content of thedict. Defaults toNone.strict (
bool) – Raise error if unable to coerce particular keys or attributes to a valid GeoJSON structure. Defaults toFalse.
- Returns:
A GeoJSON object with the dict’s elements as its constituents.
- Return type:
geojson.base.GeoJSON- Raises:
TypeError – If the input
dictcontains items that are not valid GeoJSON types.UnicodeEncodeError – If the input
dictcontains items of a type that contain non-ASCII characters.AttributeError – If the input
dictcontains items that are not valid GeoJSON types.
- to_js_literal(filename=None, encoding='utf-8') str | None
Return the object represented as a
strcontaining the JavaScript object literal.
- to_json(filename=None, encoding='utf-8')
Generate a JSON string/byte string representation of the object compatible with the Highcharts JavaScript library.
Note
This method will either return a standard
stror abytesobject depending on the JSON serialization library you are using. For example, if your environment has orjson, the result will be abytesrepresentation of the string.- Parameters:
- Returns:
A JSON representation of the object compatible with the Highcharts library.
- Return type:
- static trim_dict(untrimmed: dict, to_json: bool = False) dict
Remove keys from
untrimmedwhose values areNoneand convert values that have.to_dict()methods.
- static trim_iterable(untrimmed, to_json=False)
Convert any
EnforcedNullTypevalues inuntrimmedto'null'.
- update([E, ]**F) None. Update D from dict/iterable E and F.
If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]
- values() an object providing a view on D's values