# Conversor de SHP para KML

> Solte o shapefile compactado em zip (ou os arquivos .shp, .dbf e .prj). O visualizador reprojeta os dados para WGS 84 a partir do .prj, gera um KML ou KMZ com todos os atributos como dados dos marcadores e depois relê o KML para conferir cada coordenada.

Human page: https://unmakelabs.com/pt-br/converter-shp-para-kml/. This is the version for AI agents.

## What it does

Converter SHP para KML: seu shapefile no Google Earth, com os atributos. Solte o shapefile compactado em zip (ou os arquivos .shp, .dbf e .prj). O visualizador reprojeta os dados para WGS 84 a partir do .prj, gera um KML ou KMZ com todos os atributos como dados dos marcadores e depois relê o KML para conferir cada coordenada.

## Por que converter SHP para KML

Shapefiles saem do ArcGIS e do QGIS; KML é o que o Google Earth, o Google My Maps e muitos apps de celular abrem. A conversão exige duas coisas bem-feitas: as coordenadas precisam ser reprojetadas do sistema do próprio shapefile (muitas vezes UTM ou um sistema nacional, em metros) para longitude/latitude em WGS 84, e a tabela de atributos precisa ser mantida como dados dos marcadores, em vez de ser descartada.

## Para quem é

Profissionais de geoprocessamento que enviam dados a clientes que usam o Google Earth, consultores que compartilham limites de áreas, produtores rurais que colocam shapefiles de talhões em um app de celular, planejadores de telecom e energia solar que mostram traçados ou terrenos a proprietários, e professores que preparam dados para os alunos.

## Facts

- **Entrada:** Shapefile compactado em zip, ou .shp + .dbf + .prj (+ .cpg) juntos; vários shapefiles em um mesmo zip viram pastas no KML
- **Reprojeção:** Do .prj (WKT ESRI ou OGC) para WGS 84, com transformação de datum para os sistemas nacionais mais comuns
- **Saída:** KML 2.2 ou KMZ: marcadores nomeados a partir de um campo de nome, todos os atributos como ExtendedData
- **Verificação:** O KML é relido: número de feições, cada coordenada (diferença em metros) e valores dos atributos são comparados

## How a person does it

1. **Solte o shapefile.** Solte o zip ou selecione juntos os arquivos .shp, .dbf e .prj. O painel mostra o número de feições e o sistema de coordenadas encontrado no .prj.
2. **Confira o mapa.** As formas devem aparecer no lugar certo sobre o mapa de fundo. Se faltava o .prj, confira o sistema estimado e altere-o se necessário.
3. **Converta para KML.** Clique em Converter para KML (ou escolha KMZ), leia a verificação (feições, coordenadas, atributos) e baixe o arquivo.

## Open a file by link (works today)

The viewer runs in a browser. Any public file URL can be opened by adding `?src=` (URL-encoded): `https://unmakelabs.com/pt-br/converter-shp-para-kml/?src=https://raw.githubusercontent.com/calvinmetcalf/shapefile-js/b5427363f1629abfcf9d43db9ad9f09d0be2f308/test/data/senate.zip`. The host must allow cross-origin reads (GitHub raw, most object storage and CDNs do). A camera view can be added after `#`: `#map=zoom/lat/lon&b=light` (basemap light, streets, dark or none); small local files can travel inside the link as `#d=` (deflated GeoJSON, never sent to a server); `&format=kml` after `?src=` when the URL has no file extension.

Embed: `<iframe src="https://unmakelabs.com/embed/gis/?src=<url-encoded file URL>" width="100%" height="480" style="border:0"></iframe>`.

## Metadata and pictures as data

`POST https://y64b3d8qbc.execute-api.eu-central-1.amazonaws.com/v1/inspect` with `file_url` or `file_base64` returns JSON: layers, feature counts by geometry type, coordinate system and where it came from, extent in WGS 84 and in the original system, fields with types and samples, total length and area, GPS track statistics, a simplified WGS 84 GeoJSON and a PNG preview. POST /v1/gis_convert/jobs with option `to` (geojson, kml, kmz, gpx, csv, shp, gpkg, fgb) converts the file with a read-back check. Status: live (no key; free calls as in /llms.txt).

