[GIS] How to convert polygon shapefile to CSV

convertcsvgeojsonMySQL

I can convert shapefile (having points) to CSV file, import in MySQL databases and then i can execute my queries for searching. Now I want to do same for polygon shapefile; that is, I want to convert a shapefile having polygons to CSV and then import in MySQL databases for search purposes.

Is that possible?

Actually i have a geojson file having road polylines. i want to convert this geojson to csv then import in databases and then execute my search queries e-g i want to draw on google map only those roads having length less than 10km etc.

Best Answer

In QGIS, you can use the MMQGIS plugin function "Export Geometry to CSV". This tool would generate WKT for each polygon in the shape file as well as any associated attributes. The process is simple and relatively quick.