# Geo Service

> Canadian-hosted geocoding, autocomplete, and routing API. Strict zero request logging. Drop-in compatible with OpenStreetMap Nominatim, Photon, and OSRM v1 protocols.

## Core Architecture & Privacy
- **Hosting Location**: OVHcloud Beauharnois, Quebec, Canada (BHS datacenter facility). All data processing remains 100% within Canada.
- **Privacy Standard**: Strict zero-log architecture. Queries, addresses, latitude/longitude coordinates, and API keys are never written to disk, application logs, caches, or permanent database tables.
- **Data Residency**: Complies with Canadian federal PIPEDA, Ontario PHIPA, and Quebec Law 25 (Loi 25) without international cross-border data transfer.
- **Data Sources**: OpenStreetMap contributors (ODbL) enriched with Statistics Canada's Open Database of Addresses (ODA) and municipal open data licences.

## Protocol Compatibility
Geo Service provides drop-in compatibility with three open geospatial standards:

1. **Nominatim JSONv2**:
   - `GET /search`: Forward geocoding. Accepts `q`, `street`, `city`, `postalcode`, `countrycodes=ca`, `format=jsonv2`, `addressdetails=1`, `limit`.
   - `GET /reverse`: Reverse geocoding. Accepts `lat`, `lon`, `format=jsonv2`, `addressdetails=1`.

2. **Photon**:
   - `GET /api`: Fast, typo-tolerant typeahead search and address suggestions. Accepts `q`, `limit`, `lat`, `lon`, `bbox`.
   - `GET /reverse`: Reverse geocoding. Accepts `lat`, `lon`.

3. **OSRM v1 (Open Source Routing Machine)**:
   - `GET /route/v1/driving/{coordinates}`: Point-to-point and multi-stop turn-by-turn driving routing. Accepts `overview`, `steps`, `annotations`.
   - `GET /table/v1/driving/{coordinates}`: Fast travel-time duration and distance matrices between multiple coordinates.

## Authentication
- **Server Keys**: Passed via standard HTTP header: `Authorization: Bearer <SERVER_KEY>`. For server-to-server geocoding and routing.
- **Browser Keys**: Passed via `X-Api-Key: <BROWSER_KEY>`. Restricted strictly to allowed web domains (origins) for client-side search autocomplete.

## Key URLs
- Home: https://geo.jerielbenavides.com
- Version Française: https://geo.jerielbenavides.com/fr
- API Documentation: https://geo.jerielbenavides.com/docs
- Developer Guides & Blog: https://geo.jerielbenavides.com/blog
- Canadian Reverse Geocoding: https://geo.jerielbenavides.com/guides/canada-reverse-geocoding
- MapLibre GL JS Tutorial: https://geo.jerielbenavides.com/guides/maplibre-nextjs-canada
- Google Maps Migration Cheat Sheet: https://geo.jerielbenavides.com/guides/migrating-from-google-maps
- Canadian Postal Code Geocoding: https://geo.jerielbenavides.com/guides/canada-postal-code-geocoding
- Distance Matrix API Guide: https://geo.jerielbenavides.com/guides/canada-distance-matrix-osrm
- Leaflet Autocomplete Tutorial: https://geo.jerielbenavides.com/guides/leaflet-address-autocomplete
- Python Batch CSV Geocoding: https://geo.jerielbenavides.com/guides/python-batch-geocoding-csv
- Laravel OSRM Routing Guide: https://geo.jerielbenavides.com/guides/laravel-routing-osrm
- Google Maps vs. CAD Cost Calculator: https://geo.jerielbenavides.com/tools/google-maps-cost-calculator
- Quebec Law 25 Compliance: https://geo.jerielbenavides.com/compliance/loi-25-quebec
- RSS Feed: https://geo.jerielbenavides.com/feed.xml
- Sitemap: https://geo.jerielbenavides.com/sitemap.xml
- Full Documentation for LLMs: https://geo.jerielbenavides.com/llms-full.txt

