Spaces:
Running
Running
Add 2 files
Browse files- index.html +28 -20
- prompts.txt +2 -1
index.html
CHANGED
@@ -173,7 +173,7 @@
|
|
173 |
|
174 |
<div class="bg-slate-700/50 p-3 rounded-lg">
|
175 |
<div class="text-sm text-slate-400">Huso</div>
|
176 |
-
<div id="utm-zone" class="font-mono text-blue-400">
|
177 |
</div>
|
178 |
</div>
|
179 |
</div>
|
@@ -273,12 +273,12 @@
|
|
273 |
const ssoBtn = document.getElementById('sso-btn');
|
274 |
const calidadBtn = document.getElementById('calidad-btn');
|
275 |
|
276 |
-
// Constants for UTM Zone
|
277 |
const UTM_ZONE = 18;
|
278 |
-
const UTM_ZONE_LETTER = '
|
279 |
-
const FALSE_EASTING = 500000;
|
280 |
-
const FALSE_NORTHING = 10000000; // For southern hemisphere
|
281 |
-
const SCALE_FACTOR = 0.9996;
|
282 |
const EQUATORIAL_RADIUS = 6378137.0; // WGS84 equatorial radius in meters
|
283 |
const FLATTENING = 1 / 298.257223563; // WGS84 flattening
|
284 |
|
@@ -471,30 +471,33 @@
|
|
471 |
marker.setLatLng([lat, lng]);
|
472 |
}
|
473 |
|
474 |
-
// Convert to UTM Zone
|
475 |
-
const utm =
|
476 |
|
477 |
// Update UTM display
|
478 |
if (utmCoords) utmCoords.textContent = `Este: ${utm.easting.toFixed(2)}m, Norte: ${utm.northing.toFixed(2)}m`;
|
479 |
-
if (utmZone) utmZone.textContent = `
|
480 |
|
481 |
return utm;
|
482 |
}
|
483 |
|
484 |
-
function
|
485 |
-
// This is a simplified UTM conversion for Zone
|
486 |
// Based on Karney's algorithm (simplified for demo purposes)
|
487 |
|
488 |
-
// Check if longitude is within zone
|
489 |
if (lng < -78 || lng >= -72) {
|
490 |
-
console.warn(`Longitud ${lng}° está fuera del huso
|
491 |
}
|
492 |
|
|
|
|
|
|
|
493 |
// Convert to radians
|
494 |
const latRad = lat * Math.PI / 180;
|
495 |
const lngRad = lng * Math.PI / 180;
|
496 |
|
497 |
-
// Central meridian for zone
|
498 |
const lng0Rad = (-75) * Math.PI / 180;
|
499 |
|
500 |
// Calculate delta longitude
|
@@ -518,9 +521,14 @@
|
|
518 |
const easting = FALSE_EASTING + k0 * A * etaPrim * (1 +
|
519 |
(etaPrim*etaPrim)/6 * (1 - t*t + (etaPrim*etaPrim)/20 * (5 - 18*t*t + t*t*t*t + 14*etaPrim*etaPrim - 58*t*t*etaPrim*etaPrim)));
|
520 |
|
521 |
-
|
522 |
(etaPrim*etaPrim)/2 * (1 + (etaPrim*etaPrim)/12 * (5 - t*t + 9*etaPrim*etaPrim + 4*etaPrim*etaPrim*etaPrim*etaPrim)));
|
523 |
|
|
|
|
|
|
|
|
|
|
|
524 |
return {
|
525 |
easting: easting,
|
526 |
northing: northing,
|
@@ -535,7 +543,7 @@
|
|
535 |
|
536 |
if (currentPosition) {
|
537 |
const utm = updatePositionInfo(currentPosition);
|
538 |
-
watermarkCoords.textContent = `UTM
|
539 |
} else {
|
540 |
watermarkCoords.textContent = "Coordenadas no disponibles";
|
541 |
}
|
@@ -587,7 +595,7 @@
|
|
587 |
context.fillText(now.toLocaleString(), 20, canvas.height - 40);
|
588 |
|
589 |
// Coordenadas UTM
|
590 |
-
context.fillText(`UTM
|
591 |
|
592 |
context.shadowBlur = 0;
|
593 |
|
@@ -658,7 +666,7 @@
|
|
658 |
<div><strong>Coordenadas:</strong></div>
|
659 |
<div class="pl-4">Lat: ${photo.coordinates.lat.toFixed(6)}</div>
|
660 |
<div class="pl-4">Lng: ${photo.coordinates.lng.toFixed(6)}</div>
|
661 |
-
<div class="pl-4">UTM
|
662 |
`;
|
663 |
|
664 |
// Set up delete button
|
@@ -709,7 +717,7 @@
|
|
709 |
<p><strong>Operador:</strong> ${photo.operator}</p>
|
710 |
<p><strong>Área:</strong> ${photo.area}</p>
|
711 |
<p><strong>Fecha:</strong> ${new Date(photo.timestamp).toLocaleString()}</p>
|
712 |
-
<p><strong>Coordenadas UTM:</strong>
|
713 |
<img src="data:image/jpeg;base64,${base64Image}" width="400" />
|
714 |
]]>
|
715 |
</description>
|
@@ -776,7 +784,7 @@
|
|
776 |
<p><strong>Operador:</strong> ${photo.operator}</p>
|
777 |
<p><strong>Área:</strong> ${photo.area}</p>
|
778 |
<p><strong>Fecha:</strong> ${new Date(photo.timestamp).toLocaleString()}</p>
|
779 |
-
<p><strong>Coordenadas UTM:</strong>
|
780 |
<img src="../fotos/${area}/foto_${photoIndex}.jpg" width="400" />
|
781 |
]]>
|
782 |
</description>
|
|
|
173 |
|
174 |
<div class="bg-slate-700/50 p-3 rounded-lg">
|
175 |
<div class="text-sm text-slate-400">Huso</div>
|
176 |
+
<div id="utm-zone" class="font-mono text-blue-400">18S (WGS84)</div>
|
177 |
</div>
|
178 |
</div>
|
179 |
</div>
|
|
|
273 |
const ssoBtn = document.getElementById('sso-btn');
|
274 |
const calidadBtn = document.getElementById('calidad-btn');
|
275 |
|
276 |
+
// Constants for UTM Zone 18S (South)
|
277 |
const UTM_ZONE = 18;
|
278 |
+
const UTM_ZONE_LETTER = 'S';
|
279 |
+
const FALSE_EASTING = 500000;
|
280 |
+
const FALSE_NORTHING = 10000000; // For southern hemisphere
|
281 |
+
const SCALE_FACTOR = 0.9996;
|
282 |
const EQUATORIAL_RADIUS = 6378137.0; // WGS84 equatorial radius in meters
|
283 |
const FLATTENING = 1 / 298.257223563; // WGS84 flattening
|
284 |
|
|
|
471 |
marker.setLatLng([lat, lng]);
|
472 |
}
|
473 |
|
474 |
+
// Convert to UTM Zone 18S
|
475 |
+
const utm = convertToUTMZone18S(lat, lng);
|
476 |
|
477 |
// Update UTM display
|
478 |
if (utmCoords) utmCoords.textContent = `Este: ${utm.easting.toFixed(2)}m, Norte: ${utm.northing.toFixed(2)}m`;
|
479 |
+
if (utmZone) utmZone.textContent = `18S (WGS84)`;
|
480 |
|
481 |
return utm;
|
482 |
}
|
483 |
|
484 |
+
function convertToUTMZone18S(lat, lng) {
|
485 |
+
// This is a simplified UTM conversion for Zone 18S
|
486 |
// Based on Karney's algorithm (simplified for demo purposes)
|
487 |
|
488 |
+
// Check if longitude is within zone 18 (-78° to -72°)
|
489 |
if (lng < -78 || lng >= -72) {
|
490 |
+
console.warn(`Longitud ${lng}° está fuera del huso 18 (-78° a -72°)`);
|
491 |
}
|
492 |
|
493 |
+
// Check if latitude is in southern hemisphere
|
494 |
+
const isSouthernHemisphere = lat < 0;
|
495 |
+
|
496 |
// Convert to radians
|
497 |
const latRad = lat * Math.PI / 180;
|
498 |
const lngRad = lng * Math.PI / 180;
|
499 |
|
500 |
+
// Central meridian for zone 18 (-75°)
|
501 |
const lng0Rad = (-75) * Math.PI / 180;
|
502 |
|
503 |
// Calculate delta longitude
|
|
|
521 |
const easting = FALSE_EASTING + k0 * A * etaPrim * (1 +
|
522 |
(etaPrim*etaPrim)/6 * (1 - t*t + (etaPrim*etaPrim)/20 * (5 - 18*t*t + t*t*t*t + 14*etaPrim*etaPrim - 58*t*t*etaPrim*etaPrim)));
|
523 |
|
524 |
+
let northing = k0 * A * xiPrim * (1 +
|
525 |
(etaPrim*etaPrim)/2 * (1 + (etaPrim*etaPrim)/12 * (5 - t*t + 9*etaPrim*etaPrim + 4*etaPrim*etaPrim*etaPrim*etaPrim)));
|
526 |
|
527 |
+
// Adjust northing for southern hemisphere
|
528 |
+
if (isSouthernHemisphere) {
|
529 |
+
northing += FALSE_NORTHING;
|
530 |
+
}
|
531 |
+
|
532 |
return {
|
533 |
easting: easting,
|
534 |
northing: northing,
|
|
|
543 |
|
544 |
if (currentPosition) {
|
545 |
const utm = updatePositionInfo(currentPosition);
|
546 |
+
watermarkCoords.textContent = `UTM ${utm.zone}${utm.zoneLetter} (WGS84): E ${utm.easting.toFixed(2)}m, N ${utm.northing.toFixed(2)}m`;
|
547 |
} else {
|
548 |
watermarkCoords.textContent = "Coordenadas no disponibles";
|
549 |
}
|
|
|
595 |
context.fillText(now.toLocaleString(), 20, canvas.height - 40);
|
596 |
|
597 |
// Coordenadas UTM
|
598 |
+
context.fillText(`UTM ${utm.zone}${utm.zoneLetter} (WGS84): E ${utm.easting.toFixed(2)}m, N ${utm.northing.toFixed(2)}m`, 20, canvas.height - 20);
|
599 |
|
600 |
context.shadowBlur = 0;
|
601 |
|
|
|
666 |
<div><strong>Coordenadas:</strong></div>
|
667 |
<div class="pl-4">Lat: ${photo.coordinates.lat.toFixed(6)}</div>
|
668 |
<div class="pl-4">Lng: ${photo.coordinates.lng.toFixed(6)}</div>
|
669 |
+
<div class="pl-4">UTM ${photo.coordinates.utm.zone}${photo.coordinates.utm.zoneLetter}: E ${photo.coordinates.utm.easting.toFixed(2)}m, N ${photo.coordinates.utm.northing.toFixed(2)}m</div>
|
670 |
`;
|
671 |
|
672 |
// Set up delete button
|
|
|
717 |
<p><strong>Operador:</strong> ${photo.operator}</p>
|
718 |
<p><strong>Área:</strong> ${photo.area}</p>
|
719 |
<p><strong>Fecha:</strong> ${new Date(photo.timestamp).toLocaleString()}</p>
|
720 |
+
<p><strong>Coordenadas UTM:</strong> ${photo.coordinates.utm.zone}${photo.coordinates.utm.zoneLetter} E ${photo.coordinates.utm.easting.toFixed(2)}m, N ${photo.coordinates.utm.northing.toFixed(2)}m</p>
|
721 |
<img src="data:image/jpeg;base64,${base64Image}" width="400" />
|
722 |
]]>
|
723 |
</description>
|
|
|
784 |
<p><strong>Operador:</strong> ${photo.operator}</p>
|
785 |
<p><strong>Área:</strong> ${photo.area}</p>
|
786 |
<p><strong>Fecha:</strong> ${new Date(photo.timestamp).toLocaleString()}</p>
|
787 |
+
<p><strong>Coordenadas UTM:</strong> ${photo.coordinates.utm.zone}${photo.coordinates.utm.zoneLetter} E ${photo.coordinates.utm.easting.toFixed(2)}m, N ${photo.coordinates.utm.northing.toFixed(2)}m</p>
|
788 |
<img src="../fotos/${area}/foto_${photoIndex}.jpg" width="400" />
|
789 |
]]>
|
790 |
</description>
|
prompts.txt
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
rescata el ultimo codigo que no se guardo
|
2 |
modifica el titulo por el siguiente banner, ajustado para que se vea la imagen completa https://cdn-uploads.huggingface.co/production/uploads/noauth/7vTxYaZUq3T2toaTItUKz.webp
|
3 |
reemplaza el texto fotografia georeferenciada para contratos por "Fotografía a KML", cambia "Información del operador" por "Registrado por", Cambia "Nombre del operador" por "Nombre", Cambia "nùmero de contrato" por 3 botones de selección de áreas que serían: "Medio Ambiente", "SSO" y Calidad, a cada uno ponle un icono acorde, Estampa en la foto el titulo "Q72 Ampliación Ruta S-839", abajo de ese titulo estampa fecha y hora, y abajo coordenadas utm en datum wgs84 huso 18 sur, todo esto en esquina inferior, y en la exportación genera un archivo distinto para cada área registrada, finalmente cambia el fondo por el siguiente: https://huggingface.co/datasets/ignaciomdr/fondos/resolve/main/HD%20wallpaper_%20vertical%2C%20landscape%2C%20science%2C%20nature%2C%20water%2C%20no%20people%2C%20red.jpeg , no modifiques nada mas
|
4 |
-
revisa el codigo por que no carga el gps ni la camara ni el mapa de referencia
|
|
|
|
1 |
rescata el ultimo codigo que no se guardo
|
2 |
modifica el titulo por el siguiente banner, ajustado para que se vea la imagen completa https://cdn-uploads.huggingface.co/production/uploads/noauth/7vTxYaZUq3T2toaTItUKz.webp
|
3 |
reemplaza el texto fotografia georeferenciada para contratos por "Fotografía a KML", cambia "Información del operador" por "Registrado por", Cambia "Nombre del operador" por "Nombre", Cambia "nùmero de contrato" por 3 botones de selección de áreas que serían: "Medio Ambiente", "SSO" y Calidad, a cada uno ponle un icono acorde, Estampa en la foto el titulo "Q72 Ampliación Ruta S-839", abajo de ese titulo estampa fecha y hora, y abajo coordenadas utm en datum wgs84 huso 18 sur, todo esto en esquina inferior, y en la exportación genera un archivo distinto para cada área registrada, finalmente cambia el fondo por el siguiente: https://huggingface.co/datasets/ignaciomdr/fondos/resolve/main/HD%20wallpaper_%20vertical%2C%20landscape%2C%20science%2C%20nature%2C%20water%2C%20no%20people%2C%20red.jpeg , no modifiques nada mas
|
4 |
+
revisa el codigo por que no carga el gps ni la camara ni el mapa de referencia
|
5 |
+
modifica el sistema de coordenadas en datum wgs84 huso 18 sur
|