What is MIME type "application/geopackage+sqlite3"?
A MIME type is a string that tells browsers and other tools how to handle a particular kind of file.
application/geopackage+sqlite3 is a MIME type for geospatial data stored in a SQLite3 database. It follows the OGC GeoPackage standard and wraps both vector and raster information in one container.Files using this MIME type typically have the extension GPKG.
- Geospatial storage: Suited for archiving and transferring map data.
- Data integrity: Contains geometries, attributes, and metadata in one file.
- Software support: Recognized by many desktop and mobile GIS tools.
- Flexibility: Can store diverse datasets like vector layers, imagery, and spatial indexes.
For more on the standard, check the GeoPackage website or the OGC GeoPackage Standard.
Associated file extensions
Usage Examples
HTTP Header
When serving content with this MIME type, set the Content-Type header:
Content-Type: application/geopackage+sqlite3
HTML
In HTML, you can specify the MIME type in various elements:
<a href="file.dat" type="application/geopackage+sqlite3">Download file</a>
Server-side (Node.js)
Setting the Content-Type header in Node.js:
const http = require('http');
http.createServer((req, res) => {
res.setHeader('Content-Type', 'application/geopackage+sqlite3');
res.end('Content here');
}).listen(3000);
Associated file extensions
FAQs
How do I configure Apache or Nginx to serve GeoPackage files?
To ensure browsers and clients handle .gpkg files correctly, you must add the MIME type to your server configuration. For Apache, add AddType application/geopackage+sqlite3 .gpkg to your .htaccess or config file. For Nginx, add application/geopackage+sqlite3 gpkg; to your mime.types file.
What software can open application/geopackage+sqlite3 files?
These files are designed for GIS (Geographic Information System) applications. Industry-standard tools like QGIS, ArcGIS Pro, and the GDAL command-line utilities fully support reading and writing this format. Since the underlying structure is a database, you can also open them with generic SQLite viewers, though you won't see the map visualization.
Why is my GeoPackage detected as application/vnd.sqlite3?
This happens because a GeoPackage file is technically a SQLite 3 database container. Many automatic MIME detectors look at the file header (magic numbers), which is identical for both formats. To distinguish them, systems should check for the .gpkg extension or look for specific internal tables defined by the OGC GeoPackage Standard.
Can web browsers display application/geopackage+sqlite3 data natively?
No, standard web browsers (Chrome, Firefox, Edge) cannot natively render .gpkg files like they do images or PDFs. To display this data on a website, developers typically use JavaScript libraries like OpenLayers or convert the data into web-friendly formats such as GeoJSON or vector tiles.
What are the advantages of using this MIME type over Shapefiles?
Unlike Shapefiles, which require multiple sidecar files (.shp, .shx, .dbf), a file with the application/geopackage+sqlite3 type is a single, self-contained file. It also supports file sizes larger than 2GB, handles Unicode characters better, and can store both vector features and raster tile matrices in the same container.
Is application/geopackage+xml a valid alternative?
Generally, no. The standard MIME type for the binary GeoPackage container is application/geopackage+sqlite3. While XML might be used for metadata within the package, the file itself is a binary SQLite database, so the +sqlite3 suffix is the technically correct identifier for the .gpkg file extension.
General FAQ
What is a MIME type?
A MIME (Multipurpose Internet Mail Extensions) type is a standard that indicates the nature and format of a document, file, or assortment of bytes. MIME types are defined and standardized in IETF's RFC 6838.
MIME types are important because they help browsers and servers understand how to process a file. When a browser receives a file from a server, it uses the MIME type to determine how to display or handle the content, whether it's an image to display, a PDF to open in a viewer, or a video to play.
MIME types consist of a type and a subtype, separated by a slash (e.g., text/html, image/jpeg, application/pdf). Some MIME types also include optional parameters.
How do I find the MIME type for a file?
You can check the file extension or use a file identification tool such as file --mime-type on the command line. Many programming languages also provide libraries to detect MIME types.
Why are multiple MIME types listed for one extension?
Different applications and historical conventions may use alternative MIME identifiers for the same kind of file. Showing them all helps ensure compatibility across systems.