Overview
Destinations (POIs) are the core entities of Tesis Rutas. Each destination represents a heritage site or tourist point of interest with rich metadata, geographic coordinates, and multimedia assets.Each destination can store up to 10 multimedia files (images or videos) via Cloudinary integration.
Data Model
TheDestino entity is defined in src/domain/entities/destino.py with the following structure:
Required Fields
Field Descriptions
| Field | Type | Required | Description |
|---|---|---|---|
nombre | str | Yes | Name of the heritage site |
ubicacion | str | Yes | Location description |
importancia | str | Yes | Historical/cultural importance |
coordenadas | Coordenadas | Yes | GPS coordinates (validated) |
anio_construccion | list[int] | Yes | 1-2 values: [year] or [start_year, end_year] |
arquitecto | str | No | Name of the architect |
area_construccion | float | No | Construction area in m² |
funcion | str | No | Original function/purpose |
multimedia | list[dict] | No | Array of multimedia objects (max 10) |
activo | bool | Yes | Active status (default: true) |
Validation Rules
Validation Rules
- Coordinates: Automatically validated by the
Coordenadasvalue object- Latitude: -90° to 90°
- Longitude: -180° to 180°
- Construction Year: Must contain exactly 1 or 2 integers
- Multimedia: Maximum 10 files per destination
- Strings:
nombre,ubicacion,importanciaare automatically stripped of whitespace
API Endpoints
All destination endpoints are defined insrc/infrastructure/api/routers/destinos_router.py:
Update Destination
PUT
/destinos/{id}Requires: Admin roleUpdates any editable field while preserving existing data.Toggle Active Status
PUT
/destinos/estado/{id}Requires: Editor roleSoft delete/restore functionality - toggles the activo boolean.Creating Destinations
TheAgregarDestinoUseCase (src/application/use_cases/agregar_destino.py) handles destination creation:
Use Case Implementation
Database Storage
Destinations are stored in MongoDB with the following structure:MongoDB Document
Best Practices
Coordinate Precision
Use at least 6 decimal places for accurate GPS positioning (±11 cm accuracy)
Construction Years
Use single value
[1850] for completed structures, two values [1850, 1865] for construction periodsSoft Deletion
Always use
activo flag for deletion to preserve historical data and route referencesMultimedia Limits
Plan multimedia usage carefully - 10 file limit per destination enforced at API level
Related Features
- Multimedia Management - Upload and manage destination media
- Tourist Routes - Include destinations in routes
- Route Generation - AI-powered route creation from destinations