class IncidentNearbyView(APIView):
        def get(self, request):
            try:
                user_lat = float(request.GET.get("lat"))
                user_lng = float(request.GET.get("lng"))
                user_point = Point(user_lng, user_lat, srid=4326)
                user_info = request.user_info

                # Get user object
                user = get_user_model().objects\
                    .get(_id=user_info.get('_id'))

                # Find the nearby incident within alert_radius provided by
                # user, fetch only ACTIVE, PENDING, FIXING status objects
                nearby_incidents_qs = Incident.objects.filter(
                    coordinates__distance_lte=(
                        user_point, D(km=user.alert_radius)),
                    is_active=True,
                    status__in=['ACTIVE', 'PENDING', 'FIXING']
                ).annotate(
                    distance=Distance('coordinates', user_point)
                ).order_by('distance')

                # Format to JSON and create array of nearby incidents
                nearby_incidents = []
                for incident in nearby_incidents_qs:
                    nearby_incidents.append(format_incident_data(incident))

                return JsonResponse({
                    "message": Messages.SUCCESS,
                    "data": nearby_incidents,
                    "error": False,
                    "status": HTTPStatus.OK,
                }, status=HTTPStatus.OK)

            # General exception
            except Exception as e:
                print(e)

                return JsonResponse({
                    "message": Messages.ERROR,
                    "data": None,
                    "error": True,
                    "status": HTTPStatus.INTERNAL_SERVER_ERROR,
                }, status=HTTPStatus.OK)
