Stata 15 help for import_shp


[D] import shp -- Import and export a shapefile


Load a shapefile

import shp [using] filename [, clear]

Save data in memory to a shapefile

export shp [using] filename [, replace]

If filename is specified without an extension, then .shp is assumed for both import shp and export shp. If filename contains embedded spaces, enclose it in double quotes.


import shp reads into memory a shapefile (.shp). Shapefiles are the nontopological format for storing the geometric location and attribute information of geographic features. Geographic features in a shapefile may be represented by points, lines, or polygons (areas). Shapefiles are usually paired with dBase files, which can store additional attributes that can be joined to shapefile's features. See import dbase for information about importing dBase files into Stata.

Stata has other commands for importing data. If you are not sure that import shp will do what you need, see [D] import and [U] 21 Entering and importing data.


clear is for use with import shp and specifies that it is okay to replace the data in memory, even though the current data have not been saved to disk.

replace is for use with export shp and specifies that filename be replaced if it already exists.


Read file point.shp into memory . import shp point

Export shapefile in memory to file mypoint.shp . export shp mypoint

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index