2

I need to output shapefiles for archiving, which requires generating .shp, .shx and .dbf files. When I save a layer as a shapefile it generates the first two, but not the dbf. All the help I can find tells me how to import a dbf file but not export.

The dbf files will need to contain ID, X and Y fields.

Any ideas?

5

If you don't have a .dbf file, you probably have an empty attribute table.

To get the X and Y of a point layer, you have to add them to the attribute table using the field calculator. $X and $Y from the Geometry section will add the coordinate values. Be sure to change the field type to real, and set the precision greater than zero if using degrees.

For a line or polygon layer, you can export the coordinates of the line vertices with the mmqgis plugin to a CSV file.

  • That's great, worked fine. I discovered I also needed to merge a few layers, which meant converting geometry, and that was easier with the Data Management Tools in the Vector menu than with mmqgis, though both worked. – user20827 Aug 27 '13 at 12:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.