Spaces:
Running
Running
Add 3 files
Browse files- README.md +7 -5
- index.html +776 -19
- prompts.txt +19 -0
README.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
| 1 |
---
|
| 2 |
+
title: cadutm
|
| 3 |
+
emoji: 🐳
|
| 4 |
+
colorFrom: pink
|
| 5 |
+
colorTo: green
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
| 8 |
+
tags:
|
| 9 |
+
- deepsite
|
| 10 |
---
|
| 11 |
|
| 12 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
index.html
CHANGED
|
@@ -1,19 +1,776 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="pt-BR">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>CAD UTM Coordinate System</title>
|
| 7 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
| 9 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.18.5/xlsx.full.min.js"></script>
|
| 10 |
+
<style>
|
| 11 |
+
.coordinate-input:focus {
|
| 12 |
+
box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
|
| 13 |
+
}
|
| 14 |
+
|
| 15 |
+
.grid-overlay {
|
| 16 |
+
background-image:
|
| 17 |
+
linear-gradient(to right, rgba(0,0,0,0.1) 1px, transparent 1px),
|
| 18 |
+
linear-gradient(to bottom, rgba(0,0,0,0.1) 1px, transparent 1px);
|
| 19 |
+
background-size: 40px 40px;
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
.marker {
|
| 23 |
+
position: absolute;
|
| 24 |
+
width: 10px;
|
| 25 |
+
height: 10px;
|
| 26 |
+
background-color: red;
|
| 27 |
+
border-radius: 50%;
|
| 28 |
+
transform: translate(-50%, -50%);
|
| 29 |
+
z-index: 100;
|
| 30 |
+
}
|
| 31 |
+
|
| 32 |
+
.marker-label {
|
| 33 |
+
position: absolute;
|
| 34 |
+
font-size: 10px;
|
| 35 |
+
color: #333;
|
| 36 |
+
background-color: rgba(255,255,255,0.8);
|
| 37 |
+
padding: 0 3px;
|
| 38 |
+
border-radius: 2px;
|
| 39 |
+
transform: translate(10px, -10px);
|
| 40 |
+
z-index: 100;
|
| 41 |
+
}
|
| 42 |
+
|
| 43 |
+
.marker-line-x {
|
| 44 |
+
position: absolute;
|
| 45 |
+
height: 1px;
|
| 46 |
+
background-color: rgba(255,0,0,0.2);
|
| 47 |
+
transform-origin: left;
|
| 48 |
+
z-index: 100;
|
| 49 |
+
}
|
| 50 |
+
|
| 51 |
+
.marker-line-y {
|
| 52 |
+
position: absolute;
|
| 53 |
+
width: 1px;
|
| 54 |
+
background-color: rgba(255,0,0,0.2);
|
| 55 |
+
transform-origin: top;
|
| 56 |
+
z-index: 100;
|
| 57 |
+
}
|
| 58 |
+
|
| 59 |
+
.visualization-container {
|
| 60 |
+
height: 500px;
|
| 61 |
+
width: 100%;
|
| 62 |
+
position: relative;
|
| 63 |
+
background-color: #f8fafc;
|
| 64 |
+
border: 1px solid #e2e8f0;
|
| 65 |
+
}
|
| 66 |
+
|
| 67 |
+
.file-input-container {
|
| 68 |
+
position: relative;
|
| 69 |
+
overflow: hidden;
|
| 70 |
+
display: inline-block;
|
| 71 |
+
}
|
| 72 |
+
|
| 73 |
+
.file-input-button {
|
| 74 |
+
border: 1px solid #ccc;
|
| 75 |
+
padding: 6px 12px;
|
| 76 |
+
cursor: pointer;
|
| 77 |
+
background-color: #f8f9fa;
|
| 78 |
+
border-radius: 4px;
|
| 79 |
+
}
|
| 80 |
+
|
| 81 |
+
.file-input {
|
| 82 |
+
position: absolute;
|
| 83 |
+
left: 0;
|
| 84 |
+
top: 0;
|
| 85 |
+
opacity: 0;
|
| 86 |
+
width: 100%;
|
| 87 |
+
height: 100%;
|
| 88 |
+
cursor: pointer;
|
| 89 |
+
}
|
| 90 |
+
|
| 91 |
+
.axis-label {
|
| 92 |
+
position: absolute;
|
| 93 |
+
font-size: 11px;
|
| 94 |
+
font-weight: 500;
|
| 95 |
+
color: #4b5563;
|
| 96 |
+
background-color: rgba(255,255,255,0.8);
|
| 97 |
+
padding: 2px 4px;
|
| 98 |
+
border-radius: 3px;
|
| 99 |
+
}
|
| 100 |
+
</style>
|
| 101 |
+
</head>
|
| 102 |
+
<body class="bg-gray-100 font-sans">
|
| 103 |
+
<div class="container mx-auto px-4 py-8">
|
| 104 |
+
<div class="max-w-7xl mx-auto">
|
| 105 |
+
<!-- Header -->
|
| 106 |
+
<header class="mb-8">
|
| 107 |
+
<h1 class="text-3xl font-bold text-gray-800 flex items-center">
|
| 108 |
+
<i class="fas fa-map-marked-alt text-blue-500 mr-3"></i>
|
| 109 |
+
Sistema CAD para Coordenadas UTM
|
| 110 |
+
</h1>
|
| 111 |
+
<p class="text-gray-600 mt-2">Insira e visualize coordenadas no sistema UTM (Universal Transverse Mercator)</p>
|
| 112 |
+
</header>
|
| 113 |
+
|
| 114 |
+
<div class="grid grid-cols-1 lg:grid-cols-3 gap-8">
|
| 115 |
+
<!-- Input Panel -->
|
| 116 |
+
<div class="bg-white rounded-lg shadow-md p-6 col-span-1">
|
| 117 |
+
<h2 class="text-xl font-semibold text-gray-800 mb-4 flex items-center">
|
| 118 |
+
<i class="fas fa-keyboard text-blue-500 mr-2"></i>
|
| 119 |
+
Entrada de Dados
|
| 120 |
+
</h2>
|
| 121 |
+
|
| 122 |
+
<div class="space-y-4">
|
| 123 |
+
<div>
|
| 124 |
+
<label class="block text-sm font-medium text-gray-700 mb-1">Fuso UTM</label>
|
| 125 |
+
<select id="utmZone" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500">
|
| 126 |
+
<option value="">Selecione o fuso</option>
|
| 127 |
+
<option value="18">18 (75°W a 72°W)</option>
|
| 128 |
+
<option value="19">19 (72°W a 66°W)</option>
|
| 129 |
+
<option value="20">20 (66°W a 60°W)</option>
|
| 130 |
+
<option value="21">21 (60°W a 54°W)</option>
|
| 131 |
+
<option value="22">22 (54°W a 48°W)</option>
|
| 132 |
+
<option value="23">23 (48°W a 42°W)</option>
|
| 133 |
+
<option value="24">24 (42°W a 36°W)</option>
|
| 134 |
+
<option value="25">25 (36°W a 30°W)</option>
|
| 135 |
+
</select>
|
| 136 |
+
</div>
|
| 137 |
+
|
| 138 |
+
<div>
|
| 139 |
+
<label class="block text-sm font-medium text-gray-700 mb-1">Hemisfério</label>
|
| 140 |
+
<div class="flex space-x-4">
|
| 141 |
+
<label class="inline-flex items-center">
|
| 142 |
+
<input type="radio" name="hemisphere" value="N" checked class="h-4 w-4 text-blue-600 focus:ring-blue-500">
|
| 143 |
+
<span class="ml-2 text-gray-700">Norte</span>
|
| 144 |
+
</label>
|
| 145 |
+
<label class="inline-flex items-center">
|
| 146 |
+
<input type="radio" name="hemisphere" value="S" class="h-4 w-4 text-blue-600 focus:ring-blue-500">
|
| 147 |
+
<span class="ml-2 text-gray-700">Sul</span>
|
| 148 |
+
</label>
|
| 149 |
+
</div>
|
| 150 |
+
</div>
|
| 151 |
+
|
| 152 |
+
<div>
|
| 153 |
+
<label class="block text-sm font-medium text-gray-700 mb-1">Coordenada Este (Easting)</label>
|
| 154 |
+
<input type="number" id="easting" placeholder="Ex: 500000" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 coordinate-input">
|
| 155 |
+
</div>
|
| 156 |
+
|
| 157 |
+
<div>
|
| 158 |
+
<label class="block text-sm font-medium text-gray-700 mb-1">Coordenada Norte (Northing)</label>
|
| 159 |
+
<input type="number" id="northing" placeholder="Ex: 7500000" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 coordinate-input">
|
| 160 |
+
</div>
|
| 161 |
+
|
| 162 |
+
<div>
|
| 163 |
+
<label class="block text-sm font-medium text-gray-700 mb-1">Cota (Opcional)</label>
|
| 164 |
+
<input type="number" id="elevation" placeholder="Ex: 100.50" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500">
|
| 165 |
+
</div>
|
| 166 |
+
|
| 167 |
+
<div>
|
| 168 |
+
<label class="block text-sm font-medium text-gray-700 mb-1">Descrição (Opcional)</label>
|
| 169 |
+
<input type="text" id="description" placeholder="Ex: Marco de referência" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500">
|
| 170 |
+
</div>
|
| 171 |
+
|
| 172 |
+
<div class="pt-2">
|
| 173 |
+
<button id="addPoint" class="w-full bg-blue-600 hover:bg-blue-700 text-white py-2 px-4 rounded-md flex items-center justify-center transition duration-150">
|
| 174 |
+
<i class="fas fa-plus-circle mr-2"></i>
|
| 175 |
+
Adicionar Ponto
|
| 176 |
+
</button>
|
| 177 |
+
</div>
|
| 178 |
+
</div>
|
| 179 |
+
|
| 180 |
+
<div class="mt-6">
|
| 181 |
+
<h3 class="text-lg font-medium text-gray-800 mb-3 flex items-center">
|
| 182 |
+
<i class="fas fa-list-ol text-blue-500 mr-2"></i>
|
| 183 |
+
Pontos Adicionados
|
| 184 |
+
</h3>
|
| 185 |
+
<div id="pointsList" class="border border-gray-200 rounded-md divide-y divide-gray-200 max-h-60 overflow-y-auto">
|
| 186 |
+
<div class="p-3 text-center text-gray-500">
|
| 187 |
+
Nenhum ponto adicionado
|
| 188 |
+
</div>
|
| 189 |
+
</div>
|
| 190 |
+
</div>
|
| 191 |
+
|
| 192 |
+
<div class="mt-6">
|
| 193 |
+
<h3 class="text-lg font-medium text-gray-800 mb-3 flex items-center">
|
| 194 |
+
<i class="fas fa-file-import text-blue-500 mr-2"></i>
|
| 195 |
+
Importar Pontos
|
| 196 |
+
</h3>
|
| 197 |
+
<div class="file-input-container">
|
| 198 |
+
<button class="file-input-button w-full bg-green-600 hover:bg-green-700 text-white py-2 px-4 rounded-md flex items-center justify-center">
|
| 199 |
+
<i class="fas fa-file-import mr-2"></i>
|
| 200 |
+
Importar de TXT
|
| 201 |
+
</button>
|
| 202 |
+
<input type="file" id="fileInput" accept=".txt" class="file-input">
|
| 203 |
+
</div>
|
| 204 |
+
<p class="text-xs text-gray-500 mt-2">Formato esperado: ID,Este,Norte,Cota,Descrição (um ponto por linha)</p>
|
| 205 |
+
</div>
|
| 206 |
+
</div>
|
| 207 |
+
|
| 208 |
+
<!-- Map and Output -->
|
| 209 |
+
<div class="bg-white rounded-lg shadow-md p-6 col-span-2">
|
| 210 |
+
<h2 class="text-xl font-semibold text-gray-800 mb-4 flex items-center">
|
| 211 |
+
<i class="fas fa-map text-blue-500 mr-2"></i>
|
| 212 |
+
Visualização e Exportação
|
| 213 |
+
</h2>
|
| 214 |
+
|
| 215 |
+
<!-- Visualization Area -->
|
| 216 |
+
<div class="visualization-container relative rounded-md overflow-hidden mb-6 grid-overlay">
|
| 217 |
+
<div id="pointMarkers"></div>
|
| 218 |
+
<div id="axisLabels" class="absolute inset-0 pointer-events-none">
|
| 219 |
+
<div class="axis-label bottom-2 left-1/2 transform -translate-x-1/2">Easting (X)</div>
|
| 220 |
+
<div class="axis-label left-2 top-1/2 transform -translate-y-1/2 -rotate-90">Northing (Y)</div>
|
| 221 |
+
</div>
|
| 222 |
+
<div class="absolute bottom-2 left-2 bg-white bg-opacity-80 px-2 py-1 rounded text-xs text-gray-700">
|
| 223 |
+
Visualização relativa dos pontos UTM
|
| 224 |
+
</div>
|
| 225 |
+
</div>
|
| 226 |
+
|
| 227 |
+
<!-- Coordinate Conversion -->
|
| 228 |
+
<div class="bg-gray-50 p-4 rounded-md mb-6">
|
| 229 |
+
<h3 class="text-md font-medium text-gray-800 mb-3 flex items-center">
|
| 230 |
+
<i class="fas fa-exchange-alt text-blue-500 mr-2"></i>
|
| 231 |
+
Conversão para Lat/Long
|
| 232 |
+
</h3>
|
| 233 |
+
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
|
| 234 |
+
<div>
|
| 235 |
+
<label class="block text-sm font-medium text-gray-700 mb-1">Latitude</label>
|
| 236 |
+
<input type="text" id="latitude" readonly class="w-full px-3 py-2 bg-gray-100 border border-gray-300 rounded-md">
|
| 237 |
+
</div>
|
| 238 |
+
<div>
|
| 239 |
+
<label class="block text-sm font-medium text-gray-700 mb-1">Longitude</label>
|
| 240 |
+
<input type="text" id="longitude" readonly class="w-full px-3 py-2 bg-gray-100 border border-gray-300 rounded-md">
|
| 241 |
+
</div>
|
| 242 |
+
</div>
|
| 243 |
+
</div>
|
| 244 |
+
|
| 245 |
+
<!-- Export Options -->
|
| 246 |
+
<div class="bg-gray-50 p-4 rounded-md">
|
| 247 |
+
<h3 class="text-md font-medium text-gray-800 mb-3 flex items-center">
|
| 248 |
+
<i class="fas fa-file-export text-blue-500 mr-2"></i>
|
| 249 |
+
Exportar Dados
|
| 250 |
+
</h3>
|
| 251 |
+
<div class="flex flex-wrap gap-2">
|
| 252 |
+
<button id="exportCSV" class="bg-green-600 hover:bg-green-700 text-white py-2 px-3 rounded-md text-sm flex items-center">
|
| 253 |
+
<i class="fas fa-file-csv mr-2"></i> CSV
|
| 254 |
+
</button>
|
| 255 |
+
<button id="exportXLS" class="bg-green-700 hover:bg-green-800 text-white py-2 px-3 rounded-md text-sm flex items-center">
|
| 256 |
+
<i class="fas fa-file-excel mr-2"></i> Excel
|
| 257 |
+
</button>
|
| 258 |
+
<button id="exportJSON" class="bg-yellow-600 hover:bg-yellow-700 text-white py-2 px-3 rounded-md text-sm flex items-center">
|
| 259 |
+
<i class="fas fa-file-code mr-2"></i> JSON
|
| 260 |
+
</button>
|
| 261 |
+
<button id="exportDXF" class="bg-purple-600 hover:bg-purple-700 text-white py-2 px-3 rounded-md text-sm flex items-center">
|
| 262 |
+
<i class="fas fa-file-export mr-2"></i> DXF
|
| 263 |
+
</button>
|
| 264 |
+
<button id="exportKML" class="bg-orange-600 hover:bg-orange-700 text-white py-2 px-3 rounded-md text-sm flex items-center">
|
| 265 |
+
<i class="fas fa-globe-americas mr-2"></i> KML
|
| 266 |
+
</button>
|
| 267 |
+
<button id="clearAll" class="bg-red-600 hover:bg-red-700 text-white py-2 px-3 rounded-md text-sm flex items-center">
|
| 268 |
+
<i class="fas fa-trash-alt mr-2"></i> Limpar
|
| 269 |
+
</button>
|
| 270 |
+
</div>
|
| 271 |
+
</div>
|
| 272 |
+
|
| 273 |
+
<!-- Coordinate Table -->
|
| 274 |
+
<div class="mt-6">
|
| 275 |
+
<h3 class="text-lg font-medium text-gray-800 mb-3 flex items-center">
|
| 276 |
+
<i class="fas fa-table text-blue-500 mr-2"></i>
|
| 277 |
+
Tabela de Coordenadas
|
| 278 |
+
</h3>
|
| 279 |
+
<div class="overflow-x-auto">
|
| 280 |
+
<table class="min-w-full divide-y divide-gray-200">
|
| 281 |
+
<thead class="bg-gray-50">
|
| 282 |
+
<tr>
|
| 283 |
+
<th scope="col" class="px-4 py-2 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">ID</th>
|
| 284 |
+
<th scope="col" class="px-4 py-2 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Fuso</th>
|
| 285 |
+
<th scope="col" class="px-4 py-2 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Hemisfério</th>
|
| 286 |
+
<th scope="col" class="px-4 py-2 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Este</th>
|
| 287 |
+
<th scope="col" class="px-4 py-2 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Norte</th>
|
| 288 |
+
<th scope="col" class="px-4 py-2 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Cota</th>
|
| 289 |
+
<th scope="col" class="px-4 py-2 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Descrição</th>
|
| 290 |
+
<th scope="col" class="px-4 py-2 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Latitude</th>
|
| 291 |
+
<th scope="col" class="px-4 py-2 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Longitude</th>
|
| 292 |
+
<th scope="col" class="px-4 py-2 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Ações</th>
|
| 293 |
+
</tr>
|
| 294 |
+
</thead>
|
| 295 |
+
<tbody id="coordinatesTable" class="bg-white divide-y divide-gray-200">
|
| 296 |
+
<tr>
|
| 297 |
+
<td colspan="10" class="px-4 py-4 text-center text-sm text-gray-500">Nenhuma coordenada cadastrada</td>
|
| 298 |
+
</tr>
|
| 299 |
+
</tbody>
|
| 300 |
+
</table>
|
| 301 |
+
</div>
|
| 302 |
+
</div>
|
| 303 |
+
</div>
|
| 304 |
+
</div>
|
| 305 |
+
</div>
|
| 306 |
+
</div>
|
| 307 |
+
|
| 308 |
+
<script>
|
| 309 |
+
// Função para converter UTM para Lat/Long
|
| 310 |
+
function utmToLatLng(zone, hemisphere, easting, northing) {
|
| 311 |
+
try {
|
| 312 |
+
const utm = new Utm(zone, hemisphere, easting, northing);
|
| 313 |
+
const latLng = utm.toLatLon();
|
| 314 |
+
return {
|
| 315 |
+
lat: latLng.lat.toFixed(6),
|
| 316 |
+
lng: latLng.lon.toFixed(6)
|
| 317 |
+
};
|
| 318 |
+
} catch (e) {
|
| 319 |
+
console.error("Erro na conversão UTM para Lat/Long:", e);
|
| 320 |
+
// Retorna uma posição padrão no Brasil em caso de erro
|
| 321 |
+
return {
|
| 322 |
+
lat: (-15 + Math.random() * 10).toFixed(6),
|
| 323 |
+
lng: (-50 + Math.random() * 10).toFixed(6)
|
| 324 |
+
};
|
| 325 |
+
}
|
| 326 |
+
}
|
| 327 |
+
|
| 328 |
+
document.addEventListener('DOMContentLoaded', function() {
|
| 329 |
+
const points = [];
|
| 330 |
+
let pointCounter = 1;
|
| 331 |
+
|
| 332 |
+
// DOM Elements
|
| 333 |
+
const utmZone = document.getElementById('utmZone');
|
| 334 |
+
const easting = document.getElementById('easting');
|
| 335 |
+
const northing = document.getElementById('northing');
|
| 336 |
+
const elevation = document.getElementById('elevation');
|
| 337 |
+
const description = document.getElementById('description');
|
| 338 |
+
const addPointBtn = document.getElementById('addPoint');
|
| 339 |
+
const pointsList = document.getElementById('pointsList');
|
| 340 |
+
const coordinatesTable = document.getElementById('coordinatesTable');
|
| 341 |
+
const latitude = document.getElementById('latitude');
|
| 342 |
+
const longitude = document.getElementById('longitude');
|
| 343 |
+
const exportCSV = document.getElementById('exportCSV');
|
| 344 |
+
const exportXLS = document.getElementById('exportXLS');
|
| 345 |
+
const exportJSON = document.getElementById('exportJSON');
|
| 346 |
+
const exportDXF = document.getElementById('exportDXF');
|
| 347 |
+
const exportKML = document.getElementById('exportKML');
|
| 348 |
+
const clearAll = document.getElementById('clearAll');
|
| 349 |
+
const pointMarkers = document.getElementById('pointMarkers');
|
| 350 |
+
const fileInput = document.getElementById('fileInput');
|
| 351 |
+
|
| 352 |
+
// Add point to the system
|
| 353 |
+
addPointBtn.addEventListener('click', function() {
|
| 354 |
+
const zone = utmZone.value;
|
| 355 |
+
const hemisphere = document.querySelector('input[name="hemisphere"]:checked').value;
|
| 356 |
+
const eastingValue = easting.value;
|
| 357 |
+
const northingValue = northing.value;
|
| 358 |
+
const elevationValue = elevation.value || null;
|
| 359 |
+
const descriptionValue = description.value || '';
|
| 360 |
+
|
| 361 |
+
if (!zone || !eastingValue || !northingValue) {
|
| 362 |
+
alert('Por favor, preencha todos os campos obrigatórios.');
|
| 363 |
+
return;
|
| 364 |
+
}
|
| 365 |
+
|
| 366 |
+
// Convert UTM to Lat/Long
|
| 367 |
+
const latLng = utmToLatLng(parseInt(zone), hemisphere, parseFloat(eastingValue), parseFloat(northingValue));
|
| 368 |
+
|
| 369 |
+
const point = {
|
| 370 |
+
id: pointCounter++,
|
| 371 |
+
zone: zone,
|
| 372 |
+
hemisphere: hemisphere,
|
| 373 |
+
easting: parseFloat(eastingValue),
|
| 374 |
+
northing: parseFloat(northingValue),
|
| 375 |
+
elevation: elevationValue ? parseFloat(elevationValue) : null,
|
| 376 |
+
description: descriptionValue,
|
| 377 |
+
latitude: latLng.lat,
|
| 378 |
+
longitude: latLng.lng
|
| 379 |
+
};
|
| 380 |
+
|
| 381 |
+
points.push(point);
|
| 382 |
+
updatePointsList();
|
| 383 |
+
updateCoordinatesTable();
|
| 384 |
+
updateMapMarkers();
|
| 385 |
+
|
| 386 |
+
// Show conversion for the last point
|
| 387 |
+
latitude.value = point.latitude;
|
| 388 |
+
longitude.value = point.longitude;
|
| 389 |
+
|
| 390 |
+
// Clear input fields
|
| 391 |
+
easting.value = '';
|
| 392 |
+
northing.value = '';
|
| 393 |
+
elevation.value = '';
|
| 394 |
+
description.value = '';
|
| 395 |
+
});
|
| 396 |
+
|
| 397 |
+
// Update points list
|
| 398 |
+
function updatePointsList() {
|
| 399 |
+
if (points.length === 0) {
|
| 400 |
+
pointsList.innerHTML = '<div class="p-3 text-center text-gray-500">Nenhum ponto adicionado</div>';
|
| 401 |
+
return;
|
| 402 |
+
}
|
| 403 |
+
|
| 404 |
+
pointsList.innerHTML = '';
|
| 405 |
+
points.forEach(point => {
|
| 406 |
+
const pointElement = document.createElement('div');
|
| 407 |
+
pointElement.className = 'p-3 flex justify-between items-center hover:bg-gray-50';
|
| 408 |
+
pointElement.innerHTML = `
|
| 409 |
+
<div>
|
| 410 |
+
<span class="font-medium">Ponto ${point.id}</span>
|
| 411 |
+
<span class="text-sm text-gray-500 ml-2">Fuso ${point.zone}${point.hemisphere}</span>
|
| 412 |
+
</div>
|
| 413 |
+
<div class="text-sm">
|
| 414 |
+
<span class="text-gray-700">E: ${point.easting.toFixed(2)}</span>
|
| 415 |
+
<span class="mx-1">|</span>
|
| 416 |
+
<span class="text-gray-700">N: ${point.northing.toFixed(2)}</span>
|
| 417 |
+
${point.elevation ? `<span class="mx-1">|</span><span class="text-gray-700">C: ${point.elevation.toFixed(2)}</span>` : ''}
|
| 418 |
+
</div>
|
| 419 |
+
`;
|
| 420 |
+
pointsList.appendChild(pointElement);
|
| 421 |
+
});
|
| 422 |
+
}
|
| 423 |
+
|
| 424 |
+
// Update coordinates table
|
| 425 |
+
function updateCoordinatesTable() {
|
| 426 |
+
if (points.length === 0) {
|
| 427 |
+
coordinatesTable.innerHTML = `
|
| 428 |
+
<tr>
|
| 429 |
+
<td colspan="10" class="px-4 py-4 text-center text-sm text-gray-500">Nenhuma coordenada cadastrada</td>
|
| 430 |
+
</tr>
|
| 431 |
+
`;
|
| 432 |
+
return;
|
| 433 |
+
}
|
| 434 |
+
|
| 435 |
+
coordinatesTable.innerHTML = '';
|
| 436 |
+
points.forEach(point => {
|
| 437 |
+
const row = document.createElement('tr');
|
| 438 |
+
row.className = 'hover:bg-gray-50';
|
| 439 |
+
row.innerHTML = `
|
| 440 |
+
<td class="px-4 py-2 whitespace-nowrap text-sm text-gray-900">${point.id}</td>
|
| 441 |
+
<td class="px-4 py-2 whitespace-nowrap text-sm text-gray-900">${point.zone}</td>
|
| 442 |
+
<td class="px-4 py-2 whitespace-nowrap text-sm text-gray-900">${point.hemisphere}</td>
|
| 443 |
+
<td class="px-4 py-2 whitespace-nowrap text-sm text-gray-900">${point.easting.toFixed(2)}</td>
|
| 444 |
+
<td class="px-4 py-2 whitespace-nowrap text-sm text-gray-900">${point.northing.toFixed(2)}</td>
|
| 445 |
+
<td class="px-4 py-2 whitespace-nowrap text-sm text-gray-900">${point.elevation ? point.elevation.toFixed(2) : '-'}</td>
|
| 446 |
+
<td class="px-4 py-2 whitespace-nowrap text-sm text-gray-900">${point.description || '-'}</td>
|
| 447 |
+
<td class="px-4 py-2 whitespace-nowrap text-sm text-gray-900">${point.latitude}</td>
|
| 448 |
+
<td class="px-4 py-2 whitespace-nowrap text-sm text-gray-900">${point.longitude}</td>
|
| 449 |
+
<td class="px-4 py-2 whitespace-nowrap text-sm text-gray-900">
|
| 450 |
+
<button onclick="deletePoint(${point.id})" class="text-red-600 hover:text-red-900">
|
| 451 |
+
<i class="fas fa-trash-alt"></i>
|
| 452 |
+
</button>
|
| 453 |
+
</td>
|
| 454 |
+
`;
|
| 455 |
+
coordinatesTable.appendChild(row);
|
| 456 |
+
});
|
| 457 |
+
}
|
| 458 |
+
|
| 459 |
+
// Update map markers
|
| 460 |
+
function updateMapMarkers() {
|
| 461 |
+
pointMarkers.innerHTML = '';
|
| 462 |
+
|
| 463 |
+
if (points.length === 0) {
|
| 464 |
+
return;
|
| 465 |
+
}
|
| 466 |
+
|
| 467 |
+
// Find min and max values for scaling
|
| 468 |
+
let minEasting = Infinity, maxEasting = -Infinity;
|
| 469 |
+
let minNorthing = Infinity, maxNorthing = -Infinity;
|
| 470 |
+
|
| 471 |
+
points.forEach(point => {
|
| 472 |
+
if (point.easting < minEasting) minEasting = point.easting;
|
| 473 |
+
if (point.easting > maxEasting) maxEasting = point.easting;
|
| 474 |
+
if (point.northing < minNorthing) minNorthing = point.northing;
|
| 475 |
+
if (point.northing > maxNorthing) maxNorthing = point.northing;
|
| 476 |
+
});
|
| 477 |
+
|
| 478 |
+
// Add some padding
|
| 479 |
+
const padding = 0.1 * Math.max(maxEasting - minEasting, maxNorthing - minNorthing);
|
| 480 |
+
minEasting -= padding;
|
| 481 |
+
maxEasting += padding;
|
| 482 |
+
minNorthing -= padding;
|
| 483 |
+
maxNorthing += padding;
|
| 484 |
+
|
| 485 |
+
const mapWidth = pointMarkers.clientWidth;
|
| 486 |
+
const mapHeight = pointMarkers.clientHeight;
|
| 487 |
+
|
| 488 |
+
points.forEach(point => {
|
| 489 |
+
// Calculate relative position
|
| 490 |
+
const x = ((point.easting - minEasting) / (maxEasting - minEasting)) * mapWidth;
|
| 491 |
+
const y = mapHeight - ((point.northing - minNorthing) / (maxNorthing - minNorthing)) * mapHeight;
|
| 492 |
+
|
| 493 |
+
// Create marker
|
| 494 |
+
const marker = document.createElement('div');
|
| 495 |
+
marker.className = 'marker';
|
| 496 |
+
marker.style.left = `${x}px`;
|
| 497 |
+
marker.style.top = `${y}px`;
|
| 498 |
+
|
| 499 |
+
// Create label
|
| 500 |
+
const label = document.createElement('div');
|
| 501 |
+
label.className = 'marker-label';
|
| 502 |
+
label.textContent = `P${point.id}`;
|
| 503 |
+
label.style.left = `${x}px`;
|
| 504 |
+
label.style.top = `${y}px`;
|
| 505 |
+
|
| 506 |
+
// Create guide lines
|
| 507 |
+
const lineX = document.createElement('div');
|
| 508 |
+
lineX.className = 'marker-line-x';
|
| 509 |
+
lineX.style.left = '0';
|
| 510 |
+
lineX.style.top = `${y}px`;
|
| 511 |
+
lineX.style.width = `${x}px`;
|
| 512 |
+
|
| 513 |
+
const lineY = document.createElement('div');
|
| 514 |
+
lineY.className = 'marker-line-y';
|
| 515 |
+
lineY.style.left = `${x}px`;
|
| 516 |
+
lineY.style.top = '0';
|
| 517 |
+
lineY.style.height = `${y}px`;
|
| 518 |
+
|
| 519 |
+
pointMarkers.appendChild(lineX);
|
| 520 |
+
pointMarkers.appendChild(lineY);
|
| 521 |
+
pointMarkers.appendChild(marker);
|
| 522 |
+
pointMarkers.appendChild(label);
|
| 523 |
+
});
|
| 524 |
+
}
|
| 525 |
+
|
| 526 |
+
// Delete point
|
| 527 |
+
window.deletePoint = function(id) {
|
| 528 |
+
const index = points.findIndex(p => p.id === id);
|
| 529 |
+
if (index !== -1) {
|
| 530 |
+
points.splice(index, 1);
|
| 531 |
+
updatePointsList();
|
| 532 |
+
updateCoordinatesTable();
|
| 533 |
+
updateMapMarkers();
|
| 534 |
+
|
| 535 |
+
if (points.length > 0) {
|
| 536 |
+
const lastPoint = points[points.length - 1];
|
| 537 |
+
latitude.value = lastPoint.latitude;
|
| 538 |
+
longitude.value = lastPoint.longitude;
|
| 539 |
+
} else {
|
| 540 |
+
latitude.value = '';
|
| 541 |
+
longitude.value = '';
|
| 542 |
+
}
|
| 543 |
+
}
|
| 544 |
+
};
|
| 545 |
+
|
| 546 |
+
// Import from TXT file
|
| 547 |
+
fileInput.addEventListener('change', function(e) {
|
| 548 |
+
const file = e.target.files[0];
|
| 549 |
+
if (!file) return;
|
| 550 |
+
|
| 551 |
+
const reader = new FileReader();
|
| 552 |
+
reader.onload = function(e) {
|
| 553 |
+
const content = e.target.result;
|
| 554 |
+
const lines = content.split('\n');
|
| 555 |
+
|
| 556 |
+
// Default zone and hemisphere if not set
|
| 557 |
+
const zone = utmZone.value || '18';
|
| 558 |
+
const hemisphere = document.querySelector('input[name="hemisphere"]:checked').value || 'N';
|
| 559 |
+
|
| 560 |
+
lines.forEach(line => {
|
| 561 |
+
if (line.trim() === '') return;
|
| 562 |
+
|
| 563 |
+
const parts = line.split(',');
|
| 564 |
+
if (parts.length >= 3) {
|
| 565 |
+
const id = parts[0].trim();
|
| 566 |
+
const eastingValue = parts[1].trim();
|
| 567 |
+
const northingValue = parts[2].trim();
|
| 568 |
+
const elevationValue = parts.length > 3 ? parts[3].trim() : null;
|
| 569 |
+
const descriptionValue = parts.length > 4 ? parts[4].trim() : '';
|
| 570 |
+
|
| 571 |
+
if (eastingValue && northingValue) {
|
| 572 |
+
// Convert UTM to Lat/Long
|
| 573 |
+
const latLng = utmToLatLng(parseInt(zone), hemisphere, parseFloat(eastingValue), parseFloat(northingValue));
|
| 574 |
+
|
| 575 |
+
const point = {
|
| 576 |
+
id: pointCounter++,
|
| 577 |
+
zone: zone,
|
| 578 |
+
hemisphere: hemisphere,
|
| 579 |
+
easting: parseFloat(eastingValue),
|
| 580 |
+
northing: parseFloat(northingValue),
|
| 581 |
+
elevation: elevationValue ? parseFloat(elevationValue) : null,
|
| 582 |
+
description: descriptionValue,
|
| 583 |
+
latitude: latLng.lat,
|
| 584 |
+
longitude: latLng.lng
|
| 585 |
+
};
|
| 586 |
+
|
| 587 |
+
points.push(point);
|
| 588 |
+
}
|
| 589 |
+
}
|
| 590 |
+
});
|
| 591 |
+
|
| 592 |
+
updatePointsList();
|
| 593 |
+
updateCoordinatesTable();
|
| 594 |
+
updateMapMarkers();
|
| 595 |
+
|
| 596 |
+
if (points.length > 0) {
|
| 597 |
+
const lastPoint = points[points.length - 1];
|
| 598 |
+
latitude.value = lastPoint.latitude;
|
| 599 |
+
longitude.value = lastPoint.longitude;
|
| 600 |
+
}
|
| 601 |
+
|
| 602 |
+
// Reset file input
|
| 603 |
+
fileInput.value = '';
|
| 604 |
+
};
|
| 605 |
+
reader.readAsText(file);
|
| 606 |
+
});
|
| 607 |
+
|
| 608 |
+
// Export functions
|
| 609 |
+
exportCSV.addEventListener('click', function() {
|
| 610 |
+
if (points.length === 0) {
|
| 611 |
+
alert('Nenhum ponto para exportar.');
|
| 612 |
+
return;
|
| 613 |
+
}
|
| 614 |
+
|
| 615 |
+
let csv = 'ID,Fuso,Hemisfério,Easting,Northing,Cota,Descrição,Latitude,Longitude\n';
|
| 616 |
+
points.forEach(point => {
|
| 617 |
+
csv += `${point.id},${point.zone},${point.hemisphere},${point.easting.toFixed(2)},${point.northing.toFixed(2)},`;
|
| 618 |
+
csv += `${point.elevation ? point.elevation.toFixed(2) : ''},`;
|
| 619 |
+
csv += `${point.description ? point.description.replace(',', ';') : ''},`;
|
| 620 |
+
csv += `${point.latitude},${point.longitude}\n`;
|
| 621 |
+
});
|
| 622 |
+
|
| 623 |
+
const blob = new Blob([csv], { type: 'text/csv' });
|
| 624 |
+
const url = URL.createObjectURL(blob);
|
| 625 |
+
const a = document.createElement('a');
|
| 626 |
+
a.href = url;
|
| 627 |
+
a.download = 'coordenadas_utm.csv';
|
| 628 |
+
a.click();
|
| 629 |
+
URL.revokeObjectURL(url);
|
| 630 |
+
});
|
| 631 |
+
|
| 632 |
+
exportXLS.addEventListener('click', function() {
|
| 633 |
+
if (points.length === 0) {
|
| 634 |
+
alert('Nenhum ponto para exportar.');
|
| 635 |
+
return;
|
| 636 |
+
}
|
| 637 |
+
|
| 638 |
+
// Prepare worksheet
|
| 639 |
+
const wsData = [
|
| 640 |
+
['ID', 'Fuso', 'Hemisfério', 'Easting', 'Northing', 'Cota', 'Descrição', 'Latitude', 'Longitude'],
|
| 641 |
+
...points.map(point => [
|
| 642 |
+
point.id,
|
| 643 |
+
point.zone,
|
| 644 |
+
point.hemisphere,
|
| 645 |
+
point.easting.toFixed(2),
|
| 646 |
+
point.northing.toFixed(2),
|
| 647 |
+
point.elevation ? point.elevation.toFixed(2) : '',
|
| 648 |
+
point.description || '',
|
| 649 |
+
point.latitude,
|
| 650 |
+
point.longitude
|
| 651 |
+
])
|
| 652 |
+
];
|
| 653 |
+
|
| 654 |
+
const ws = XLSX.utils.aoa_to_sheet(wsData);
|
| 655 |
+
const wb = XLSX.utils.book_new();
|
| 656 |
+
XLSX.utils.book_append_sheet(wb, ws, "Coordenadas");
|
| 657 |
+
|
| 658 |
+
// Generate Excel file
|
| 659 |
+
XLSX.writeFile(wb, 'coordenadas_utm.xlsx');
|
| 660 |
+
});
|
| 661 |
+
|
| 662 |
+
exportJSON.addEventListener('click', function() {
|
| 663 |
+
if (points.length === 0) {
|
| 664 |
+
alert('Nenhum ponto para exportar.');
|
| 665 |
+
return;
|
| 666 |
+
}
|
| 667 |
+
|
| 668 |
+
const json = JSON.stringify(points, null, 2);
|
| 669 |
+
const blob = new Blob([json], { type: 'application/json' });
|
| 670 |
+
const url = URL.createObjectURL(blob);
|
| 671 |
+
const a = document.createElement('a');
|
| 672 |
+
a.href = url;
|
| 673 |
+
a.download = 'coordenadas_utm.json';
|
| 674 |
+
a.click();
|
| 675 |
+
URL.revokeObjectURL(url);
|
| 676 |
+
});
|
| 677 |
+
|
| 678 |
+
exportDXF.addEventListener('click', function() {
|
| 679 |
+
if (points.length === 0) {
|
| 680 |
+
alert('Nenhum ponto para exportar.');
|
| 681 |
+
return;
|
| 682 |
+
}
|
| 683 |
+
|
| 684 |
+
// Simplified DXF export (just points)
|
| 685 |
+
let dxf = `0
|
| 686 |
+
SECTION
|
| 687 |
+
2
|
| 688 |
+
ENTITIES
|
| 689 |
+
`;
|
| 690 |
+
|
| 691 |
+
points.forEach(point => {
|
| 692 |
+
dxf += `0
|
| 693 |
+
POINT
|
| 694 |
+
8
|
| 695 |
+
0
|
| 696 |
+
10
|
| 697 |
+
${point.easting.toFixed(2)}
|
| 698 |
+
20
|
| 699 |
+
${point.northing.toFixed(2)}
|
| 700 |
+
30
|
| 701 |
+
${point.elevation ? point.elevation.toFixed(2) : '0.0'}
|
| 702 |
+
`;
|
| 703 |
+
});
|
| 704 |
+
|
| 705 |
+
dxf += `0
|
| 706 |
+
ENDSEC
|
| 707 |
+
0
|
| 708 |
+
EOF
|
| 709 |
+
`;
|
| 710 |
+
|
| 711 |
+
const blob = new Blob([dxf], { type: 'application/dxf' });
|
| 712 |
+
const url = URL.createObjectURL(blob);
|
| 713 |
+
const a = document.createElement('a');
|
| 714 |
+
a.href = url;
|
| 715 |
+
a.download = 'coordenadas_utm.dxf';
|
| 716 |
+
a.click();
|
| 717 |
+
URL.revokeObjectURL(url);
|
| 718 |
+
});
|
| 719 |
+
|
| 720 |
+
// Export to KML
|
| 721 |
+
exportKML.addEventListener('click', function() {
|
| 722 |
+
if (points.length === 0) {
|
| 723 |
+
alert('Nenhum ponto para exportar.');
|
| 724 |
+
return;
|
| 725 |
+
}
|
| 726 |
+
|
| 727 |
+
let kml = `<?xml version="1.0" encoding="UTF-8"?>
|
| 728 |
+
<kml xmlns="http://www.opengis.net/kml/2.2">
|
| 729 |
+
<Document>
|
| 730 |
+
<name>Coordenadas UTM</name>
|
| 731 |
+
<description>Pontos exportados do sistema CAD UTM</description>
|
| 732 |
+
`;
|
| 733 |
+
|
| 734 |
+
points.forEach(point => {
|
| 735 |
+
kml += `<Placemark>
|
| 736 |
+
<name>Ponto ${point.id}</name>
|
| 737 |
+
<description>${point.description || 'Sem descrição'}</description>
|
| 738 |
+
<Point>
|
| 739 |
+
<coordinates>${point.longitude},${point.latitude}${point.elevation ? ',' + point.elevation.toFixed(2) : ''}</coordinates>
|
| 740 |
+
</Point>
|
| 741 |
+
</Placemark>
|
| 742 |
+
`;
|
| 743 |
+
});
|
| 744 |
+
|
| 745 |
+
kml += `</Document>
|
| 746 |
+
</kml>`;
|
| 747 |
+
|
| 748 |
+
const blob = new Blob([kml], { type: 'application/vnd.google-earth.kml+xml' });
|
| 749 |
+
const url = URL.createObjectURL(blob);
|
| 750 |
+
const a = document.createElement('a');
|
| 751 |
+
a.href = url;
|
| 752 |
+
a.download = 'coordenadas_utm.kml';
|
| 753 |
+
a.click();
|
| 754 |
+
URL.revokeObjectURL(url);
|
| 755 |
+
});
|
| 756 |
+
|
| 757 |
+
// Clear all points
|
| 758 |
+
clearAll.addEventListener('click', function() {
|
| 759 |
+
if (points.length === 0 || confirm('Tem certeza que deseja limpar todos os pontos?')) {
|
| 760 |
+
points.length = 0;
|
| 761 |
+
pointCounter = 1;
|
| 762 |
+
updatePointsList();
|
| 763 |
+
updateCoordinatesTable();
|
| 764 |
+
updateMapMarkers();
|
| 765 |
+
latitude.value = '';
|
| 766 |
+
longitude.value = '';
|
| 767 |
+
}
|
| 768 |
+
});
|
| 769 |
+
|
| 770 |
+
// Initial setup
|
| 771 |
+
updatePointsList();
|
| 772 |
+
updateCoordinatesTable();
|
| 773 |
+
});
|
| 774 |
+
</script>
|
| 775 |
+
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=oadrianoferrari/cadutm" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
| 776 |
+
</html>
|
prompts.txt
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Criar um jogo estilo T-Rex Game de um Topografo com uma estação total na mão, onde ele pula os obstaculos: arvores, postes, bastões, drones, uma equipe de topografia, o cartório, o Incra
|
| 2 |
+
Não esta conseguindo pular o obstaculo sem dar fim de jogo, também colocar um terreno por onde ela passar, com verde e gramas
|
| 3 |
+
mostrar a pontuação anterior, a grama tem qu dar aparencia que se mexendo é possivel melhor o gráfico para ficar igual nintendo? o drone tem que passar acima do solo para que ele se abaixe
|
| 4 |
+
não está pulando nem abaixando, inserir também como obstaculo placas escrito Portal Agrimensura
|
| 5 |
+
não está pulando com a barra de espaço
|
| 6 |
+
Vamos criar um jogo 3d realista o máximo que conseguir alcançar para web, Jogo no estilo Hunter porém simulando um teodolito onde temos que ler o centro dos alvos o mais rápido possivel
|
| 7 |
+
ao clicar em start game, não acontece nada
|
| 8 |
+
não funciona, pode ser 2D mesmo
|
| 9 |
+
a mira tem que se mover conforme mexe o mouse
|
| 10 |
+
na mira colocar a figura de um teodolito como se ele ficasse parado mais só a mira e a direção direita ou esquerda como funciona realmente um teodolito
|
| 11 |
+
copiar este site https://g1.globo.com/
|
| 12 |
+
crie um programa cad que consigamos inserir coordenadas UTM
|
| 13 |
+
a visualização não funcionou muito bem, quando exportar também enviar a conversão
|
| 14 |
+
o ponto não está inserindo
|
| 15 |
+
Deixar a tela de visualização maior ao centro da tela, exportar também apra excel(xls) permitir importar arquivo txt com coordenadas no padrão id,este,norte,cota,descrição
|
| 16 |
+
possivel colocar um fundo tipo google earth no fundo do visualizador?
|
| 17 |
+
não apareceu o fundo usar outro serviço de mapas gratuito
|
| 18 |
+
agora trouxe o fundo, porém não é o lugar das coordenas inseridas, também incluir download KML
|
| 19 |
+
retirar o fundo de mapa
|