Locations¶
-
class
police_api.crime.
Location
(api, data={})¶ An anonymised location, to which crimes are “snapped”.
Parameters: - api (PoliceAPI) – The instance of
PoliceAPI
to 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
Force
orBTP
, indicating whether the location belongs to a police force or a railway station).
-
is_btp
()¶ Return type: bool Returns: True
if this location’s type isBTP
, andFalse
otherwise.
- api (PoliceAPI) – The instance of