Description: The search_nearby_locations function in the LocationService currently returns an empty list. This issue is to implement the spatial query to find locations within a given radius.
Tasks:
Use a spatial database extension like PostGIS for efficient spatial queries.
Implement the logic in the LocationRepository to perform a distance-based search using the provided latitude, longitude, and radius.
Update the LocationService to use the new repository method.
Relevant Files:
src/climate_risk/application/services/location_service.py
src/climate_risk/infrastructure/repositories/location_repository.py
src/climate_risk/infrastructure/database/models.py
Description: The search_nearby_locations function in the LocationService currently returns an empty list. This issue is to implement the spatial query to find locations within a given radius.
Tasks:
Use a spatial database extension like PostGIS for efficient spatial queries.
Implement the logic in the LocationRepository to perform a distance-based search using the provided latitude, longitude, and radius.
Update the LocationService to use the new repository method.
Relevant Files:
src/climate_risk/application/services/location_service.py
src/climate_risk/infrastructure/repositories/location_repository.py
src/climate_risk/infrastructure/database/models.py