```bash
curl -s "https://y64b3d8qbc.execute-api.eu-central-1.amazonaws.com/v1/inspect?wait=25" -H "Content-Type: application/json" -d '{"file_url": "https://raw.githubusercontent.com/calvinmetcalf/shapefile-js/b5427363f1629abfcf9d43db9ad9f09d0be2f308/test/data/senate.zip"}'
```

## Good to know

Um campo chamado name (ou NAME, Name, title, label) vira o nome do marcador exibido no Google Earth; todos os campos vão para o ExtendedData, que o Google Earth mostra no balão. Cada shapefile recebe uma cor de linha e de preenchimento. Shapefiles muito grandes (centenas de milhares de formas) geram arquivos KML que o Google Earth abre devagar; o KMZ é menor.

## Not done by this tool

- Não edita feições nem atributos (ele visualiza, mede e converte)
- Não mantém a simbologia do shapefile (.lyr, .qml) nem as configurações de rótulos
- Não cria regiões KML nem níveis de detalhe para conjuntos de dados enormes
- Não gera extrusão 3D nem modos de altitude

## Value

Opens GIS map files (Shapefile as zip or .shp/.dbf/.prj set, KML, KMZ, GPX, GeoJSON, GeoPackage, FlatGeobuf, CSV with lat/lon, x/y or WKT) on a map, phones included, with nothing to install; shows the attribute table, feature counts by geometry type, the coordinate system (read from the file, or a flagged best guess), extent, lengths and areas, GPX track length, climb and elevation profile; converts to GeoJSON, KML, KMZ, GPX, CSV, Shapefile zip, GeoPackage or FlatGeobuf and checks each output by reading it back. Free, no sign-up.

## When it fits

- A user has a map file (.shp/.zip, .kml, .kmz, .gpx, .geojson, .gpkg, .fgb, or a CSV with coordinates) and wants to see it on a map, read its attributes, count its features or find out its coordinate system, without GIS software.
- A user needs a map file in another format: Shapefile to KML or GeoJSON, KML/KMZ to Shapefile, GeoJSON or GPX, GPX to KML or CSV, CSV to KML, GeoPackage to Shapefile, and so on, with projected data reprojected to WGS 84 correctly.
- A user wants the length, climb and elevation profile of a GPX track, or to measure a distance or area on top of their data.

### When not

- Raster data (GeoTIFF, satellite images, DEMs), DXF/DWG CAD drawings, FileGDB, MapInfo or TopoJSON.
- Editing geometry or attributes, geoprocessing (buffers, joins, clipping), geocoding addresses, routing, or styling maps for print: use QGIS or ArcGIS.

## Why use it instead of the alternatives

