Overview
The Land Accounting module tracks changes in land use at the Level 4 management unit level, calculating the patrimonial (asset value) impact of these transitions. This is critical for:- Financial accounting and reporting
- Sustainable land management monitoring
- Compliance with forestry regulations
- Investment decision support
Land patrimonial variations are automatically generated from geospatial operations (split/merge) or can be tracked through land use changes over time.
Key Capabilities
Land Use Tracking
Monitor transitions between forest, agricultural, and other land uses
Patrimonial Valuation
Calculate financial impact of land use changes on asset value
Status Workflow
Pending → Processed → Annulled status management
Geospatial Integration
Automatically generate variations from geometry operations
Data Model
Land Patrimonial Variation
prisma/schema.prisma
Variation Status
prisma/schema.prisma
Variation Kind
prisma/schema.prisma
patrimonialDeltaUsd > 0→ INCREMENTOpatrimonialDeltaUsd < 0→ DECREMENTOpatrimonialDeltaUsd = 0→ SIN_CAMBIO
How Variations are Created
Land patrimonial variations are generated through two primary mechanisms:1. Geospatial Operations
When Level 4 geometries are split or merged via the Geospatial Import module:prisma/schema.prisma
- User uploads new Shapefile with modified Level 4 boundaries
- System detects geometry changes (split/merge)
- Creates
GeoLandVariationJobfor background processing - Job generates
LandPatrimonialVariationrecords with statusPENDIENTE - User reviews and processes variations
2. Manual Land Use Updates
Currently, the API endpoint
/api/forest/land-accounting/variations returns 405 (Method Not Allowed) for POST requests, indicating variations are primarily generated through geospatial operations rather than manual creation.src/app/api/forest/land-accounting/variations/route.ts
Querying Variations
API Endpoint
GET/api/forest/land-accounting/variations
Query Parameters:
src/validations/land-accounting.schema.ts
Filtering Logic
The system only returns actual land use changes:src/app/api/forest/land-accounting/variations/route.ts
- Records where land use didn’t actually change
- Empty or invalid land use names
- Variations created for geometric changes only (without land use impact)
Processing Variations
User Workflow
Verify Data
Check:
- Land use change is accurate
- Affected area matches geometry
- Valuations are reasonable
- Notes explain the change
Process or Annul
Choose action:
- Process: Approve the variation (updates Level 4 land use)
- Annul: Reject/cancel the variation
API Endpoint
PATCH/api/forest/land-accounting/variations/[id]
src/validations/land-accounting.schema.ts
- Status changes from
PENDIENTEtoPROCESADA processedAttimestamp setprocessedByIdrecords the user who processed it- Level 4 unit’s
currentLandUseNameupdated tonewLandUseName - Level 4 unit’s
landUseChangeDateupdated tovariationDate - Audit log entry created
- Status changes to
ANULADA - No changes to Level 4 unit
- Variation preserved for audit trail
Valuation Calculations
Reference Values
- Reference Value Before (
referenceValueBeforeUsd): Value per hectare of previous land use - Reference Value After (
referenceValueAfterUsd): Value per hectare of new land use
Total Values
Patrimonial Delta
| Scenario | Before ($/ha) | After ($/ha) | Area (ha) | Delta ($) | Kind |
|---|---|---|---|---|---|
| Forest → Plantation | 1,200 | 3,500 | 45.5 | +104,650 | INCREMENTO |
| Plantation → Harvested | 3,500 | 500 | 30.0 | -90,000 | DECREMENTO |
| Pasture → Agroforestry | 800 | 800 | 20.0 | 0 | SIN_CAMBIO |
Valuation is typically set during geospatial import based on organization-specific land use type catalogs. Future enhancements may support automatic valuation from market data.
Land Use Types
Organizations maintain catalogs of land use types with associated values:prisma/schema.prisma
- BOSQUE: Natural forest, managed forest
- PLANTACION: Commercial plantations
- AGRICOLA: Cropland, pasture
- AGROFORESTAL: Agroforestry systems
- OTRO_USO: Infrastructure, water bodies, conservation
Geospatial Integration
Split Operation
When one Level 4 unit is divided into multiple units:Merge Operation
When multiple Level 4 units are combined:Background Processing
Geospatial variation jobs run asynchronously:prisma/schema.prisma
- Job created with status
PENDING - Background worker picks up job
- Status changes to
PROCESSING - Variations generated and Level 4 units updated
- Status changes to
COMPLETED(orFAILEDon error) - Errors logged in
lastErrorfield for troubleshooting
Organization Scoping
All variations are automatically scoped to the user’s organization:src/app/api/forest/land-accounting/variations/route.ts
Reporting & Analytics
Key Metrics
- Total Patrimonial Impact: Sum of all
patrimonialDeltaUsdfor processed variations - Area Transitioned: Total
affectedAreaHaby land use type - Pending Approval Count: Variations with status
PENDIENTE - Land Use Distribution: Current breakdown across organization
Date Range Analysis
- Quarterly reports for board meetings
- Annual reports for regulatory compliance
- Multi-year trends for strategic planning
Export for Accounting
Variations can be exported to:- CSV/Excel for financial systems
- GIS formats for spatial analysis
- PDF reports for stakeholder communication
Audit Trail
All variation operations are logged:Best Practices
Valuation Standards
Valuation Standards
- Use consistent valuation methods across the organization
- Document valuation sources and dates
- Review and update reference values annually
- Consider market conditions and regional differences
Approval Workflow
Approval Workflow
- Require manager approval for variations > threshold
- Process pending variations monthly
- Document reasons for annulments
- Regular audits of processed variations
Data Quality
Data Quality
- Verify areas match geospatial data
- Validate land use names against catalog
- Check for duplicate variations
- Ensure variation dates are chronological
Integration
Integration
- Sync with financial accounting systems
- Export for regulatory reports
- Link to management plans
- Archive historical data
Related Documentation
- Forest Patrimony - Understanding Level 4 management units
- Geospatial Import - How variations are generated from geometry changes
- Land Use Configuration - Land use types and configuration