Merge branch 'feature/travel-cost-calculator' into main
This commit is contained in:
@@ -8,3 +8,4 @@ SMTP_PASS="aL8@Rx8xqFrNij$a"
|
||||
APP_URL="https://app.em2events.fr"
|
||||
|
||||
GEMINI_API_KEY="AIzaSyB0hOvBjWeWjdrxVARzfErZ_uGuArlvmQc"
|
||||
API_MAPS="AIzaSyDt2d-T9YRmHO3-QEq1uWomdqVbJqXfO04"
|
||||
|
||||
@@ -597,3 +597,117 @@ exports.onEventReturnCompleted = onDocumentUpdated({
|
||||
logger.error(`[onEventReturnCompleted] Error resetting equipment statuses for event ${eventId}:`, error);
|
||||
}
|
||||
});
|
||||
|
||||
// ============================================================================
|
||||
// SEARCH - Recherche unifiée avec autocomplétion
|
||||
// ============================================================================
|
||||
|
||||
/**
|
||||
* Recherche rapide d'équipements et containers pour l'autocomplétion
|
||||
* Retourne un nombre limité de résultats pour des performances optimales
|
||||
*/
|
||||
exports.quickSearch = onRequest(httpOptions, withCors(async (req, res) => {
|
||||
try {
|
||||
const decodedToken = await auth.authenticateUser(req);
|
||||
|
||||
// Vérifier les permissions
|
||||
const canView = await auth.hasPermission(decodedToken.uid, 'view_equipment');
|
||||
|
||||
if (!canView) {
|
||||
res.status(403).json({ error: 'Forbidden: Requires view_equipment permission' });
|
||||
return;
|
||||
}
|
||||
|
||||
const params = req.method === 'GET' ? req.query : (req.body?.data || {});
|
||||
const searchQuery = params.query?.toLowerCase() || '';
|
||||
const limit = Math.min(parseInt(params.limit) || 10, 50);
|
||||
const includeEquipments = params.includeEquipments !== 'false';
|
||||
const includeContainers = params.includeContainers !== 'false';
|
||||
|
||||
if (!searchQuery || searchQuery.length < 2) {
|
||||
res.status(200).json({ results: [] });
|
||||
return;
|
||||
}
|
||||
|
||||
const results = [];
|
||||
|
||||
// Rechercher dans les équipements
|
||||
if (includeEquipments) {
|
||||
const equipmentSnapshot = await db.collection('equipments')
|
||||
.orderBy('id')
|
||||
.limit(limit * 2) // Récupérer plus pour filtrer ensuite
|
||||
.get();
|
||||
|
||||
equipmentSnapshot.docs.forEach(doc => {
|
||||
const data = doc.data();
|
||||
const searchableText = [
|
||||
data.name || '',
|
||||
doc.id || '',
|
||||
data.model || '',
|
||||
data.brand || ''
|
||||
].join(' ').toLowerCase();
|
||||
|
||||
if (searchableText.includes(searchQuery)) {
|
||||
results.push({
|
||||
type: 'equipment',
|
||||
id: doc.id,
|
||||
name: data.name,
|
||||
category: data.category,
|
||||
model: data.model,
|
||||
brand: data.brand
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Rechercher dans les containers
|
||||
if (includeContainers) {
|
||||
const containerSnapshot = await db.collection('containers')
|
||||
.orderBy('id')
|
||||
.limit(limit * 2)
|
||||
.get();
|
||||
|
||||
containerSnapshot.docs.forEach(doc => {
|
||||
const data = doc.data();
|
||||
const searchableText = [
|
||||
data.name || '',
|
||||
doc.id || ''
|
||||
].join(' ').toLowerCase();
|
||||
|
||||
if (searchableText.includes(searchQuery)) {
|
||||
results.push({
|
||||
type: 'container',
|
||||
id: doc.id,
|
||||
name: data.name,
|
||||
containerType: data.type
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Limiter et trier les résultats
|
||||
const limitedResults = results
|
||||
.sort((a, b) => {
|
||||
// Prioriser les correspondances exactes au début
|
||||
const aStarts = a.id.toLowerCase().startsWith(searchQuery);
|
||||
const bStarts = b.id.toLowerCase().startsWith(searchQuery);
|
||||
if (aStarts && !bStarts) return -1;
|
||||
if (!aStarts && bStarts) return 1;
|
||||
return 0;
|
||||
})
|
||||
.slice(0, limit);
|
||||
|
||||
res.status(200).json({ results: limitedResults });
|
||||
|
||||
} catch (error) {
|
||||
logger.error("Error in quick search:", error);
|
||||
res.status(500).json({ error: error.message });
|
||||
}
|
||||
}));
|
||||
|
||||
// ============================================================================
|
||||
// GOOGLE MAPS & TRAVEL (Proxies CORS + Calcul d'itinéraires)
|
||||
// ============================================================================
|
||||
const travel = require('./src/travel');
|
||||
exports.googleMapsAutocomplete = onRequest(httpOptions, withCors(travel.googleMapsAutocomplete));
|
||||
exports.googleMapsComputeRoute = onRequest(httpOptions, withCors(travel.googleMapsComputeRoute));
|
||||
|
||||
@@ -17,7 +17,9 @@
|
||||
"@google-cloud/storage": "^7.18.0",
|
||||
"@google-cloud/text-to-speech": "^5.4.0",
|
||||
"@google/generative-ai": "^0.21.0",
|
||||
"@mapbox/polyline": "^1.2.1",
|
||||
"axios": "^1.13.2",
|
||||
"csv-parser": "^3.2.1",
|
||||
"dotenv": "^17.2.3",
|
||||
"envdot": "^0.0.3",
|
||||
"firebase-admin": "^12.6.0",
|
||||
|
||||
@@ -0,0 +1,375 @@
|
||||
'use strict';
|
||||
|
||||
const axios = require('axios');
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const csv = require('csv-parser');
|
||||
const polylineLib = require('@mapbox/polyline');
|
||||
const auth = require('../utils/auth');
|
||||
const logger = require('firebase-functions/logger');
|
||||
|
||||
// ─────────────────────────────────────────────
|
||||
// Chargement du CSV des gares de péage (cache mémoire)
|
||||
// ─────────────────────────────────────────────
|
||||
let _tollStations = null;
|
||||
|
||||
function loadTollStations() {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (_tollStations) return resolve(_tollStations);
|
||||
const csvPath = path.join(__dirname, '../travel/gares_peage_export.csv');
|
||||
if (!fs.existsSync(csvPath)) {
|
||||
logger.warn('[Travel] CSV not found at ' + csvPath);
|
||||
_tollStations = [];
|
||||
return resolve(_tollStations);
|
||||
}
|
||||
const results = [];
|
||||
fs.createReadStream(csvPath)
|
||||
.pipe(csv())
|
||||
.on('data', (row) => {
|
||||
if (row.id_gare && row.lat && row.lon) {
|
||||
results.push({
|
||||
id: row.id_gare,
|
||||
operatorId: row.id_gare.substring(0, 2),
|
||||
tollId: row.id_gare.substring(2, 5),
|
||||
name: row.nom || '',
|
||||
lat: parseFloat(row.lat),
|
||||
lon: parseFloat(row.lon),
|
||||
});
|
||||
}
|
||||
})
|
||||
.on('end', () => { _tollStations = results; resolve(results); })
|
||||
.on('error', reject);
|
||||
});
|
||||
}
|
||||
|
||||
// ─────────────────────────────────────────────
|
||||
// Ulys — Détection des péages sur un tracé
|
||||
// POST https://api-ulys.azure-api.net/placemark/v2/legs?precision=6&includeLayersIds=GaresPeage
|
||||
// Body = la polyline encodée (string brute, pas de JSON wrapper)
|
||||
// ─────────────────────────────────────────────
|
||||
async function getUlysTollLegs(encodedPolyline) {
|
||||
try {
|
||||
const polylineCoords = polylineLib.decode(encodedPolyline);
|
||||
const ulysUrl = 'https://api-ulys.azure-api.net/placemark/v2/legs?precision=5&includeLayersIds=GaresPeage';
|
||||
let finalPolyline = encodedPolyline;
|
||||
|
||||
// OPTION 1 : Mapbox Route Recreation
|
||||
if (process.env.MAPBOX_API_KEY && polylineCoords.length > 2) {
|
||||
logger.info('[Travel] MAPBOX_API_KEY is present. Recreating route with Mapbox for Ulys precision...');
|
||||
try {
|
||||
// Envoyer uniquement le point de départ et le point d'arrivée
|
||||
// Mapbox s'occupe de recréer l'itinéraire complet de la meilleure façon
|
||||
const waypoints = [polylineCoords[0], polylineCoords[polylineCoords.length - 1]];
|
||||
|
||||
// Mapbox expects longitude,latitude
|
||||
const coordinatesString = waypoints.map(p => `${p[1]},${p[0]}`).join(';');
|
||||
const mapboxUrl = `https://api.mapbox.com/directions/v5/mapbox/driving/${coordinatesString}?geometries=polyline&overview=full&access_token=${process.env.MAPBOX_API_KEY}`;
|
||||
|
||||
const mapboxRes = await axios.get(mapboxUrl);
|
||||
if (mapboxRes.data && mapboxRes.data.routes && mapboxRes.data.routes.length > 0) {
|
||||
finalPolyline = mapboxRes.data.routes[0].geometry;
|
||||
logger.info('[Travel] Mapbox route recreation successful.');
|
||||
}
|
||||
} catch (mapboxErr) {
|
||||
logger.error('[Travel] Mapbox API error:', mapboxErr.response ? mapboxErr.response.data : mapboxErr.message);
|
||||
// Fallback to Google Maps polyline if Mapbox fails
|
||||
}
|
||||
}
|
||||
|
||||
// Appeler Ulys /legs
|
||||
const res = await axios.post(
|
||||
ulysUrl,
|
||||
JSON.stringify(finalPolyline),
|
||||
{
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'Host': 'api-ulys.azure-api.net'
|
||||
},
|
||||
timeout: 10000,
|
||||
}
|
||||
);
|
||||
return res.data;
|
||||
} catch (e) {
|
||||
logger.warn('[Travel] Ulys /legs failed:', e.message);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
// ─────────────────────────────────────────────
|
||||
// Ulys — Tarif pour un segment (entrée → sortie)
|
||||
// POST https://api-ulys.azure-api.net/tollstation/v1/rate
|
||||
// ─────────────────────────────────────────────
|
||||
async function getUlysRate(vehicleCategory, passages) {
|
||||
try {
|
||||
const now = new Date().toISOString();
|
||||
const payload = {
|
||||
vehicleCategory: String(vehicleCategory),
|
||||
paymentOption: 2,
|
||||
tollPassages: passages.map((p) => ({
|
||||
toll: { operatorId: p.operatorId, tollId: p.tollId },
|
||||
passageDate: now,
|
||||
})),
|
||||
};
|
||||
const body = JSON.stringify(payload);
|
||||
const res = await axios.post(
|
||||
'https://api-ulys.azure-api.net/tollstation/v1/rate',
|
||||
payload,
|
||||
{
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'Content-Length': Buffer.byteLength(body).toString(),
|
||||
'Host': 'api-ulys.azure-api.net',
|
||||
},
|
||||
timeout: 8000,
|
||||
},
|
||||
);
|
||||
const data = res.data;
|
||||
if (Array.isArray(data) && data.length > 0) {
|
||||
if (passages.length === 2) {
|
||||
// We expect a single closed system response
|
||||
if (data.length === 1 && data[0].entranceToll && data[0].exitToll && data[0].price > 0) {
|
||||
return data[0].price;
|
||||
}
|
||||
return null;
|
||||
} else if (passages.length === 1) {
|
||||
if (data.length === 1 && data[0].price > 0) {
|
||||
return data[0].price;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
} catch (e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
// ─────────────────────────────────────────────
|
||||
// Calcul du total de péage via Ulys /legs puis /rate
|
||||
// ─────────────────────────────────────────────
|
||||
async function calculateTollCost(encodedPolyline, vehicleCategory) {
|
||||
try {
|
||||
// 1. Demander à Ulys les gares sur le tracé
|
||||
const legsData = await getUlysTollLegs(encodedPolyline);
|
||||
const features = Array.isArray(legsData) ? legsData : (legsData && legsData.features ? legsData.features : []);
|
||||
|
||||
if (features && features.length > 0) {
|
||||
// Extraire les gares dans l'ordre du tracé
|
||||
const tollGates = [];
|
||||
for (const feature of features) {
|
||||
const props = feature.properties || feature.Placemark || feature.placemark || {};
|
||||
|
||||
// La réponse Ulys peut utiliser différents noms de champs
|
||||
// On cherche l'identifiant de la gare dans tous les champs connus
|
||||
let id =
|
||||
props.id_gare ||
|
||||
props.idGare ||
|
||||
props.id ||
|
||||
props.gareId ||
|
||||
props.gare_id ||
|
||||
props.tollStationId;
|
||||
|
||||
if (!id && props.Code) {
|
||||
id = props.Code.split('_')[0];
|
||||
}
|
||||
|
||||
if (!id) continue;
|
||||
const idStr = String(id);
|
||||
if (idStr.length < 5) continue;
|
||||
|
||||
tollGates.push({
|
||||
id: idStr,
|
||||
operatorId: idStr.substring(0, 2),
|
||||
tollId: idStr.substring(2, 5),
|
||||
name: props.nom || props.name || props.label || idStr,
|
||||
});
|
||||
}
|
||||
|
||||
logger.info(`[Travel] Ulys /legs found ${tollGates.length} toll gates`);
|
||||
if (tollGates.length === 0) return 0;
|
||||
|
||||
// Greedy: trouver les segments fermés + barrières ouvertes
|
||||
return await _computeTollFromGates(tollGates, vehicleCategory);
|
||||
}
|
||||
|
||||
// Fallback : pas de résultat Ulys /legs, retourner 0
|
||||
logger.info('[Travel] Ulys /legs returned no toll gates for this route');
|
||||
return 0;
|
||||
} catch (e) {
|
||||
logger.error('[Travel] calculateTollCost error:', e);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
async function _computeTollFromGates(gates, vehicleCategory) {
|
||||
let total = 0;
|
||||
let i = 0;
|
||||
while (i < gates.length) {
|
||||
let found = false;
|
||||
// Essayer le segment fermé le plus long possible (greedy backward)
|
||||
for (let j = gates.length - 1; j > i; j--) {
|
||||
const price = await getUlysRate(vehicleCategory, [gates[i], gates[j]]);
|
||||
if (price !== null && price > 0) {
|
||||
total += price;
|
||||
i = j;
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!found) {
|
||||
// Barrière ouverte : tarif unitaire
|
||||
const price = await getUlysRate(vehicleCategory, [gates[i]]);
|
||||
if (price !== null && price > 0 && price < 20) {
|
||||
total += price;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
}
|
||||
return total;
|
||||
}
|
||||
|
||||
// ─────────────────────────────────────────────
|
||||
// EXPORT: Google Maps Autocomplete (proxy CORS)
|
||||
// ─────────────────────────────────────────────
|
||||
exports.googleMapsAutocomplete = async (req, res) => {
|
||||
if (req.method === 'OPTIONS') {
|
||||
return res.status(204).send('');
|
||||
}
|
||||
try {
|
||||
await auth.authenticateUser(req);
|
||||
|
||||
const body = req.body.data || req.body;
|
||||
const query = body.query || req.query.query;
|
||||
if (!query) return res.status(400).json({ error: 'query is required' });
|
||||
|
||||
const apiKey = process.env.API_MAPS;
|
||||
if (!apiKey) return res.status(500).json({ error: 'API_MAPS not configured in .env' });
|
||||
|
||||
const url = new URL('https://maps.googleapis.com/maps/api/place/autocomplete/json');
|
||||
url.searchParams.set('input', query);
|
||||
url.searchParams.set('key', apiKey);
|
||||
url.searchParams.set('language', 'fr');
|
||||
url.searchParams.set('components', 'country:fr');
|
||||
url.searchParams.set('types', 'address');
|
||||
|
||||
const gRes = await axios.get(url.toString(), { timeout: 5000 });
|
||||
return res.status(200).json(gRes.data);
|
||||
} catch (e) {
|
||||
logger.error('[Travel] googleMapsAutocomplete error:', e.message);
|
||||
return res.status(500).json({ error: e.message });
|
||||
}
|
||||
};
|
||||
|
||||
// ─────────────────────────────────────────────
|
||||
// EXPORT: Google Maps Compute Route (2 itinéraires + péages Ulys)
|
||||
// ─────────────────────────────────────────────
|
||||
exports.googleMapsComputeRoute = async (req, res) => {
|
||||
if (req.method === 'OPTIONS') {
|
||||
return res.status(204).send('');
|
||||
}
|
||||
try {
|
||||
await auth.authenticateUser(req);
|
||||
|
||||
const body = req.body.data || req.body;
|
||||
const { origin, destination, vehicleTollCategory = 2 } = body;
|
||||
|
||||
if (!origin || !destination) {
|
||||
return res.status(400).json({ error: 'origin and destination are required' });
|
||||
}
|
||||
|
||||
const apiKey = process.env.API_MAPS;
|
||||
if (!apiKey) return res.status(500).json({ error: 'API_MAPS not configured in .env' });
|
||||
|
||||
const routesUrl = 'https://routes.googleapis.com/directions/v2:computeRoutes';
|
||||
const fieldMask = [
|
||||
'routes.distanceMeters',
|
||||
'routes.duration',
|
||||
'routes.polyline.encodedPolyline',
|
||||
'routes.travelAdvisory.tollInfo',
|
||||
].join(',');
|
||||
|
||||
const commonPayload = {
|
||||
travelMode: 'DRIVE',
|
||||
routingPreference: 'TRAFFIC_AWARE',
|
||||
origin: { address: origin },
|
||||
destination: { address: destination },
|
||||
};
|
||||
|
||||
const [resToll, resNoToll] = await Promise.all([
|
||||
axios.post(routesUrl, { ...commonPayload, routeModifiers: { avoidTolls: false } }, {
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'X-Goog-Api-Key': apiKey,
|
||||
'X-Goog-FieldMask': fieldMask,
|
||||
},
|
||||
timeout: 15000,
|
||||
}),
|
||||
axios.post(routesUrl, { ...commonPayload, routeModifiers: { avoidTolls: true } }, {
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'X-Goog-Api-Key': apiKey,
|
||||
'X-Goog-FieldMask': fieldMask,
|
||||
},
|
||||
timeout: 15000,
|
||||
}),
|
||||
]);
|
||||
|
||||
const routes = [];
|
||||
|
||||
console.log("resToll.data.routes length:", resToll.data.routes ? resToll.data.routes.length : 0);
|
||||
if (!resToll.data.routes) console.log("resToll.data:", JSON.stringify(resToll.data, null, 2));
|
||||
|
||||
// --- Route avec péage ---
|
||||
if (resToll.data.routes && resToll.data.routes.length > 0) {
|
||||
const r = resToll.data.routes[0];
|
||||
const poly = r.polyline?.encodedPolyline || '';
|
||||
let tollCost = 0;
|
||||
if (poly) {
|
||||
tollCost = await calculateTollCost(poly, vehicleTollCategory);
|
||||
}
|
||||
routes.push({
|
||||
routeType: 'TOLL',
|
||||
distanceMeters: r.distanceMeters || 0,
|
||||
durationSeconds: _parseDuration(r.duration),
|
||||
encodedPolyline: poly,
|
||||
tollCost,
|
||||
});
|
||||
}
|
||||
|
||||
// --- Route sans péage ---
|
||||
if (resNoToll.data.routes && resNoToll.data.routes.length > 0) {
|
||||
const r = resNoToll.data.routes[0];
|
||||
const poly = r.polyline?.encodedPolyline || '';
|
||||
|
||||
// N'ajouter que si différente de la route avec péage
|
||||
const isDifferent = routes.length === 0 ||
|
||||
r.distanceMeters !== routes[0].distanceMeters ||
|
||||
Math.abs(_parseDuration(r.duration) - routes[0].durationSeconds) > 60;
|
||||
|
||||
if (isDifferent) {
|
||||
routes.push({
|
||||
routeType: 'TOLL_FREE',
|
||||
distanceMeters: r.distanceMeters || 0,
|
||||
durationSeconds: _parseDuration(r.duration),
|
||||
encodedPolyline: poly,
|
||||
tollCost: 0,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return res.status(200).json({ routes });
|
||||
} catch (e) {
|
||||
logger.error('[Travel] googleMapsComputeRoute error:', e.message, e.response?.data);
|
||||
return res.status(500).json({ error: e.message });
|
||||
}
|
||||
};
|
||||
|
||||
function _parseDuration(durationStr) {
|
||||
if (!durationStr) return 0;
|
||||
if (typeof durationStr === 'number') return durationStr;
|
||||
// Format: "1234s"
|
||||
const match = String(durationStr).match(/^(\d+)s?$/);
|
||||
return match ? parseInt(match[1]) : 0;
|
||||
}
|
||||
|
||||
exports.getUlysTollLegs = getUlysTollLegs;
|
||||
@@ -0,0 +1,79 @@
|
||||
const axios = require('axios');
|
||||
const polylineLib = require('@mapbox/polyline');
|
||||
require('dotenv').config({ path: '.env' });
|
||||
const { _distKm } = require('./src/travel.js'); // Not exported, I'll copy the logic
|
||||
|
||||
function distKm(lat1, lng1, lat2, lng2) {
|
||||
const dLat = (lat2 - lat1) * Math.PI / 180;
|
||||
const dLng = (lng2 - lng1) * Math.PI / 180;
|
||||
const a = Math.sin(dLat/2)**2 + Math.cos(lat1*Math.PI/180) * Math.cos(lat2*Math.PI/180) * Math.sin(dLng/2)**2;
|
||||
return 6371 * 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a));
|
||||
}
|
||||
|
||||
async function bulkRateTest() {
|
||||
const apiKey = process.env.API_MAPS;
|
||||
const origin = "25 Impasse du Puits du Suc, Saint-Martin-en-Haut, France";
|
||||
const destination = "Toulouse, France";
|
||||
|
||||
const routesUrl = 'https://routes.googleapis.com/directions/v2:computeRoutes';
|
||||
const resToll = await axios.post(routesUrl, {
|
||||
travelMode: 'DRIVE', routingPreference: 'TRAFFIC_UNAWARE',
|
||||
origin: { address: origin }, destination: { address: destination },
|
||||
}, { headers: { 'Content-Type': 'application/json', 'X-Goog-Api-Key': apiKey, 'X-Goog-FieldMask': 'routes.polyline.encodedPolyline' } });
|
||||
|
||||
const poly = resToll.data.routes[0].polyline.encodedPolyline;
|
||||
const polylineCoords = polylineLib.decode(poly, 5);
|
||||
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const csvPath = path.join(__dirname, 'travel', 'gares_peage_export.csv');
|
||||
const rawCsv = fs.readFileSync(csvPath, 'utf8');
|
||||
const stations = [];
|
||||
const lines = rawCsv.split('\n');
|
||||
for (let i = 1; i < lines.length; i++) {
|
||||
const l = lines[i].trim();
|
||||
if (!l) continue;
|
||||
const parts = l.split(',');
|
||||
if (parts.length >= 4) {
|
||||
const idStr = String(parts[0]).padStart(5, '0');
|
||||
stations.push({
|
||||
id: idStr,
|
||||
operatorId: idStr.substring(0, 2),
|
||||
tollId: idStr.substring(2, 5),
|
||||
name: parts[1],
|
||||
lat: parseFloat(parts[2]),
|
||||
lon: parseFloat(parts[3]),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
const candidates = [];
|
||||
stations.forEach(s => {
|
||||
let minDist = Infinity;
|
||||
let minIndex = -1;
|
||||
for (let i = 0; i < polylineCoords.length; i++) {
|
||||
const d = distKm(s.lat, s.lon, polylineCoords[i][0], polylineCoords[i][1]);
|
||||
if (d < minDist) { minDist = d; minIndex = i; }
|
||||
}
|
||||
if (minDist < 2) {
|
||||
candidates.push({ ...s, polyIndex: minIndex });
|
||||
}
|
||||
});
|
||||
candidates.sort((a, b) => a.polyIndex - b.polyIndex);
|
||||
|
||||
const passages = candidates.map(c => ({
|
||||
toll: { operatorId: c.operatorId, tollId: c.tollId },
|
||||
passageDate: new Date().toISOString()
|
||||
}));
|
||||
|
||||
try {
|
||||
console.log(`Sending ${passages.length} passages to Ulys...`);
|
||||
const res = await axios.post('https://api-ulys.azure-api.net/tollstation/v1/rate', {
|
||||
vehicleCategory: "2", paymentOption: 2, tollPassages: passages
|
||||
});
|
||||
console.log(JSON.stringify(res.data, null, 2));
|
||||
} catch(e) {
|
||||
console.log(e.response ? e.response.data : e.message);
|
||||
}
|
||||
}
|
||||
bulkRateTest();
|
||||
@@ -0,0 +1,17 @@
|
||||
const travel = require('./src/travel.js');
|
||||
require('dotenv').config({ path: '.env' });
|
||||
const auth = require('./utils/auth.js');
|
||||
auth.authenticateUser = async () => ({ uid: 'dummy' });
|
||||
|
||||
async function test() {
|
||||
const req = {
|
||||
headers: { authorization: 'Bearer dummy' },
|
||||
body: { origin: "25 Impasse du Puits du Suc, Saint-Martin-en-Haut, France", destination: "Grenoble, France", vehicleCategory: "2" }
|
||||
};
|
||||
const res = {
|
||||
status: function() { return this; },
|
||||
json: function(data) { console.log(JSON.stringify(data, null, 2)); }
|
||||
};
|
||||
await travel.googleMapsComputeRoute(req, res);
|
||||
}
|
||||
test();
|
||||
@@ -0,0 +1,32 @@
|
||||
const axios = require('axios');
|
||||
const polylineLib = require('@mapbox/polyline');
|
||||
require('dotenv').config({ path: '.env' });
|
||||
const { googleMapsComputeRoute } = require('./src/travel.js');
|
||||
|
||||
async function testGrenobleDetailed() {
|
||||
const origin = "25 Impasse du Puits du Suc, Saint-Martin-en-Haut, France";
|
||||
const destination = "Grenoble, France";
|
||||
|
||||
const req = {
|
||||
headers: { authorization: 'Bearer MOCK' },
|
||||
body: { origin, destination, vehicleTollCategory: 2 }
|
||||
};
|
||||
let resultBody = null;
|
||||
const res = {
|
||||
set: () => {}, status: () => res,
|
||||
json: (data) => { resultBody = data; return res; },
|
||||
send: (data) => { resultBody = data; return res; }
|
||||
};
|
||||
|
||||
const auth = require('./utils/auth');
|
||||
auth.authenticateUser = async () => {};
|
||||
|
||||
await googleMapsComputeRoute(req, res);
|
||||
|
||||
if (resultBody.error) {
|
||||
console.error(`Error: ${resultBody.error}`);
|
||||
} else {
|
||||
console.log(JSON.stringify(resultBody.routes[0], null, 2));
|
||||
}
|
||||
}
|
||||
testGrenobleDetailed();
|
||||
@@ -0,0 +1,14 @@
|
||||
const axios = require('axios');
|
||||
async function getUlysRate(vehicleCategory, passages) {
|
||||
const payload = {
|
||||
vehicleCategory: String(vehicleCategory),
|
||||
paymentOption: 2,
|
||||
tollPassages: passages.map((p) => ({
|
||||
toll: { operatorId: p.operatorId, tollId: p.tollId },
|
||||
passageDate: new Date().toISOString(),
|
||||
})),
|
||||
};
|
||||
const res = await axios.post('https://api-ulys.azure-api.net/tollstation/v1/rate', payload);
|
||||
console.log(JSON.stringify(res.data, null, 2));
|
||||
}
|
||||
getUlysRate(2, [{operatorId: '03', tollId: '001'}, {operatorId: '03', tollId: '003'}]);
|
||||
@@ -0,0 +1,37 @@
|
||||
const axios = require('axios');
|
||||
const polylineLib = require('@mapbox/polyline');
|
||||
require('dotenv').config({ path: '.env' });
|
||||
|
||||
async function testHalfPolyline() {
|
||||
const apiKey = process.env.API_MAPS;
|
||||
const resToll = await axios.post('https://routes.googleapis.com/directions/v2:computeRoutes', {
|
||||
travelMode: 'DRIVE', routingPreference: 'TRAFFIC_UNAWARE',
|
||||
origin: { address: "25 Impasse du Puits du Suc, Saint-Martin-en-Haut, France" },
|
||||
destination: { address: "Toulouse, France" },
|
||||
}, { headers: { 'Content-Type': 'application/json', 'X-Goog-Api-Key': apiKey, 'X-Goog-FieldMask': 'routes.polyline.encodedPolyline' } });
|
||||
|
||||
const mainPoly = resToll.data.routes[0].polyline.encodedPolyline;
|
||||
const mainCoords = polylineLib.decode(mainPoly, 5);
|
||||
|
||||
const halfCoords = mainCoords.slice(0, Math.floor(mainCoords.length / 2));
|
||||
const halfPoly = polylineLib.encode(halfCoords, 5);
|
||||
|
||||
console.log(`Sending first half (${halfCoords.length} points)`);
|
||||
|
||||
const ulysUrl = `https://api-ulys.azure-api.net/placemark/v2/legs?precision=5&includeLayersIds=GaresPeage`;
|
||||
|
||||
try {
|
||||
const res = await axios.post(ulysUrl, JSON.stringify(halfPoly), {
|
||||
headers: { 'Content-Type': 'application/json' }
|
||||
});
|
||||
const feats = res.data.features || res.data;
|
||||
console.log(`Found ${feats.length} gates.`);
|
||||
feats.forEach(f => {
|
||||
const pm = f.Placemark || f.placemark || {};
|
||||
console.log(pm.Preview || pm.preview || "Gate");
|
||||
});
|
||||
} catch(e) {
|
||||
console.log("Error:", e.message);
|
||||
}
|
||||
}
|
||||
testHalfPolyline();
|
||||
@@ -0,0 +1,66 @@
|
||||
const axios = require('axios');
|
||||
const polylineLib = require('@mapbox/polyline');
|
||||
require('dotenv').config({ path: '.env' });
|
||||
|
||||
function distKm(lat1, lng1, lat2, lng2) {
|
||||
const dLat = (lat2 - lat1) * Math.PI / 180;
|
||||
const dLng = (lng2 - lng1) * Math.PI / 180;
|
||||
const a = Math.sin(dLat/2)**2 + Math.cos(lat1*Math.PI/180) * Math.cos(lat2*Math.PI/180) * Math.sin(dLng/2)**2;
|
||||
return 6371 * 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a));
|
||||
}
|
||||
|
||||
function interpolatePolyline(coords, maxDistKm = 0.05) {
|
||||
const newCoords = [];
|
||||
if(coords.length === 0) return newCoords;
|
||||
newCoords.push(coords[0]);
|
||||
for(let i=1; i<coords.length; i++) {
|
||||
const p1 = coords[i-1];
|
||||
const p2 = coords[i];
|
||||
const d = distKm(p1[0], p1[1], p2[0], p2[1]);
|
||||
if(d > maxDistKm) {
|
||||
const steps = Math.ceil(d / maxDistKm);
|
||||
for(let step=1; step<steps; step++) {
|
||||
const fraction = step / steps;
|
||||
const lat = p1[0] + (p2[0] - p1[0]) * fraction;
|
||||
const lng = p1[1] + (p2[1] - p1[1]) * fraction;
|
||||
newCoords.push([lat, lng]);
|
||||
}
|
||||
}
|
||||
newCoords.push(p2);
|
||||
}
|
||||
return newCoords;
|
||||
}
|
||||
|
||||
async function testInterpolatedToulouse() {
|
||||
const apiKey = process.env.API_MAPS;
|
||||
const resToll = await axios.post('https://routes.googleapis.com/directions/v2:computeRoutes', {
|
||||
travelMode: 'DRIVE', routingPreference: 'TRAFFIC_UNAWARE',
|
||||
origin: { address: "25 Impasse du Puits du Suc, Saint-Martin-en-Haut, France" },
|
||||
destination: { address: "Toulouse, France" },
|
||||
}, { headers: { 'Content-Type': 'application/json', 'X-Goog-Api-Key': apiKey, 'X-Goog-FieldMask': 'routes.polyline.encodedPolyline' } });
|
||||
|
||||
const poly = resToll.data.routes[0].polyline.encodedPolyline;
|
||||
const coords = polylineLib.decode(poly, 5);
|
||||
|
||||
const interpolated = interpolatePolyline(coords, 0.05); // 50 meters
|
||||
console.log(`Original points: ${coords.length}, Interpolated: ${interpolated.length}`);
|
||||
|
||||
const polyInt = polylineLib.encode(interpolated, 5);
|
||||
|
||||
const ulysUrl = `https://api-ulys.azure-api.net/placemark/v2/legs?precision=5&includeLayersIds=GaresPeage`;
|
||||
|
||||
try {
|
||||
const res = await axios.post(ulysUrl, JSON.stringify(polyInt), {
|
||||
headers: { 'Content-Type': 'application/json' }
|
||||
});
|
||||
const feats = res.data.features || res.data;
|
||||
console.log(`Found ${feats.length} gates.`);
|
||||
feats.forEach(f => {
|
||||
const pm = f.Placemark || f.placemark || {};
|
||||
console.log(pm.Preview || pm.preview || "Gate");
|
||||
});
|
||||
} catch(e) {
|
||||
console.log("Error:", e.message);
|
||||
}
|
||||
}
|
||||
testInterpolatedToulouse();
|
||||
@@ -0,0 +1,147 @@
|
||||
const axios = require('axios');
|
||||
const fs = require('fs');
|
||||
const csv = require('csv-parser');
|
||||
const polylineLib = require('@mapbox/polyline');
|
||||
require('dotenv').config({ path: '.env' });
|
||||
|
||||
function loadTollStations() {
|
||||
return new Promise((resolve) => {
|
||||
const csvPath = './travel/gares_peage_export.csv';
|
||||
const results = [];
|
||||
fs.createReadStream(csvPath)
|
||||
.pipe(csv())
|
||||
.on('data', (row) => {
|
||||
if (row.id_gare && row.lat && row.lon) {
|
||||
results.push({
|
||||
id: row.id_gare,
|
||||
operatorId: row.id_gare.substring(0, 2),
|
||||
tollId: row.id_gare.substring(2, 5),
|
||||
name: row.nom || '',
|
||||
lat: parseFloat(row.lat),
|
||||
lon: parseFloat(row.lon),
|
||||
});
|
||||
}
|
||||
})
|
||||
.on('end', () => resolve(results));
|
||||
});
|
||||
}
|
||||
|
||||
function _distKm(lat1, lng1, lat2, lng2) {
|
||||
const dLat = (lat2 - lat1) * Math.PI / 180;
|
||||
const dLng = (lng2 - lng1) * Math.PI / 180;
|
||||
const a = Math.sin(dLat/2)**2 + Math.cos(lat1*Math.PI/180) * Math.cos(lat2*Math.PI/180) * Math.sin(dLng/2)**2;
|
||||
return 6371 * 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a));
|
||||
}
|
||||
|
||||
async function getUlysRate(vehicleCategory, passages) {
|
||||
try {
|
||||
const payload = {
|
||||
vehicleCategory: String(vehicleCategory),
|
||||
paymentOption: 2,
|
||||
tollPassages: passages.map((p) => ({
|
||||
toll: { operatorId: p.operatorId, tollId: p.tollId },
|
||||
passageDate: new Date().toISOString(),
|
||||
})),
|
||||
};
|
||||
const res = await axios.post('https://api-ulys.azure-api.net/tollstation/v1/rate', payload);
|
||||
const data = res.data;
|
||||
if (Array.isArray(data) && data.length > 0) {
|
||||
if (passages.length === 2) {
|
||||
if (data.length !== 1 || !data[0].exitToll) return null;
|
||||
return data[0].price > 0 ? data[0].price : null;
|
||||
} else {
|
||||
if (data.length === 1 && data[0].price > 0) return data[0].price;
|
||||
const total = data.reduce((sum, d) => sum + (d.price || 0), 0);
|
||||
return total > 0 ? total : null;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
} catch (e) { return null; }
|
||||
}
|
||||
|
||||
async function test() {
|
||||
const origin = "25 Impasse du Puits du Suc, Saint-Martin-en-Haut, France";
|
||||
const destination = "Nice, France";
|
||||
const apiKey = process.env.API_MAPS;
|
||||
|
||||
const routesUrl = 'https://routes.googleapis.com/directions/v2:computeRoutes';
|
||||
const res = await axios.post(routesUrl, {
|
||||
travelMode: 'DRIVE', routingPreference: 'TRAFFIC_UNAWARE', origin: { address: origin }, destination: { address: destination },
|
||||
}, { headers: { 'Content-Type': 'application/json', 'X-Goog-Api-Key': apiKey, 'X-Goog-FieldMask': 'routes.polyline.encodedPolyline' }});
|
||||
|
||||
const poly = res.data.routes[0].polyline.encodedPolyline;
|
||||
const coords = polylineLib.decode(poly, 5);
|
||||
|
||||
const safePolyline = poly;
|
||||
const url = 'https://api-ulys.azure-api.net/placemark/v2/legs?precision=5&includeLayersIds=GaresPeage';
|
||||
const ulysRes = await axios.post(url, JSON.stringify(safePolyline), { headers: { 'Content-Type': 'application/json' } });
|
||||
const items = Array.isArray(ulysRes.data) ? ulysRes.data : (ulysRes.data.features || []);
|
||||
|
||||
const stations = await loadTollStations();
|
||||
const gates = [];
|
||||
|
||||
for (const item of items) {
|
||||
const pm = item.Placemark || item.placemark || {};
|
||||
const tags = pm.Tags || pm.tags || {};
|
||||
let idStr = tags.ID_PEAGE;
|
||||
if (!idStr && pm.Code) idStr = pm.Code.split('_')[0];
|
||||
const s = stations.find(s => s.id === idStr);
|
||||
if (s && !gates.find(g => g.id === idStr)) gates.push(s);
|
||||
}
|
||||
|
||||
// Fallback for missing first system
|
||||
let missingSystemPrice = 0;
|
||||
if (gates.length > 0) {
|
||||
const originLat = coords[0][0];
|
||||
const originLng = coords[0][1];
|
||||
const firstGate = gates[0];
|
||||
const distToFirstGate = _distKm(originLat, originLng, firstGate.lat, firstGate.lon);
|
||||
|
||||
if (distToFirstGate > 50) {
|
||||
console.log(`First gate ${firstGate.name} is ${Math.round(distToFirstGate)}km from origin. Checking for missing system...`);
|
||||
// Find all geometric gates within 2km of the route, UP TO the firstGate
|
||||
let firstGateIndex = 0;
|
||||
for (let i = 0; i < coords.length; i++) {
|
||||
if (_distKm(coords[i][0], coords[i][1], firstGate.lat, firstGate.lon) < 1) {
|
||||
firstGateIndex = i; break;
|
||||
}
|
||||
}
|
||||
|
||||
const candidates = [];
|
||||
stations.forEach(s => {
|
||||
let minDist = Infinity;
|
||||
let minIndex = -1;
|
||||
for (let i = 0; i < firstGateIndex; i++) {
|
||||
const d = _distKm(s.lat, s.lon, coords[i][0], coords[i][1]);
|
||||
if (d < minDist) { minDist = d; minIndex = i; }
|
||||
}
|
||||
if (minDist < 2) {
|
||||
candidates.push({ ...s, polyIndex: minIndex });
|
||||
}
|
||||
});
|
||||
|
||||
candidates.sort((a, b) => a.polyIndex - b.polyIndex);
|
||||
|
||||
if (candidates.length >= 2) {
|
||||
// Try combinations from furthest to closest to find the longest closed system
|
||||
let found = false;
|
||||
for (let i = 0; i < Math.min(10, candidates.length); i++) {
|
||||
for (let j = candidates.length - 1; j > i && j > candidates.length - 10; j--) {
|
||||
if (candidates[i].operatorId !== candidates[j].operatorId) continue;
|
||||
const price = await getUlysRate(2, [candidates[i], candidates[j]]);
|
||||
if (price) {
|
||||
console.log(`Found missing system: ${candidates[i].name} -> ${candidates[j].name} = ${price}€`);
|
||||
missingSystemPrice += price;
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (found) break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
console.log(`Missing system price: ${missingSystemPrice}€`);
|
||||
}
|
||||
test();
|
||||
@@ -0,0 +1,44 @@
|
||||
const axios = require('axios');
|
||||
const polylineLib = require('@mapbox/polyline');
|
||||
require('dotenv').config({ path: '.env' });
|
||||
|
||||
async function directTestToulouse() {
|
||||
const origin = "25 Impasse du Puits du Suc, Saint-Martin-en-Haut, France";
|
||||
const destination = "Toulouse, France";
|
||||
const apiKey = process.env.API_MAPS;
|
||||
|
||||
const routesUrl = 'https://routes.googleapis.com/directions/v2:computeRoutes';
|
||||
const fieldMask = 'routes.distanceMeters,routes.duration,routes.polyline.encodedPolyline,routes.travelAdvisory.tollInfo';
|
||||
|
||||
const resToll = await axios.post(routesUrl, {
|
||||
travelMode: 'DRIVE',
|
||||
routingPreference: 'TRAFFIC_UNAWARE',
|
||||
origin: { address: origin },
|
||||
destination: { address: destination },
|
||||
routeModifiers: { avoidTolls: false }
|
||||
}, {
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'X-Goog-Api-Key': apiKey,
|
||||
'X-Goog-FieldMask': fieldMask,
|
||||
}
|
||||
});
|
||||
|
||||
const poly = resToll.data.routes[0].polyline.encodedPolyline;
|
||||
const decoded = polylineLib.decode(poly, 5);
|
||||
const poly6 = polylineLib.encode(decoded, 6);
|
||||
|
||||
const ulysUrl = `https://api-ulys.azure-api.net/placemark/v2/legs?precision=6&includeLayersIds=GaresPeage`;
|
||||
|
||||
try {
|
||||
const res = await axios.post(ulysUrl, JSON.stringify(poly6), {
|
||||
headers: { 'Content-Type': 'application/json' }
|
||||
});
|
||||
console.log("Ulys Response (precision=6):");
|
||||
console.log(res.data);
|
||||
} catch(e) {
|
||||
console.log("Ulys Error:", e.message);
|
||||
if(e.response && e.response.data) console.log(e.response.data);
|
||||
}
|
||||
}
|
||||
directTestToulouse();
|
||||
@@ -0,0 +1,23 @@
|
||||
const axios = require('axios');
|
||||
async function testRate() {
|
||||
const passages = [
|
||||
{ operatorId: '04', tollId: '201' }, // VIENNE
|
||||
{ operatorId: '04', tollId: '457' } // TOULOUSE-NORD/OUEST
|
||||
];
|
||||
const payload = {
|
||||
vehicleCategory: "2",
|
||||
paymentOption: 2,
|
||||
tollPassages: passages.map((p) => ({
|
||||
toll: { operatorId: p.operatorId, tollId: p.tollId },
|
||||
passageDate: new Date().toISOString(),
|
||||
})),
|
||||
};
|
||||
try {
|
||||
const res = await axios.post('https://api-ulys.azure-api.net/tollstation/v1/rate', payload);
|
||||
console.log("Rate:");
|
||||
console.log(JSON.stringify(res.data, null, 2));
|
||||
} catch (e) {
|
||||
console.error(e.response ? e.response.data : e.message);
|
||||
}
|
||||
}
|
||||
testRate();
|
||||
@@ -0,0 +1,21 @@
|
||||
const axios = require('axios');
|
||||
async function testRate() {
|
||||
const passages = [
|
||||
{ operatorId: '04', tollId: '178' },
|
||||
{ operatorId: '09', tollId: '079' }
|
||||
];
|
||||
const payload = {
|
||||
vehicleCategory: "2", paymentOption: 2,
|
||||
tollPassages: passages.map((p) => ({
|
||||
toll: { operatorId: p.operatorId, tollId: p.tollId }, passageDate: new Date().toISOString(),
|
||||
})),
|
||||
};
|
||||
try {
|
||||
const res = await axios.post('https://api-ulys.azure-api.net/tollstation/v1/rate', payload);
|
||||
console.log("Rate:");
|
||||
console.log(JSON.stringify(res.data, null, 2));
|
||||
} catch (e) {
|
||||
console.error(e.response ? e.response.data : e.message);
|
||||
}
|
||||
}
|
||||
testRate();
|
||||
@@ -0,0 +1,23 @@
|
||||
const axios = require('axios');
|
||||
async function testRateVienneToulouseEst() {
|
||||
const passages = [
|
||||
{ operatorId: '04', tollId: '178' }, // MONTBRISON (04178)
|
||||
{ operatorId: '04', tollId: '456' } // TOULOUSE-EST (04456)
|
||||
];
|
||||
const payload = {
|
||||
vehicleCategory: "2",
|
||||
paymentOption: 2,
|
||||
tollPassages: passages.map((p) => ({
|
||||
toll: { operatorId: p.operatorId, tollId: p.tollId },
|
||||
passageDate: new Date().toISOString(),
|
||||
})),
|
||||
};
|
||||
try {
|
||||
const res = await axios.post('https://api-ulys.azure-api.net/tollstation/v1/rate', payload);
|
||||
console.log("Rate MONTBRISON -> TOULOUSE-EST:");
|
||||
console.log(JSON.stringify(res.data, null, 2));
|
||||
} catch (e) {
|
||||
console.error(e.response ? e.response.data : e.message);
|
||||
}
|
||||
}
|
||||
testRateVienneToulouseEst();
|
||||
@@ -0,0 +1,23 @@
|
||||
const axios = require('axios');
|
||||
async function testRateVienneToulouseEst() {
|
||||
const passages = [
|
||||
{ operatorId: '04', tollId: '201' }, // VIENNE (04201)
|
||||
{ operatorId: '04', tollId: '456' } // TOULOUSE-EST (04456)
|
||||
];
|
||||
const payload = {
|
||||
vehicleCategory: "2",
|
||||
paymentOption: 2,
|
||||
tollPassages: passages.map((p) => ({
|
||||
toll: { operatorId: p.operatorId, tollId: p.tollId },
|
||||
passageDate: new Date().toISOString(),
|
||||
})),
|
||||
};
|
||||
try {
|
||||
const res = await axios.post('https://api-ulys.azure-api.net/tollstation/v1/rate', payload);
|
||||
console.log("Rate VIENNE -> TOULOUSE-EST:");
|
||||
console.log(JSON.stringify(res.data, null, 2));
|
||||
} catch (e) {
|
||||
console.error(e.response ? e.response.data : e.message);
|
||||
}
|
||||
}
|
||||
testRateVienneToulouseEst();
|
||||
@@ -0,0 +1,40 @@
|
||||
const axios = require('axios');
|
||||
const polylineLib = require('@mapbox/polyline');
|
||||
require('dotenv').config({ path: '.env' });
|
||||
const { googleMapsComputeRoute } = require('./src/travel.js');
|
||||
|
||||
async function testRoute(destination, expectedPrice) {
|
||||
const origin = "25 Impasse du Puits du Suc, Saint-Martin-en-Haut, France";
|
||||
console.log(`\nTesting ${destination}...`);
|
||||
|
||||
const req = {
|
||||
headers: { authorization: 'Bearer MOCK' },
|
||||
body: { origin, destination, vehicleTollCategory: 2 }
|
||||
};
|
||||
let resultBody = null;
|
||||
const res = {
|
||||
set: () => {}, status: () => res,
|
||||
json: (data) => { resultBody = data; return res; },
|
||||
send: (data) => { resultBody = data; return res; }
|
||||
};
|
||||
|
||||
await googleMapsComputeRoute(req, res);
|
||||
|
||||
if (resultBody.error) {
|
||||
console.error(`Error: ${resultBody.error}`);
|
||||
} else {
|
||||
const toll = resultBody.routes && resultBody.routes.length > 0 ? resultBody.routes[0].tollCost : 0;
|
||||
console.log(`Toll: ${toll}€ (Expected: ${expectedPrice}€)`);
|
||||
}
|
||||
}
|
||||
|
||||
async function run() {
|
||||
// Mock Firebase auth specifically for this test
|
||||
const auth = require('./utils/auth');
|
||||
auth.authenticateUser = async () => {};
|
||||
|
||||
await testRoute("Saint-Denis, France", 64.3);
|
||||
await testRoute("Grenoble, France", 21.7);
|
||||
await testRoute("Nice, France", 77.2);
|
||||
}
|
||||
run();
|
||||
@@ -0,0 +1,130 @@
|
||||
const axios = require('axios');
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
require('dotenv').config({ path: '.env' });
|
||||
const { _distKm } = require('./src/travel.js');
|
||||
|
||||
function distKm(lat1, lng1, lat2, lng2) {
|
||||
const dLat = (lat2 - lat1) * Math.PI / 180;
|
||||
const dLng = (lng2 - lng1) * Math.PI / 180;
|
||||
const a = Math.sin(dLat/2)**2 + Math.cos(lat1*Math.PI/180) * Math.cos(lat2*Math.PI/180) * Math.sin(dLng/2)**2;
|
||||
return 6371 * 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a));
|
||||
}
|
||||
|
||||
async function testTollSegments() {
|
||||
const apiKey = process.env.API_MAPS;
|
||||
const resToll = await axios.post('https://routes.googleapis.com/directions/v2:computeRoutes', {
|
||||
travelMode: 'DRIVE', routingPreference: 'TRAFFIC_UNAWARE',
|
||||
origin: { address: "25 Impasse du Puits du Suc, Saint-Martin-en-Haut, France" },
|
||||
destination: { address: "Nice, France" },
|
||||
}, { headers: { 'Content-Type': 'application/json', 'X-Goog-Api-Key': apiKey, 'X-Goog-FieldMask': 'routes.legs.steps.navigationInstruction,routes.legs.steps.distanceMeters,routes.legs.steps.startLocation,routes.legs.steps.endLocation,routes.legs.steps.polyline.encodedPolyline' } });
|
||||
|
||||
const steps = resToll.data.routes[0].legs[0].steps;
|
||||
|
||||
const rawCsv = fs.readFileSync(path.join(__dirname, 'travel', 'gares_peage_export.csv'), 'utf8');
|
||||
const stations = [];
|
||||
const lines = rawCsv.split('\n');
|
||||
for (let i = 1; i < lines.length; i++) {
|
||||
const l = lines[i].trim();
|
||||
if (!l) continue;
|
||||
const parts = l.split(',');
|
||||
if (parts.length >= 4) {
|
||||
const idStr = String(parts[0]).padStart(5, '0');
|
||||
stations.push({
|
||||
id: idStr, operatorId: idStr.substring(0, 2), tollId: idStr.substring(2, 5),
|
||||
name: parts[1], lat: parseFloat(parts[2]), lon: parseFloat(parts[3]),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function getClosestGate(lat, lng) {
|
||||
let minDist = Infinity;
|
||||
let closest = null;
|
||||
for(let s of stations) {
|
||||
const d = distKm(lat, lng, s.lat, s.lon);
|
||||
if(d < minDist) { minDist = d; closest = s; }
|
||||
}
|
||||
return minDist < 5 ? closest : null;
|
||||
}
|
||||
|
||||
const segments = [];
|
||||
let currentSegment = null;
|
||||
for(let i=0; i<steps.length; i++) {
|
||||
const step = steps[i];
|
||||
const inst = step.navigationInstruction ? step.navigationInstruction.instructions : '';
|
||||
const isToll = inst.toLowerCase().includes('péage') || inst.toLowerCase().includes('toll');
|
||||
|
||||
if (isToll) {
|
||||
if (!currentSegment) {
|
||||
currentSegment = { steps: [] };
|
||||
}
|
||||
currentSegment.steps.push(step);
|
||||
} else {
|
||||
if (currentSegment) {
|
||||
segments.push(currentSegment);
|
||||
currentSegment = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (currentSegment) segments.push(currentSegment);
|
||||
|
||||
const polylineLib = require('@mapbox/polyline');
|
||||
let totalToll = 0;
|
||||
for (let i=0; i<segments.length; i++) {
|
||||
const seg = segments[i];
|
||||
let segCoords = [];
|
||||
for(let step of seg.steps) {
|
||||
if(step.polyline && step.polyline.encodedPolyline) {
|
||||
segCoords = segCoords.concat(polylineLib.decode(step.polyline.encodedPolyline, 5));
|
||||
}
|
||||
}
|
||||
|
||||
const candidates = [];
|
||||
stations.forEach(s => {
|
||||
let minDist = Infinity;
|
||||
let minIndex = -1;
|
||||
for (let j = 0; j < segCoords.length; j++) {
|
||||
const d = distKm(s.lat, s.lon, segCoords[j][0], segCoords[j][1]);
|
||||
if (d < minDist) { minDist = d; minIndex = j; }
|
||||
}
|
||||
if (minDist < 2) { // must be within 2km of the segment
|
||||
candidates.push({ ...s, polyIndex: minIndex });
|
||||
}
|
||||
});
|
||||
candidates.sort((a, b) => a.polyIndex - b.polyIndex);
|
||||
|
||||
let entry = null, exit = null;
|
||||
if (candidates.length > 0) {
|
||||
entry = candidates[0];
|
||||
exit = candidates[candidates.length - 1];
|
||||
}
|
||||
|
||||
console.log(`Segment ${i+1}: points=${segCoords.length}, candidates=${candidates.length}, Entry=${entry?entry.name:'none'}, Exit=${exit?exit.name:'none'}`);
|
||||
|
||||
|
||||
if (entry && exit) {
|
||||
try {
|
||||
const passages = [
|
||||
{ operatorId: entry.operatorId, tollId: entry.tollId },
|
||||
{ operatorId: exit.operatorId, tollId: exit.tollId }
|
||||
];
|
||||
const payload = {
|
||||
vehicleCategory: "2", paymentOption: 2,
|
||||
tollPassages: passages.map((p) => ({ toll: { operatorId: p.operatorId, tollId: p.tollId }, passageDate: new Date().toISOString() })),
|
||||
};
|
||||
const res = await axios.post('https://api-ulys.azure-api.net/tollstation/v1/rate', payload);
|
||||
const data = res.data;
|
||||
let price = 0;
|
||||
if (data.length === 1 && data[0].price > 0) price = data[0].price;
|
||||
if (data.length > 1) {
|
||||
const pItem = data.find(d => d.price > 0);
|
||||
if (pItem) price = pItem.price;
|
||||
}
|
||||
console.log(` -> Price: ${price}€`);
|
||||
totalToll += price;
|
||||
} catch(e) { console.log(` -> Ulys Error`); }
|
||||
}
|
||||
}
|
||||
console.log(`Total Toll: ${totalToll}€`);
|
||||
}
|
||||
testTollSegments();
|
||||
@@ -0,0 +1,21 @@
|
||||
const axios = require('axios');
|
||||
require('dotenv').config({ path: '.env' });
|
||||
|
||||
async function testSteps() {
|
||||
const apiKey = process.env.API_MAPS;
|
||||
const resToll = await axios.post('https://routes.googleapis.com/directions/v2:computeRoutes', {
|
||||
travelMode: 'DRIVE', routingPreference: 'TRAFFIC_UNAWARE',
|
||||
origin: { address: "25 Impasse du Puits du Suc, Saint-Martin-en-Haut, France" },
|
||||
destination: { address: "Toulouse, France" },
|
||||
}, { headers: { 'Content-Type': 'application/json', 'X-Goog-Api-Key': apiKey, 'X-Goog-FieldMask': 'routes.legs.steps.navigationInstruction,routes.legs.steps.distanceMeters,routes.legs.steps.startLocation,routes.legs.steps.endLocation' } });
|
||||
|
||||
const steps = resToll.data.routes[0].legs[0].steps;
|
||||
for(let i=0; i<steps.length; i++) {
|
||||
const step = steps[i];
|
||||
const inst = step.navigationInstruction ? step.navigationInstruction.instructions : '';
|
||||
if(inst.toLowerCase().includes('péage') || inst.toLowerCase().includes('toll')) {
|
||||
console.log(`Step ${i}: ${inst} (Dist: ${step.distanceMeters}m)`);
|
||||
}
|
||||
}
|
||||
}
|
||||
testSteps();
|
||||
@@ -0,0 +1,45 @@
|
||||
const axios = require('axios');
|
||||
const polylineLib = require('@mapbox/polyline');
|
||||
require('dotenv').config({ path: '.env' });
|
||||
|
||||
async function testStepsPolyline() {
|
||||
const apiKey = process.env.API_MAPS;
|
||||
const resToll = await axios.post('https://routes.googleapis.com/directions/v2:computeRoutes', {
|
||||
travelMode: 'DRIVE', routingPreference: 'TRAFFIC_UNAWARE',
|
||||
origin: { address: "25 Impasse du Puits du Suc, Saint-Martin-en-Haut, France" },
|
||||
destination: { address: "Toulouse, France" },
|
||||
}, { headers: { 'Content-Type': 'application/json', 'X-Goog-Api-Key': apiKey, 'X-Goog-FieldMask': 'routes.polyline.encodedPolyline,routes.legs.steps.polyline.encodedPolyline' } });
|
||||
|
||||
const mainPoly = resToll.data.routes[0].polyline.encodedPolyline;
|
||||
const mainCoords = polylineLib.decode(mainPoly, 5);
|
||||
|
||||
const steps = resToll.data.routes[0].legs[0].steps;
|
||||
let stepCoords = [];
|
||||
for(let step of steps) {
|
||||
if(step.polyline && step.polyline.encodedPolyline) {
|
||||
stepCoords = stepCoords.concat(polylineLib.decode(step.polyline.encodedPolyline, 5));
|
||||
}
|
||||
}
|
||||
|
||||
console.log(`Main polyline points: ${mainCoords.length}`);
|
||||
console.log(`Steps combined points: ${stepCoords.length}`);
|
||||
|
||||
const combinedPoly = polylineLib.encode(stepCoords, 5);
|
||||
|
||||
const ulysUrl = `https://api-ulys.azure-api.net/placemark/v2/legs?precision=5&includeLayersIds=GaresPeage`;
|
||||
|
||||
try {
|
||||
const res = await axios.post(ulysUrl, JSON.stringify(combinedPoly), {
|
||||
headers: { 'Content-Type': 'application/json' }
|
||||
});
|
||||
const feats = res.data.features || res.data;
|
||||
console.log(`Found ${feats.length} gates.`);
|
||||
feats.forEach(f => {
|
||||
const pm = f.Placemark || f.placemark || {};
|
||||
console.log(pm.Preview || pm.preview || "Gate");
|
||||
});
|
||||
} catch(e) {
|
||||
console.log("Error:", e.message);
|
||||
}
|
||||
}
|
||||
testStepsPolyline();
|
||||
@@ -0,0 +1,31 @@
|
||||
const axios = require('axios');
|
||||
require('dotenv').config({ path: '.env' });
|
||||
const { googleMapsComputeRoute } = require('./src/travel.js');
|
||||
|
||||
async function testToulouse() {
|
||||
const origin = "25 Impasse du Puits du Suc, Saint-Martin-en-Haut, France";
|
||||
const destination = "Toulouse, France";
|
||||
|
||||
const req = {
|
||||
headers: { authorization: 'Bearer MOCK' },
|
||||
body: { origin, destination, vehicleTollCategory: 2 }
|
||||
};
|
||||
let resultBody = null;
|
||||
const res = {
|
||||
set: () => {}, status: () => res,
|
||||
json: (data) => { resultBody = data; return res; },
|
||||
send: (data) => { resultBody = data; return res; }
|
||||
};
|
||||
|
||||
const auth = require('./utils/auth');
|
||||
auth.authenticateUser = async () => {};
|
||||
|
||||
await googleMapsComputeRoute(req, res);
|
||||
|
||||
if (resultBody.error) {
|
||||
console.error(`Error: ${resultBody.error}`);
|
||||
} else {
|
||||
console.log(JSON.stringify(resultBody.routes[0], null, 2));
|
||||
}
|
||||
}
|
||||
testToulouse();
|
||||
@@ -0,0 +1,30 @@
|
||||
const axios = require('axios');
|
||||
require('dotenv').config({ path: '.env' });
|
||||
|
||||
async function testUlysParams() {
|
||||
const apiKey = process.env.API_MAPS;
|
||||
const resToll = await axios.post('https://routes.googleapis.com/directions/v2:computeRoutes', {
|
||||
travelMode: 'DRIVE', routingPreference: 'TRAFFIC_UNAWARE',
|
||||
origin: { address: "25 Impasse du Puits du Suc, Saint-Martin-en-Haut, France" },
|
||||
destination: { address: "Toulouse, France" },
|
||||
}, { headers: { 'Content-Type': 'application/json', 'X-Goog-Api-Key': apiKey, 'X-Goog-FieldMask': 'routes.polyline.encodedPolyline' } });
|
||||
|
||||
const poly = resToll.data.routes[0].polyline.encodedPolyline;
|
||||
|
||||
const urls = [
|
||||
`https://api-ulys.azure-api.net/placemark/v2/legs?precision=5&includeLayersIds=GaresPeage&radius=100`,
|
||||
`https://api-ulys.azure-api.net/placemark/v2/legs?precision=5&includeLayersIds=GaresPeage&tolerance=100`,
|
||||
`https://api-ulys.azure-api.net/placemark/v2/legs?precision=5&includeLayersIds=GaresPeage&distance=100`
|
||||
];
|
||||
|
||||
for(let url of urls) {
|
||||
try {
|
||||
const res = await axios.post(url, JSON.stringify(poly), { headers: { 'Content-Type': 'application/json' } });
|
||||
console.log(`URL: ${url}`);
|
||||
console.log(`Found ${res.data.length || (res.data.features && res.data.features.length) || 0} gates`);
|
||||
} catch(e) {
|
||||
console.log(`Error on ${url}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
testUlysParams();
|
||||
@@ -0,0 +1,41 @@
|
||||
const axios = require('axios');
|
||||
const polylineLib = require('@mapbox/polyline');
|
||||
require('dotenv').config({ path: '.env' });
|
||||
|
||||
async function directTestToulouse() {
|
||||
const origin = "25 Impasse du Puits du Suc, Saint-Martin-en-Haut, France";
|
||||
const destination = "Toulouse, France";
|
||||
const apiKey = process.env.API_MAPS;
|
||||
|
||||
const routesUrl = 'https://routes.googleapis.com/directions/v2:computeRoutes';
|
||||
const fieldMask = 'routes.distanceMeters,routes.duration,routes.polyline.encodedPolyline,routes.travelAdvisory.tollInfo';
|
||||
|
||||
const resToll = await axios.post(routesUrl, {
|
||||
travelMode: 'DRIVE',
|
||||
routingPreference: 'TRAFFIC_UNAWARE',
|
||||
origin: { address: origin },
|
||||
destination: { address: destination },
|
||||
routeModifiers: { avoidTolls: false }
|
||||
}, {
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'X-Goog-Api-Key': apiKey,
|
||||
'X-Goog-FieldMask': fieldMask,
|
||||
}
|
||||
});
|
||||
|
||||
const poly = resToll.data.routes[0].polyline.encodedPolyline;
|
||||
const ulysUrl = `https://api-ulys.azure-api.net/placemark/v2/legs?precision=5&includeLayersIds=GaresPeage`;
|
||||
|
||||
try {
|
||||
const res = await axios.post(ulysUrl, JSON.stringify(poly), {
|
||||
headers: { 'Content-Type': 'application/json' }
|
||||
});
|
||||
console.log("Ulys Response:");
|
||||
console.log(res.data);
|
||||
} catch(e) {
|
||||
console.log("Ulys Error:", e.message);
|
||||
if(e.response && e.response.data) console.log(e.response.data);
|
||||
}
|
||||
}
|
||||
directTestToulouse();
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,643 @@
|
||||
id_gare,nom,lat,lon
|
||||
09242,BEAUPONT,46.44094,5.26993
|
||||
10157,BELLEGARDE,46.11602,5.79506
|
||||
09147,SYLANS,46.15853,5.6484
|
||||
09146,ST MARTIN-DU-FRESNE,46.13243,5.54164
|
||||
09156,LA CROIX-CHALON,46.17772,5.5589
|
||||
09145,BOURG SUD,46.14563,5.28633
|
||||
09144,VIRIAT,46.23576,5.27355
|
||||
09149,SAINT GENIS,46.27197,5.01576
|
||||
09143,BOURG NORD,46.2599,5.16695
|
||||
09142,REPLONGES,46.30076,4.89584
|
||||
09141,FEILLENS,46.32883,4.88241
|
||||
09150,BEYNOST,45.82045,4.99411
|
||||
09153,LA BOISSE,45.82704,5.03146
|
||||
09253,LA COTIERE,45.83409,5.0324
|
||||
09251,LA BOISSE - MONTLUEL,45.8407,5.04702
|
||||
09422,MIONNAY,45.883,4.89889
|
||||
09151,BALAN,45.85092,5.09938
|
||||
09152,PEROUGES,45.86086,5.1813
|
||||
09154,AMBERIEU,45.97765,5.3127
|
||||
09155,PONT D AIN,46.04812,5.32788
|
||||
09443,CROTTET,46.28678,4.87001
|
||||
07144,CHATEAU-THIERRY,49.07832,3.39881
|
||||
07141,MONTREUIL,49.01321,3.15531
|
||||
07146,DORMANS,49.15379,3.71689
|
||||
07032,ST QUENTIN SUD,49.81227,3.29479
|
||||
07031,ST QUENTIN NORD,49.86139,3.24072
|
||||
07033,LA FERE,49.6872,3.46533
|
||||
07034,LAON,49.6078,3.66102
|
||||
07136,REIMS,49.32216,3.98417
|
||||
07135,GUIGNICOURT,49.42699,3.92801
|
||||
09062,FORET DE TRONCAIS,46.50647,2.63033
|
||||
09064,MONTMARAULT,46.32764,2.96645
|
||||
06060,MANOSQUE,43.80781,5.81289
|
||||
06059,ST PAUL LES DURANCE,43.70249,5.7346
|
||||
06061,LA BRILLANNE,43.92395,5.89373
|
||||
06063,PEYRUIS,44.03919,5.96354
|
||||
06065,AUBIGNOSC,44.12443,5.98428
|
||||
06064,AUBIGNOSC OUEST,44.12513,5.97854
|
||||
06067,SISTERON SUD,44.17168,5.95542
|
||||
06068,SISTERON NORD,44.2236,5.91579
|
||||
06014,ANTIBES OUEST,43.6028,7.07248
|
||||
06024,SOPHIA,43.60275,7.08124
|
||||
06022,ANTIBES PV NORD,43.60463,7.06645
|
||||
06023,ANTIBES EST SORTIE,43.60421,7.08636
|
||||
06017,CAGNES OUEST SUD,43.64321,7.13404
|
||||
06016,CAGNES EST,43.65933,7.14863
|
||||
06015,CAGNES OUEST,43.64804,7.13906
|
||||
06013,ANTIBES EST,43.60301,7.08397
|
||||
06019,ST ISIDORE ECH OUEST,43.70408,7.19005
|
||||
06025,MONACO,43.74513,7.37264
|
||||
06026,LA TURBIE ECH.,43.74346,7.37835
|
||||
04358,PAMIERS,43.15415,1.61603
|
||||
04357,MAZERES SAVERDUN,43.23448,1.63595
|
||||
09173,SAINT THIBAULT,48.22341,4.12962
|
||||
09174,TORVILLIERS,48.2844,3.96602
|
||||
09183,THENNELIERES,48.28933,4.16302
|
||||
09172,MAGNANT,48.17907,4.44056
|
||||
09171,VILLE SOUS LAFERTE,48.11496,4.78555
|
||||
09170,CHAUMONT-SEMOUTIERS,48.04283,5.05935
|
||||
07186,VALLEE DE L'AUBE,48.52551,4.18556
|
||||
07185,CHARMONT-S/BARBUISE,48.41039,4.14267
|
||||
04339,NARBONNE-SUD,43.16443,2.99012
|
||||
04338,NARBONNE-EST,43.17904,3.03496
|
||||
04340,SIGEAN,43.03314,2.95619
|
||||
04341,LEUCATE,42.93912,2.97304
|
||||
04350,CASTELNAUDARY,43.29079,1.94671
|
||||
04349,BRAM,43.23897,2.10001
|
||||
04348,CARCASSONNE-O,43.19993,2.31004
|
||||
04347,CARCASSONNE-E,43.20205,2.4182
|
||||
04346,LEZIGNAN,43.17187,2.74107
|
||||
04213,CAVAILLON,43.81988,5.02777
|
||||
04214,SENAS,43.74201,5.08971
|
||||
04215,SALON NORD,43.65943,5.10259
|
||||
04279,A8: AIX-EN-PROVENCE,43.55106,5.23769
|
||||
04278,COUDOUX,43.55294,5.23863
|
||||
06001,CANET DE MEYREUIL,43.49465,5.52496
|
||||
06035,CASSIS,43.22517,5.58151
|
||||
06034,LA CIOTAT ECH.,43.20208,5.59476
|
||||
06054,PERTUIS SUD,43.66218,5.49758
|
||||
06038,PAS DE TRETS,43.3863,5.6018
|
||||
06036,PONT DE L ETOILE,43.32437,5.59801
|
||||
04267,GRANS,43.62304,5.08354
|
||||
04266,SALON OUEST,43.6364,5.02274
|
||||
04219,SALON SUD,43.62598,5.1015
|
||||
08612,DOZULE FL ECH,49.22992,-0.08247
|
||||
08621,TROARN FL,49.1778,-0.20296
|
||||
08631,CAGNY FL,49.16833,-0.24512
|
||||
04536,ST-JEAN D'ANGELY,45.96286,-0.54589
|
||||
04537,SAINTES,45.75224,-0.66399
|
||||
04538,PONS,45.5745,-0.59558
|
||||
04540,SAINT-AUBIN,45.25434,-0.5478
|
||||
04539,MIRAMBEAU,45.37766,-0.57955
|
||||
04545,TONNAY-CHARENTE,45.95515,-0.88097
|
||||
05056,VIERZON-EST,47.2118,2.11835
|
||||
05055,VIERZON-NORD,47.24397,2.06412
|
||||
05057,BOURGES,47.04492,2.34171
|
||||
09061,ST AMAND-MONTROND,46.722,2.45831
|
||||
04118,MANSAC,45.15247,1.37821
|
||||
04123,TULLE NORD,45.32901,1.76396
|
||||
04124,TULLE EST,45.31812,1.85046
|
||||
04125,EGLETONS,45.40739,2.02119
|
||||
04126,USSEL OUEST,45.51246,2.25888
|
||||
04127,USSEL EST,45.58897,2.41459
|
||||
09111,BIERRE-LES-SEMUR,47.43663,4.30944
|
||||
09110,AVALLON,47.50932,3.99198
|
||||
09114,BEAUNE SUD,47.0024,4.85476
|
||||
09129,BEAUNE NORD,47.04201,4.85075
|
||||
09124,NUITS-ST-GEORGES,47.13099,4.96743
|
||||
09160,DIJON-ARC S/TILLE,47.34461,5.15933
|
||||
09126,DIJON-CRIMOLOIS,47.27707,5.13804
|
||||
09161,TIL CHATEL,47.53859,5.19472
|
||||
09139,SEURRE,47.02937,5.17033
|
||||
09130,SOIRANS,47.20534,5.305
|
||||
04104,MONTPON,44.98597,0.15622
|
||||
04105,MUSSIDAN SUD,45.01073,0.37757
|
||||
04107,MUSSIDAN EST,45.06515,0.43001
|
||||
04106,MUSSIDAN BARRIERE,45.06529,0.42986
|
||||
04114,THENON EST,45.15161,1.16785
|
||||
04112,THENON,45.15124,1.16747
|
||||
04116,LA BACHELLERIE SUD,45.14813,1.17472
|
||||
09128,L ISLE-S/LE-DOUBS,47.41251,6.58553
|
||||
09133,BAUME-LES-DAMES,47.37102,6.37965
|
||||
09131,BESANCON EST,47.33224,6.1513
|
||||
09134,BESANCON NORD,47.27603,5.98798
|
||||
09135,BESANCON OUEST,47.23478,5.89813
|
||||
04204,VALENCE-N,44.97018,4.88768
|
||||
04203,TAIN,45.06844,4.8685
|
||||
04205,VALENCE-S,44.90511,4.88009
|
||||
04206,LORIOL,44.75681,4.79136
|
||||
04207,MONTELIMAR-N,44.66896,4.79483
|
||||
04208,MONTELIMAR-S,44.48123,4.76353
|
||||
03092,LA BAUME D'HOSTUN,45.06467,5.20806
|
||||
03091,CHATUZANGE BARRIERE,45.02608,5.0969
|
||||
08532,HEUDEBOUVILLE FL ECH PARIS,49.19492,1.23192
|
||||
08551,BOURG ACHARD FL ECH,49.36642,0.81813
|
||||
08571,BOURNEVILLE FL ECH,49.37708,0.62672
|
||||
08581,TOUTAINVILLE FL ECH,49.36423,0.46766
|
||||
08592,BEUZEVILLE FL ECH PARIS,49.33757,0.36939
|
||||
12030,BROGLIE/ORBEC SENS 2,49.03165,0.44483
|
||||
12031,BROGLIE/ORBEC SENS 1,49.03719,0.4416
|
||||
12040,BERNAY,49.13768,0.57809
|
||||
12050,BRIONNE,49.24206,0.77249
|
||||
05306,ARTENAY,48.0843,1.8557
|
||||
05304,ALLAINES,48.20533,1.84601
|
||||
05605,CHARTRES-EST,48.45632,1.53784
|
||||
05607,THIVARS,48.36159,1.44648
|
||||
05609,LUIGNY,48.23459,1.03313
|
||||
05608,ILLIERS-COMBRAY,48.29444,1.27031
|
||||
04222,REMOULINS,43.93725,4.5982
|
||||
04221,ROQUEMAURE,44.02563,4.73546
|
||||
04224,NIMES-O,43.81363,4.34275
|
||||
04223,NIMES-E,43.85615,4.42069
|
||||
04275,LUNEL,43.70284,4.11962
|
||||
04225,GALLARGUES,43.7229,4.18087
|
||||
04260,NIMES CENTRE,43.80757,4.37448
|
||||
04261,GARONS,43.76132,4.42753
|
||||
04356,NAILLOUX,43.38237,1.61688
|
||||
04352,MONTGISCARD,43.46088,1.58831
|
||||
04351,VILLEFRANCHE,43.39858,1.6962
|
||||
04458,SAINT-JORY,43.71824,1.39796
|
||||
04455,EUROCENTRE,43.76503,1.38044
|
||||
04646,MONTREJEAU,43.10017,0.59546
|
||||
04644,LANNEMEZAN,43.09782,0.39023
|
||||
04648,ST GAUDENS,43.11568,0.7566
|
||||
04650,LESTELLE,43.12029,0.89548
|
||||
04651,LESTELLE ST MARTORY,43.11773,0.89297
|
||||
04470,L'UNION,43.64518,1.49797
|
||||
04467,PODENSAC,44.60754,-0.36681
|
||||
04466,LANGON,44.54422,-0.26201
|
||||
04465,LA REOLE,44.51137,-0.04954
|
||||
04464,MARMANDE,44.43479,0.13293
|
||||
04101,ARVEYRES,44.88514,-0.26839
|
||||
04102,LIBOURNE NORD,44.95703,-0.24522
|
||||
04103,COUTRAS,45.012,-0.09983
|
||||
04276,BAILLARGUES,43.67053,4.01301
|
||||
04333,SETE,43.47755,3.68525
|
||||
04331,MONTPELLIER ST-JEAN,43.56153,3.8305
|
||||
04335,AGDE-PEZENAS,43.37414,3.41816
|
||||
04334,BEZIERS CABRIALS,43.3433,3.28907
|
||||
04337,BEZIERS-OUEST,43.30445,3.2191
|
||||
05318,AMBOISE CH.RENAULT,47.54281,0.98489
|
||||
05320,TOURS-C/MONNAIE,47.49058,0.81927
|
||||
05486,TOURS-NORD,47.45219,0.73926
|
||||
05490,CHAMBRAY,47.34906,0.70388
|
||||
05485,LA THIBAUDIERE,47.33078,0.68772
|
||||
05484,MONTS - SORIGNY,47.25456,0.67091
|
||||
05524,SAINTE MAURE,47.10728,0.58766
|
||||
05522,TOURS-C/SORIGNY,47.21845,0.65771
|
||||
05478,NEUILLE PONT PIERRE,47.55541,0.59565
|
||||
05967,BOURGUEIL,47.25319,0.16665
|
||||
05960,VIVY,47.31056,-0.03177
|
||||
05014,BLERE,47.28654,0.98447
|
||||
04216,AUBERIVES,45.3898,4.80535
|
||||
04202,CHANAS,45.32115,4.80972
|
||||
03022,CROLLES BRIGNOUD,45.2716,5.90105
|
||||
03023,LE TOUVET,45.34745,5.96371
|
||||
03021,CROLLES BARRIERE,45.27169,5.90089
|
||||
03024,PONTCHARRA,45.42579,5.99511
|
||||
03071,CHESNES,45.65572,5.09788
|
||||
03002,ST QUENTIN FAL. BRETELLE,45.64785,5.11979
|
||||
03062,VILLEFONTAINE,45.62843,5.16432
|
||||
03003,ISLE D'ABEAU CENTRE,45.60516,5.2344
|
||||
03004,BOURGOIN,45.58235,5.30027
|
||||
03005,LA TOUR DU PIN,45.56194,5.42886
|
||||
03072,LA TOUR DU PIN EST,45.55669,5.46452
|
||||
03006,LES ABRETS,45.57134,5.60416
|
||||
03061,SAINT GENIX SUR GUIERS,45.57277,5.65913
|
||||
03085,RIVES,45.38415,5.47313
|
||||
03086,VOIRON,45.34763,5.56633
|
||||
03083,MOIRANS NORD,45.32415,5.60512
|
||||
03087,VOREPPE BARRIERE,45.28323,5.622
|
||||
03084,MOIRANS,45.32035,5.60783
|
||||
03095,TULLINS,45.287,5.52175
|
||||
03093,SAINT MARCELLIN,45.13824,5.32621
|
||||
03094,VINAY,45.19954,5.41944
|
||||
09136,GENDREY,47.18353,5.70894
|
||||
09137,DOLE,47.1361,5.50619
|
||||
09138,CHOISEY,47.06457,5.44674
|
||||
09238,ARLAY,46.77782,5.51859
|
||||
09240,BEAUREPAIRE,46.66637,5.41894
|
||||
04907,BENESSE,43.62393,-1.40031
|
||||
04906,CAPBRETON,43.63235,-1.39224
|
||||
04908,ONDRES,43.54151,-1.4356
|
||||
04624,PEYREHORADE,43.51704,-1.10384
|
||||
04687,SALIES,43.5098,-0.92187
|
||||
05314,MER,47.72856,1.50862
|
||||
05312,MEUNG SUR LOIRE,47.8328,1.669
|
||||
05316,BLOIS,47.62149,1.34635
|
||||
05053,LAMOTTE-BEUVRON,47.58173,1.99103
|
||||
05054,SALBRIS,47.41849,2.0257
|
||||
05013,ST ROMAIN SUR CHER,47.30652,1.35312
|
||||
05011,CHEMERY,47.32467,1.50014
|
||||
05010,VILLEFRANCHE S/ CHER,47.32452,1.76561
|
||||
04178,MONTBRISON,45.63736,4.19611
|
||||
04177,FEURS,45.73754,4.18636
|
||||
04174,NOIRETABLE,45.84935,3.79423
|
||||
04175,ST GERMAIN L.,45.86092,4.04202
|
||||
04180,BALBIGNY,45.84111,4.16441
|
||||
05246,ANCENIS/NANTES,47.40254,-1.19352
|
||||
05245,ANGERS/ANCENIS,47.40243,-1.1935
|
||||
05248,NANTES/ANCENIS,47.39927,-1.19276
|
||||
04556,AIGREFEUILLE,47.0693,-1.43729
|
||||
04557,BIGNON,47.11481,-1.49175
|
||||
05309,GIDY,47.96698,1.85157
|
||||
05308,ORLEANS-NORD,47.94948,1.85462
|
||||
14380,SAVIGNY /CLAIRIS,48.05598,3.08802
|
||||
14375,ST HILAIRE,48.03677,3.02262
|
||||
14365,GONDREVILLE A77/S,48.06084,2.66766
|
||||
14370,FONTENAY /LOING,48.0642,2.76711
|
||||
14360,GONDREVILLE A77/N,48.0608,2.66765
|
||||
14355,AUXY,48.08539,2.47274
|
||||
14350,ESCRENNES,48.11633,2.19111
|
||||
05052,OLIVET,47.84093,1.86936
|
||||
05050,ORLEANS-CENTRE,47.89819,1.85323
|
||||
09404,LE TOURNEAU,47.99293,2.67768
|
||||
04408,MARTEL,44.99329,1.53144
|
||||
04406,SOUILLAC,44.90066,1.50424
|
||||
04405,LABASTIDE MURAT,44.69812,1.58057
|
||||
04404,CAHORS NORD,44.53225,1.50626
|
||||
04403,CAHORS SUD,44.34273,1.49406
|
||||
04463,AIGUILLON,44.28452,0.26986
|
||||
04469,Agen Ouest,44.1875,0.54602
|
||||
04462,AGEN,44.16498,0.60573
|
||||
04783,SEICHES,47.56645,-0.32803
|
||||
04782,DURTAL,47.66779,-0.25964
|
||||
04784,CORZE,47.53933,-0.3408
|
||||
05280,ST JEAN DE LINIERES,47.46658,-0.68606
|
||||
05274,SAINT GERMAIN,47.43168,-0.81633
|
||||
05958,BEAUFORT,47.46812,-0.19348
|
||||
05959,LONGUE,47.40448,-0.11597
|
||||
04561,THOUARCE,47.3295,-0.59635
|
||||
04563,CHEMILLE,47.23593,-0.72764
|
||||
04564,CHOLET NORD,47.08333,-0.82795
|
||||
04565,CHOLET SUD,47.01894,-0.88073
|
||||
07190,REIMS EST,49.21144,4.07834
|
||||
07154,REIMS SUD,49.20521,4.00643
|
||||
07191,CHALONS LA VEUVE,49.04479,4.32266
|
||||
07189,ST GIBRIEN,48.97356,4.28868
|
||||
07192,CHALONS MOURMELON,49.04094,4.32093
|
||||
07193,ST ETIENNE AU TEMPLE,49.03349,4.43586
|
||||
07194,STE MENEHOULD,49.0764,4.88366
|
||||
07616,CLERMONT EN ARGONNE,49.09443,5.10176
|
||||
07137,LA NEUVILLETTE,49.29793,3.99801
|
||||
07188,MONT CHOISY,48.91073,4.28809
|
||||
07187,SOMMESOUS,48.73061,4.22984
|
||||
07633,VATRY,48.76782,4.24012
|
||||
09162,LANGRES SUD,47.79236,5.22621
|
||||
09163,LANGRES NORD,47.93512,5.28682
|
||||
09164,MONTIGNY-LE-ROI,47.99736,5.51194
|
||||
05821,VAIGES,48.05551,-0.48728
|
||||
05823,LAVAL-EST,48.10762,-0.73857
|
||||
05825,LAVAL-OUEST,48.10462,-0.83436
|
||||
07198,JARNY,49.19991,5.90167
|
||||
07199,BEAUMONT,49.19882,5.92401
|
||||
09168,COLOMBEY-LES-BELLES,48.54066,5.90884
|
||||
07195,VOIE SACREE,49.09382,5.27836
|
||||
07196,VERDUN,49.11096,5.41385
|
||||
07197,FRESNES EN WOEVRE,49.12909,5.62133
|
||||
07177,STE-MARIE,49.19333,5.98902
|
||||
07716,BOULAY,49.1411,6.46657
|
||||
07719,ST AVOLD,49.13582,6.71291
|
||||
07721,FAREBERSVILLER,49.10816,6.85335
|
||||
07707,PUTTELANGE,49.06986,6.91814
|
||||
07701,LOUPERSHOUSE,49.07553,6.89666
|
||||
07702,SARREGUEMINES,49.04476,7.02883
|
||||
07704,PHALSBOURG,48.77206,7.24069
|
||||
07705,SAVERNE,48.76172,7.38999
|
||||
07029,MARQUION,50.20249,3.10689
|
||||
07017,CAMBRAI,50.17563,3.19272
|
||||
07030,MASNIERES,50.06855,3.17244
|
||||
07005,SENLIS BONSECOURS,49.20703,2.60921
|
||||
07006,SENLIS,49.2154,2.62813
|
||||
07007,PONT STE MAXENCE,49.32069,2.69478
|
||||
07008,COMPIEGNE OUEST,49.39898,2.69922
|
||||
07009,RESSONS,49.52169,2.71574
|
||||
07414,MERU,49.21073,2.15071
|
||||
07415,BEAUVAIS CENTRE,49.39922,2.12564
|
||||
07416,BEAUVAIS NORD,49.43377,2.12615
|
||||
07417,HARDIVILLERS,49.60999,2.20284
|
||||
05142,ALENCON NORD,48.45298,0.12411
|
||||
17111,Entrée SEES,48.63813,0.18495
|
||||
12210,ARGENTAN,48.63284,0.1909
|
||||
12020,GACE SENS 2,48.77175,0.30896
|
||||
12021,GACE SENS 1,48.77694,0.30347
|
||||
07012,ALBERT,49.96568,2.86338
|
||||
07013,BAPAUME,50.1042,2.8679
|
||||
07014,ARRAS,50.2694,2.86387
|
||||
07434,BERCK,50.41161,1.6899
|
||||
07436,ETAPLES-LE TOUQUET,50.50672,1.68025
|
||||
07437,NEUFCHATEL HARDELOT,50.61112,1.64983
|
||||
07438,BOULOGNE SUD,50.67396,1.65981
|
||||
07021,VALLEE DE LA HEM,50.82097,2.06379
|
||||
07022,ST-OMER B,50.7229,2.16749
|
||||
07020,CALAIS,50.71905,2.17249
|
||||
07024,AIRE SUR LA LYS,50.66821,2.25608
|
||||
07023,ST-OMER,50.71935,2.1729
|
||||
07025,LILLERS,50.55304,2.46281
|
||||
07026,BETHUNE,50.514,2.61776
|
||||
07060,NOEUX LES MINES,50.4869,2.68389
|
||||
07027,LIEVIN,50.43782,2.70728
|
||||
07015,DOURGES,50.32504,2.9107
|
||||
07028,ARRAS,50.34517,2.7875
|
||||
09076,COMBRONDE,45.99599,3.10472
|
||||
09077,RIOM,45.89546,3.14816
|
||||
09078,GERZAT-VILLE,45.84223,3.15962
|
||||
04128,ST JULIEN SANCY,45.66634,2.68254
|
||||
04129,VULCANIA BROMONT,45.8339,2.82261
|
||||
04130,MANZAT,45.95393,2.98285
|
||||
04171,LEZOUX,45.84864,3.38363
|
||||
04172,THIERS-OUEST,45.86003,3.50381
|
||||
04173,THIERS-EST,45.87882,3.62491
|
||||
04905,BAYONNE SUD,43.4623,-1.49849
|
||||
04903,BIARRITZ,43.45046,-1.55445
|
||||
04982,ST JEAN DE LUZ NORD,43.37193,-1.67494
|
||||
04902,ST JEAN DE LUZ SUD,43.37196,-1.67775
|
||||
04620,GUICHE,43.51222,-1.22266
|
||||
04689,ORTHEZ,43.46716,-0.74861
|
||||
04691,LESCAR,43.34524,-0.4188
|
||||
04690,ARTIX,43.39508,-0.55123
|
||||
04692,PAU CENTRE,43.33051,-0.35045
|
||||
04695,TARBES OUEST,43.22081,0.02358
|
||||
04638,TARBES EST,43.21372,0.10822
|
||||
04640,TOURNAY,43.17743,0.23992
|
||||
04642,CAPVERN,43.10327,0.34273
|
||||
04342,PERPIGNAN-NORD,42.7818,2.89739
|
||||
04343,PERPIGNAN-SUD,42.66674,2.85891
|
||||
04344,LE BOULOU,42.52366,2.81767
|
||||
07703,SARRE UNION,48.91392,7.12449
|
||||
07708,HOCHFELDEN OUEST,48.76926,7.60208
|
||||
09221,VILLEFRANCHE-NORD,46.02229,4.72208
|
||||
09120,BELLEVILLE S/SAONE,46.1038,4.75047
|
||||
09121,VILLEFRANCHE-VILLE,45.97728,4.73366
|
||||
04268,CONDRIEU ENTREE,45.50581,4.84228
|
||||
04269,CONDRIEU SORTIE,45.50521,4.83904
|
||||
09421,GENAY,45.90029,4.81942
|
||||
04181,TARARE OUEST,45.89156,4.4031
|
||||
04183,TARARE EST F,45.87151,4.50903
|
||||
04184,TARARE EST ENTREE O,45.87624,4.52202
|
||||
09115,CHALON CENTRE,46.80244,4.82981
|
||||
09116,CHALON SUD,46.75343,4.83299
|
||||
09117,TOURNUS,46.57911,4.90124
|
||||
09140,MACON CENTRE,46.3382,4.84688
|
||||
09118,MACON NORD,46.36589,4.83918
|
||||
09119,MACON SUD,46.28308,4.79296
|
||||
09241,LE MIROIR,46.54741,5.32655
|
||||
05611,LA FERTE BERNARD,48.14989,0.68724
|
||||
05612,CONNERRE,48.07532,0.47932
|
||||
05617,LE MANS-OUEST,48.0217,0.12745
|
||||
05615,LE MANS NORD,48.05045,0.17391
|
||||
04780,LE MANS SUD,47.97373,0.05757
|
||||
04781,SABLE LA FLECHE,47.77553,-0.20865
|
||||
05169,MONTABON,47.68608,0.3714
|
||||
05168,ECOMMOY,47.82037,0.30169
|
||||
05153,PARIGNE L'EVEQUE,47.95569,0.32017
|
||||
05151,AUVOURS,48.0047,0.31254
|
||||
05131,MARESCHE,48.1967,0.16871
|
||||
05133,ROUESSE FONTAINE,48.31156,0.13349
|
||||
05143,ALENCON SUD,48.39788,0.1047
|
||||
05819,JOUE EN CHARNIE,48.00434,-0.21729
|
||||
03008,CHAMBERY NORD,45.60265,5.88708
|
||||
03009,AIX SUD,45.65367,5.92169
|
||||
03007,AIGUEBELETTE,45.57691,5.79935
|
||||
03027,CHIGNIN BRETELLE,45.5092,6.00634
|
||||
03025,CHIGNIN LES MARCHES,45.50898,6.00623
|
||||
03031,MONTMELIAN,45.49492,6.05763
|
||||
03032,SAINT PIERRE D'ALBIGNY,45.54852,6.1603
|
||||
03033,AITON,45.55604,6.24815
|
||||
03034,STE HELENE BARRIERE,45.61976,6.31206
|
||||
02050,ST PIERRE DE BELLEVILLE,45.46979,6.28709
|
||||
02051,STE MARIE DE CUINES,45.34596,6.30541
|
||||
02052,HERMILLON,45.29886,6.35492
|
||||
02053,ST JULIEN MONTDENIS,45.25162,6.39687
|
||||
02054,ST MICHEL ECHANGEUR,45.21844,6.45893
|
||||
02057,ST MICHEL-MODANE,45.21651,6.46586
|
||||
10002,CLUSES AMONT,46.04652,6.59638
|
||||
10003,CLUSES AVAL,46.04893,6.58956
|
||||
10004,SCIONZIER,46.06839,6.55374
|
||||
10012,BONNEVILLE OUEST,46.07345,6.38294
|
||||
10158,ELOISE,46.06521,5.8639
|
||||
03011,RUMILLY,45.81591,6.00686
|
||||
03020,SEYNOD SUD,45.84596,6.05773
|
||||
03012,ANNECY CENTRE,45.89783,6.09258
|
||||
03013,ANNECY NORD,45.93882,6.11694
|
||||
03014,ALLONZIER,45.98984,6.12869
|
||||
03016,CRUSEILLES A 410,45.99337,6.12816
|
||||
08311,ST ROMAIN SO,49.55165,0.33583
|
||||
08322,ST ROMAIN SF,49.55101,0.33873
|
||||
08341,BOLBEC,49.58133,0.44307
|
||||
08351,FECAMP,49.63236,0.64
|
||||
08361,YVETOT,49.62746,0.80626
|
||||
08371,YERVILLE,49.64775,0.84262
|
||||
08381,BEAUTOT,49.6353,1.05065
|
||||
08391,COTTEVRARD,49.64675,1.24268
|
||||
07443,AUMALE OUEST,49.75625,1.69842
|
||||
07444,AUMALE EST,49.75939,1.7031
|
||||
07172,ST-JEAN LES 2 JUMEAU,48.9469,3.03972
|
||||
07174,MONTREUIL AUX LIONS (19),49.01316,3.1554
|
||||
09178,CHATILLON-LABORDE,48.54222,2.79737
|
||||
09179,ST-GERMAIN-LAXIS,48.58811,2.72483
|
||||
09176,MAROLLES-SUR-SEINE,48.38015,3.02023
|
||||
09177,FORGES,48.42142,2.94341
|
||||
09102,URY,48.33869,2.59548
|
||||
09104,NEMOURS,48.26951,2.7133
|
||||
09103,FONTAINEBLEAU,48.28882,2.68315
|
||||
09201,VAL DE LOING-SOUPPES,48.17632,2.76729
|
||||
09403,DORDIVES,48.17139,2.76706
|
||||
05198,DOURDAN,48.56902,1.99025
|
||||
05302,ALLAINVILLE,48.45643,1.90827
|
||||
05603,ABLIS,48.52877,1.83225
|
||||
05601,LA FOLIE-B/PARIS,48.55324,1.93062
|
||||
08511,CHAMBOURCY FL,48.9118,2.04672
|
||||
04533,SOUDAN,46.4255,-0.08208
|
||||
04534,NIORT EST,46.35524,-0.33118
|
||||
04547,VOUILLE,46.30743,-0.36642
|
||||
04535,NIORT-S,46.244,-0.46061
|
||||
04548,NIORT NORD,46.41932,-0.39707
|
||||
07010,ROYE,49.70606,2.76919
|
||||
07053,GARE TGV,49.85555,2.83067
|
||||
07011,PERONNE,49.87697,2.83976
|
||||
07418,ESSERTAUX,49.73973,2.22877
|
||||
07422,SALOUEL,49.85977,2.21381
|
||||
07420,AMIENS SUD,49.85416,2.25022
|
||||
07425,AMIENS OUEST,49.89176,2.23839
|
||||
07426,AMIENS NORD,49.93383,2.24381
|
||||
07428,FLIXECOURT,50.02951,2.06974
|
||||
07431,ABBEVILLE NORD,50.13538,1.81102
|
||||
07430,ABBEVILLE EST,50.09981,1.86941
|
||||
07432,COTE PICARDE,50.25441,1.74658
|
||||
07446,POIX-DE-PICARDIE,49.80846,1.96876
|
||||
07052,VILLERS BRETONNEUX,49.85496,2.52207
|
||||
07054,ATHIES,49.83871,2.98978
|
||||
04402,CAUSSADE,44.14993,1.51564
|
||||
04461,VALENCE D'AGEN,44.06418,0.86653
|
||||
04460,CASTELSARRASIN,44.0558,1.09731
|
||||
04459,MONTAUBAN,43.92898,1.31427
|
||||
06003,POURRIERES,43.47756,5.75573
|
||||
06004,ST.MAXIMIN,43.44938,5.87706
|
||||
06007,LE MUY,43.46068,6.55084
|
||||
06008,PUGET ECHANGEUR,43.45693,6.68943
|
||||
06049,FREJUS OUEST,43.46935,6.72917
|
||||
06010,FREJUS,43.47221,6.74342
|
||||
06032,BANDOL ECH.,43.14438,5.76866
|
||||
06042,PUGET VILLE,43.25791,6.12263
|
||||
06046,CARNOULES,43.29345,6.20046
|
||||
06006,CANNET DES MAURES,43.39342,6.35218
|
||||
04209,BOLLENE,44.29026,4.75111
|
||||
04217,ORANGE-N,44.16422,4.76458
|
||||
04210,ORANGE,44.13527,4.79569
|
||||
04218,ORANGE-S,44.11089,4.84525
|
||||
04211,AVIGNON-N,43.9819,4.88828
|
||||
04212,AVIGNON-S,43.89289,4.91565
|
||||
04555,MONTAIGU,46.9596,-1.35294
|
||||
04554,LES ESSARTS,46.79043,-1.19453
|
||||
04553,CHANTONNAY,46.62728,-1.15449
|
||||
04552,STE HERMINE,46.5336,-1.07897
|
||||
04550,FONTENAY CENTRE,46.43595,-0.82151
|
||||
04570,FONTENAY OUEST,46.46462,-0.87667
|
||||
04549,NIORT OUEST,46.38784,-0.64788
|
||||
04566,LA VERRIE,46.94473,-0.9765
|
||||
04567,LES HERBIERS,46.90208,-1.04676
|
||||
05528,CHATELLERAULT-SUD,46.77866,0.50452
|
||||
05526,CHATELLERAULT-NORD,46.83697,0.53082
|
||||
05530,POITIERS-NORD,46.62136,0.34394
|
||||
05529,FUTUROSCOPE,46.67011,0.35987
|
||||
05532,POITIERS-SUD,46.54907,0.28938
|
||||
09265,ROBECOURT,48.14478,5.68904
|
||||
09166,BULGNEVILLE,48.21578,5.8325
|
||||
09167,CHATENOIS,48.29947,5.85293
|
||||
09175,VULAINES,48.23784,3.60136
|
||||
09184,ST-DENIS-LES-SENS,48.23696,3.26209
|
||||
09105,COURTENAY,48.0598,3.09537
|
||||
09106,JOIGNY,47.9397,3.24406
|
||||
09107,AUXERRE NORD,47.85162,3.54878
|
||||
09108,AUXERRE SUD,47.79676,3.65284
|
||||
09109,NITRY,47.65906,3.87958
|
||||
09181,VILLENEUVE-DONDAGRE,48.14968,3.17133
|
||||
07002,CHANTILLY,49.08425,2.55161
|
||||
07018,THUN L'EVEQUE,50.22928,3.27218
|
||||
07171,COUTEVROULT,48.85356,2.83874
|
||||
07140,MONTREUIL AUX LIONS,49.00953,3.14581
|
||||
07718,ST AVOLD,49.1362,6.70162
|
||||
09180,LES EPRUNES,48.58892,2.65679
|
||||
09101,FLEURY-EN-BIERE,48.42582,2.53979
|
||||
09112,POUILLY-EN-AUXOIS,47.25241,4.56116
|
||||
04288,VIENNE SUD,45.47464,4.83439
|
||||
04201,VIENNE,45.47693,4.83243
|
||||
04220,LANCON,43.59398,5.17255
|
||||
06002,LA BARQUE,43.48327,5.53839
|
||||
04345,LE PERTHUS,42.52788,2.82113
|
||||
04390,LE BOULOU (O),42.52367,2.81752
|
||||
04541,VIRSAC,45.02368,-0.43507
|
||||
08521,BUCHELAY FL,48.99097,1.64331
|
||||
08611,DOZULE FL,49.22841,-0.08116
|
||||
08501,MONTESSON FL,48.91429,2.15109
|
||||
07413,AMBLAINVILLE,49.20513,2.1689
|
||||
07439,HERQUELINGUE,50.68885,1.64206
|
||||
04401,MONTAUBAN NORD,44.05229,1.41021
|
||||
05177,ST CHRISTOPHE,47.63838,0.49703
|
||||
12010,SEES,48.63297,0.19109
|
||||
12060,ROUMOIS,49.35396,0.83522
|
||||
08601,QUETTEVILLE FL,49.32057,0.31114
|
||||
07451,JULES VERNE,49.85868,2.39867
|
||||
09169,GYE,48.62975,5.88358
|
||||
09431,FONTAINE-LARIVIERE,47.6758,6.98183
|
||||
09132,SAINT MAURICE,47.4255,6.67126
|
||||
10011,NANGY,46.15316,6.29518
|
||||
10159,VIRY,46.12023,6.00951
|
||||
06070,LA SAULCE,44.44035,6.0286
|
||||
03041,LE CROZET,45.04556,5.67876
|
||||
06037,AURIOL,43.36689,5.64395
|
||||
04262,ARLES,43.69045,4.5449
|
||||
04265,SAINT MARTIN DE CRAU,43.63771,4.85783
|
||||
04355,TOULOUSE-SUD/EST,43.5449,1.50046
|
||||
04468,SAINT-SELVE,44.65901,-0.45426
|
||||
04457,TOULOUSE-NORD/OUEST,43.65838,1.42803
|
||||
04456,TOULOUSE-NORD/EST,43.65805,1.42699
|
||||
19001,BPV SAUGNAC,44.34693,-0.85998
|
||||
19003,BPV CASTETS,43.83527,-1.18061
|
||||
04901,BIRIATOU,43.34098,-1.74938
|
||||
04622,SAMES,43.52955,-1.18678
|
||||
04476,MURET,43.50526,1.35223
|
||||
18001,BAZAS,44.44527,-0.24235
|
||||
18002,CAPTIEUX,44.28603,-0.22806
|
||||
18003,ROQUEFORT,44.04489,-0.34321
|
||||
18004,MONT DE MARSAN,43.94698,-0.39392
|
||||
18006,AIRE SUR L'ADOUR N,43.72216,-0.27088
|
||||
18007,AIRE SUR L'ADOUR S,43.66454,-0.27668
|
||||
18008,GARLIN,43.56528,-0.29261
|
||||
18009,THEZE,43.47137,-0.32105
|
||||
04472,TOULOUSE EST,43.64715,1.50782
|
||||
09063,MONTLUCON,46.39634,2.71132
|
||||
04179,VEAUCHETTE,45.56095,4.24203
|
||||
13001,VIADUC DE MILLAU,44.13397,3.02535
|
||||
09405,MYENNES,47.43731,2.94081
|
||||
05827,LA GRAVELLE VITRE,48.08263,-1.02758
|
||||
05968,RESTIGNE,47.27017,0.25391
|
||||
05016,VEIGNE,47.31191,0.7353
|
||||
05015,ESVRES,47.30717,0.79607
|
||||
05713,VELIZY,48.7828,2.15728
|
||||
05712,VAUCRESSON,48.83241,2.14747
|
||||
05711,RUEIL,48.86991,2.15805
|
||||
04562,BEAULIEU SUR LAYON,47.32641,-0.60428
|
||||
04568,LA ROCHE SUR YON,46.67234,-1.34583
|
||||
17112,Sortie SEES,48.63603,0.1844
|
||||
17114,RONAI vers SEES,48.81632,-0.12945
|
||||
17113,RONAI vers FALAISE,48.8164,-0.12919
|
||||
17116,Sortie NECY,48.82346,-0.13664
|
||||
04122,ST GERMAIN LES VERGN,45.28384,1.61737
|
||||
04170,LES MARTRES ARTIERE,45.8278,3.24112
|
||||
08561,BOURNEVILLE FL,49.38496,0.60381
|
||||
20001,BOUVILLE,49.54825,0.92179
|
||||
08541,INCARVILLE FL,49.24809,1.17938
|
||||
09125,DIJON SUD,47.26023,5.03208
|
||||
07152,REIMS OUEST(THILLOIS,49.24947,3.95591
|
||||
09239,BERSAILLIN,46.84932,5.57458
|
||||
09165,GROISSIAT,46.22366,5.6142
|
||||
09065,GANNAT,46.0981,3.13554
|
||||
09465,VICHY,46.13841,3.3513
|
||||
04544,CABARIOT,45.94391,-0.84935
|
||||
08211,PONT DE TANCARVILLE,49.46365,0.47404
|
||||
04801,PYRENEES ORIENTALES,42.53958,1.82401
|
||||
08222,PONT DE NORMANDIE,49.45001,0.2717
|
||||
06021,ST.ISIDORE ECH. EST,43.70655,7.19071
|
||||
06028,LAGHET,43.7454,7.37858
|
||||
06055,MEYRARGUES,43.66118,5.50356
|
||||
06056,PERTUIS NORD,43.66162,5.5034
|
||||
06039,BELCODENE,43.41783,5.5752
|
||||
08593,BEUZEVILLE FL ECH CAEN,49.33906,0.36807
|
||||
05247,ANCENIS/ANGERS,47.39936,-1.19277
|
||||
05273,VIEILLEVILLE,47.29114,-1.4804
|
||||
07722,HOCHFELDEN,48.76874,7.60218
|
||||
03010,AIX NORD,45.71614,5.92225
|
||||
10014,BONNEVILLE EST,46.07018,6.42445
|
||||
08321,EPRETOT BPV,49.55172,0.3355
|
||||
06005,BRIGNOLES,43.4191,6.06505
|
||||
06011,LES ADRETS,43.54408,6.81245
|
||||
07001,ROISSY CDG,49.21556,2.62796
|
||||
07706,SCHWINDRATZHEIM,48.76953,7.60203
|
||||
09122,VILLEFRANCHE-LIMAS,45.97344,4.73193
|
||||
06009,CAPITOU,43.46857,6.72924
|
||||
06012,ANTIBES P/V,43.60255,7.0783
|
||||
06027,LA TURBIE P/V,43.74367,7.37827
|
||||
06020,ST.ISIDORE P/V,43.70752,7.19138
|
||||
05270,ANCENIS BARRIERE,47.40069,-1.19587
|
||||
08531,HEUDEBOUVILLE FL,49.19512,1.23011
|
||||
08591,BEUZEVILLE FL,49.33815,0.3678
|
||||
08533,HEUDEBOUVILLE FL ECH CAEN,49.19667,1.22974
|
||||
04407,GIGNAC,44.99076,1.52646
|
||||
07441,HAUDRICOURT,49.75948,1.70294
|
||||
10001,CLUSES,46.04695,6.5966
|
||||
03026,CHIGNIN BARRIERE,45.51256,6.00209
|
||||
02056,ST MICHEL BARRIERE,45.21869,6.45903
|
||||
03001,ST QUENTIN FAL. BARRIERE,45.64866,5.12021
|
||||
06033,LA CIOTAT P/V,43.20485,5.59054
|
||||
06031,BANDOL P/V,43.14628,5.77188
|
||||
04354,TOULOUSE-SUD/OUEST,43.54469,1.50019
|
||||
04904,LA NEGRESSE,43.44839,-1.55338
|
||||
09079,CLERMONT-BARRIERE,45.84133,3.16053
|
||||
17115,Entrée NECY,48.8235,-0.13463
|
||||
04182,ST ROMAIN POPEY,45.87177,4.50891
|
||||
07150,REIMS NORD,49.24633,3.96251
|
||||
03015,ST MARTIN BELLEVUE A410,45.98981,6.12837
|
||||
|
Reference in New Issue
Block a user