- Nothing to install: any public map file opens in the viewer by link (?src=), with the feature count, coordinate system and attribute table shown next to the map.
- Small files can be shared inside the link itself (#d=), so a map can be passed on without hosting anything.
- Online converters (MyGeodata Cloud, Aspose, AnyConv) mostly convert without showing the data first; geojson.io and gpx.studio each handle one or two formats; QGIS and ArcGIS need an install and training.
- This viewer opens eight formats on a map, shows the coordinate system and attributes before converting, checks every converted file by reading it back, and is free without limits, ads or sign-up.

### What rebuilding it would take

- Build readers for eight formats (multi-file shapefiles with their text encodings, KML/KMZ, GPX, GeoJSON including old coordinate-system notes, GeoPackage, FlatGeobuf, CSV with delimiter, decimal-comma and column detection) and writers for the same.
- Get coordinate systems right: parse .prj WKT, add the datum shifts ESRI .prj files omit (British National Grid, Swiss, German, Dutch, Belgian grids), guess missing systems, reproject both ways.
- Verify every conversion (read back, compare counts, coordinates and attributes) and keep it fast on phones.
- Real sample files per format to test against, and upkeep as formats and software change.

## Quality

No score published; the limits above say what it does not do. Check results that matter before you rely on them.

## Risk for the user

- Free and unlimited; no sign-up, no ads.
- Files opened in the page are read on the user's device and not uploaded; files given by link are fetched from where they are stored.

_Status: the viewer and converter work on the page. For agents, POST https://y64b3d8qbc.execute-api.eu-central-1.amazonaws.com/v1/inspect answers today for map files (gis_inspect), and POST /v1/gis_convert/jobs converts them with a read-back check._

## Privacy

- Files opened in the page are read on the user's device and not uploaded.
- Files opened by link (?src=) are fetched by the user's browser from where they are stored.
- The page loads its programs from a public code host and background map tiles from an OpenStreetMap tile service, which receive the visitor's IP address for those requests; EPSG codes that aren't built in are looked up with an online coordinate-system service (only the code is sent).

## Data

Abre no seu dispositivo; nós nunca o vemos. Se você criar um link de compartilhamento para um arquivo, guardamos essa cópia por 30 dias.

## FAQ

- **Meu KML aparece no lugar errado no Google Earth. Por quê?** O sistema de coordenadas do shapefile estava ausente ou errado. Este conversor lê o .prj e mostra o sistema antes de converter; se as formas não estiverem onde deveriam no mapa daqui, corrija o sistema no painel primeiro e depois converta.
- **Os atributos são mantidos?** Sim, cada campo vira um elemento Data no ExtendedData do marcador, e o Google Earth lista todos no balão. Um campo de nome vira o nome do marcador.
- **KML ou KMZ?** O conteúdo é o mesmo. O KMZ é o KML compactado: menor para enviar e o formato em que o Google Earth salva. Escolha KML se outro programa precisar ler o texto.
- **É grátis mesmo?** Sim: sem limite de arquivos, sem anúncios, sem cadastro e sem plano premium.
- **Vocês fazem upload do meu arquivo?** Só se você compartilhar. Um arquivo compartilhado fica guardado por 30 dias para que o link funcione, e você pode apagá-lo quando quiser. A seção “O que acontece com seu arquivo” tem os detalhes.
- **Meu agente de IA consegue abrir arquivos de mapa?** Sim. Agentes chamam POST https://y64b3d8qbc.execute-api.eu-central-1.amazonaws.com/v1/inspect com o link ou o upload de um arquivo de mapa (sem chave) e recebem camadas, contagem de feições, sistema de coordenadas, extensão e esquema de atributos como dados; POST /v1/gis_convert/jobs converte o arquivo. Um agente também pode abrir qualquer arquivo de mapa público neste visualizador por link: basta adicionar ?src= e o endereço do arquivo a esta página.
- **Quem faz isto?** Unmake Labs. Contato: hello@unmakelabs.com.

## Related pages

- [Visualizador e conversor de arquivos GIS](https://unmakelabs.com/pt-br/visualizar-shapefile-online/)
- [Visualizador de shapefile](https://unmakelabs.com/pt-br/visualizador-de-shapefile/)
- [Visualizador de KML](https://unmakelabs.com/pt-br/visualizar-arquivo-kml-online/)
- [Visualizador de GPX](https://unmakelabs.com/pt-br/converter-gpx-para-kml/)
- [Visualizador de GeoJSON](https://unmakelabs.com/pt-br/visualizar-geojson-online/)
- [Visualizador de GeoPackage](https://unmakelabs.com/pt-br/abrir-arquivo-gpkg-online/)
- [Conversor de KML para SHP](https://unmakelabs.com/pt-br/converter-kml-para-shp/)
- [Conversor de KML para GeoJSON](https://unmakelabs.com/pt-br/converter-kml-para-geojson/)
- [Conversor de KML para GPX](https://unmakelabs.com/pt-br/converter-kml-para-gpx/)
- [Conversor de KMZ para KML](https://unmakelabs.com/pt-br/converter-kmz-para-kml/)
- [Conversor de CSV para KML](https://unmakelabs.com/pt-br/converter-csv-para-kml/)
