Import: How can I import ESRI Shapefiles? ΒΆ

An ESRI Shapefile is actually a set of several files, where .shp file contains geometry data and .dbf file contains data related to those geometry data. To read data from .dbf file you need to have PHP compiled with the dBase extension (-enable-dbase). Otherwise only geometry data will be imported.

To upload these set of files you can use either of the following methods:

Configure upload directory with $cfg['UploadDir'], upload both .shp and .dbf files with the same filename and chose the .shp file from the import page.

Create a zip archive with .shp and .dbf files and import it. For this to work, you need to set $cfg['TempDir'] to a place where the web server user can write (for example './tmp').

To create the temporary directory on a UNIX-based system, you can do:

cd phpMyAdmin mkdir tmp chmod o+rwx tmp