Calculate the distance of the center of this zipcode from a coordinator. :param lat: latitude. :param lng: longitude. :param miles: if False, the value is in `kilometers`.
(self, lat, lng, miles=True)
| 142 | return hash(self.zipcode) |
| 143 | |
| 144 | def dist_from(self, lat, lng, miles=True): |
| 145 | """ |
| 146 | Calculate the distance of the center of this zipcode from a coordinator. |
| 147 | |
| 148 | :param lat: latitude. |
| 149 | :param lng: longitude. |
| 150 | :param miles: if False, the value is in `kilometers`. |
| 151 | """ |
| 152 | return great_circle((self.lat, self.lng), (lat, lng), miles=miles) |
| 153 | |
| 154 | def to_json(self, include_null=True): # pragma: no cover |
| 155 | """ |