GISDirect
Guides › Basics

GIS File Formats Explained — SHP, GeoJSON, KML, GPKG and GeoTIFF

GISDirect · 2026-12-01

Work in GIS for a week and the same dataset will reach you as .shp, .geojson, .kml and .gpkg in turn. Knowing which to use, and what gets dropped when you convert, prevents a whole category of avoidable mistakes. This guide covers only the formats you actually meet in practice — how they differ, where each belongs, and what conversion costs.

The one-page version

GIS files split into vector (point/line/polygon geometry plus an attribute table) and raster (a grid of pixel values). Knowing which one you were handed solves half the problem.

ExtensionKindIn one line
.shp(+.shx .dbf .prj)VectorMost widely used, but a file set with real limits
.gpkgVector + rasterThe recommended format — one file, UTF-8, many layers
.geojson .jsonVectorPlain text, easy to handle, bulky, CRS is fixed
.kml .kmzVectorFor Google Earth — lat/lon only, carries styling
.csvVector (points)Needs coordinate columns to become a map
.dxf .dwgVector (CAD)Drawings — usually no CRS and no attributes
.tif .tiffRasterGeoTIFF — the standard for imagery and DEMs
.ascRasterText grid — DEM exchange, very bulky

Vector formats — what to use when

Shapefile (.shp)

A 1990s format that is still the de facto standard for public data distribution. It is not one file but a set of at least four — .shp .shx .dbf .prj — so copying only the .shp gets you nothing. The structure and the mangled-text problem are covered separately in how to open a SHP file.

Three limits are worth remembering: attribute names cap at 10 characters (which is why public datasets are full of cryptic abbreviations), 2 GB per file, and one geometry type per file. On top of that the .dbf does not record its own text encoding, so non-ASCII attributes break easily.

GeoPackage (.gpkg) — use this for anything new

An OGC standard that is a SQLite database inside. None of the Shapefile limits apply.

The only drawback: older software and some delivery specifications still accept Shapefile only. So a common pattern is work in GeoPackage, deliver as Shapefile.

GeoJSON (.geojson)

Plain JSON text, so it opens in any editor and dominates web maps and APIs. It also diffs well, which makes it pleasant to keep in git.

The CRS is fixed: the standard (RFC 7946) specifies that GeoJSON coordinates are longitude/latitude in EPSG:4326. Writing projected coordinates straight into GeoJSON produces an out-of-spec file that other tools will place in the wrong part of the world. Reproject to lat/lon before exporting GeoJSON.

Being text also makes it large. Each coordinate costs a dozen or so characters, so a detailed national boundary set can run into hundreds of megabytes. GeoPackage is the better choice at that size.

KML and KMZ (.kml .kmz)

Google Earth's format. A .kmz is simply a zipped .kml — rename it to .zip and you will find the .kml and its icon images inside.

Like GeoJSON it is lat/lon only, but unlike it, KML carries styling — line colours, fills, icons — inside the file. That makes it convenient for showing results and awkward for analysis, since the attribute table is not really a table. If you need to analyse data you received as KML, convert it to GeoPackage or Shapefile first.

CSV — check for coordinate columns first

A spreadsheet export is not a map file on its own. It needs longitude and latitude (or X and Y) columns before it can be plotted. Three common traps:

DXF and DWG — CAD drawings

These arrive from surveyors and designers. The usual blocker is that they carry no CRS and no attributes. A line in a drawing is just "a line on some layer"; what it represents is often a separate floating text object rather than a field.

So working with a DXF normally means filtering by layer name and assigning the CRS by hand. .dwg is AutoCAD's proprietary format, so ask for .dxf when requesting an exchange file.

Try it → drop any of these into the map workspace and it opens straight away, ready to export to another format. Files are processed in your browser and never uploaded to a server.

Raster formats

GeoTIFF (.tif)

Nearly all satellite imagery, drone orthomosaics and DEMs use this. It is an ordinary TIFF with georeferencing stored in tags, which is why a basic image viewer will still show the picture (and silently ignore the position).

Three things to check: band count (3 for RGB, more for multispectral), data type (integer or floating point — results like NDVI must be float), and the NoData value (how empty areas are marked — get this wrong and blank margins enter your statistics as zeros).

COG — for large imagery

A Cloud Optimized GeoTIFF is a GeoTIFF with internal tiling and reduced-resolution overviews. It is still a valid GeoTIFF, so anything can open it, but readers can fetch just the part they need — which means a multi-gigabyte scene can be displayed without downloading all of it. If imagery will be served over the web, build it as COG.

.asc and world files

.asc (ASCII Grid) writes grid values out as plain numbers. It shows up in DEM exchange and is several times larger than the same data as GeoTIFF; convert on arrival.

If a JPG or PNG sits next to a small .jgw, .pgw or .wld file, that is a world file. The image itself has no coordinates, so the position lives in the sidecar — move both together or the georeferencing is lost.

What disappears when you convert

Change format and anything the target cannot represent is dropped without warning. The losses you will actually hit:

ConvertingWhat is lost
GeoPackage → ShapefileAttribute names over 10 characters (truncated), multiple layers (split into files), date/time precision
Anything → GeoJSONThe original CRS (becomes lat/lon), styling
Anything → KMLAttribute table structure (collapsed into a description field)
GeoTIFF → JPG/PNGCRS (without a world file), decimal values (crushed to integers), NoData distinction
Vector → rasterExact boundaries (stair-stepped to the cell size), all attributes but one
Keep the original. None of the above is reversible. In particular, once a Shapefile export has truncated your field names, converting back to GeoPackage will not bring them back.

So which one

Formats cause fewer accidents than coordinate systems do. Get the format right and the CRS wrong, and every position and area is still off. Read the CRS guide and the area calculation guide alongside this one.