Locations¶
-
class
police_api.crime.Location(api, data={})¶ An anonymised location, to which crimes are “snapped”.
Parameters: - api (PoliceAPI) – The instance of
PoliceAPIto use. - data (dict) – The attributes that will be copied to this instance.
-
id¶ Type: int This location’s unique ID.
-
name¶ Type: str The name of this location (e.g.
On or near Petrol Station)
-
latitude¶ Type: str This location’s latitude.
-
longitude¶ Type: str This location’s longitude.
-
type¶ Type: str This location’s type (either
ForceorBTP, indicating whether the location belongs to a police force or a railway station).
-
is_btp()¶ Return type: bool Returns: Trueif this location’s type isBTP, andFalseotherwise.
- api (PoliceAPI) – The instance of