SpatiaLite logo

About ESRI Shapefiles and Virtual Tables

2011 January 28

Previous Slide Table of Contents Next Slide

What's a Shapefile ?

Shapefile is a plain, unsophisticated GIS (geographic data) file format invented many years ago by ESRI: although initially born in a proprietary environment, this file format has been later publicly disclosed and fully documented, so it's now really like an open standard format.

It's rather obsolescent nowadays, but it's universally supported. So it represents the lingua franca every GIS application can surely understand: and not at all surprisingly, SHP is widely used for cross platform neutral data exchange.

The name itself is rather misleading: after all, Shapefile isn't a simple file. At least three distinct files are required (identified by .shp .shx .dbf suffixes): if a single file is missing (misnamed / misplaced / malformed / whatsoever else), then the whole dataset is corrupted and completely not usable.
Some useful further references:

What's a Virtual Shapefile (and Virtual Tables) ?

SpatiaLite supports a Virtual Shapefile driver: i.e. it has the capability to support SQL access (read-only mode) for an external Shapefile, with no need to load any data within the DB itself.
This is really useful during any preliminary database construction step (as in our case).
SQLite/SpatiaLite supports several other different Virtual drivers, such as the Virtual CSV/TXT, the Virtual DBF and so on ...

Anyway, be warned: Virtual Tables suffer from several limitations (and are often much slower than using internal DB storage), so they are not at all intended for any serious production task.

Previous Slide Table of Contents Next Slide

CC-BY-SA logo Author: Alessandro Furieri a.furieri@lqt.it
This work is licensed under the Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) license.

GNU logo Permission is granted to copy, distribute and/or modify this document under the terms of the
GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation;
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.