2

I've previously converted simple shapefiles to WKT so that I can store them in RDMS that has spatial capabilities. I'm a new user to QGIS, which I'm using to browse a shapefile. But now I have a shapefile like this:

Not only are there polygons, but there are labels on those polygons. Really what I'd like is to strip off the polygons and save them with their associated label. So something like:

row1 ("POLYGON((1 1,5 1,5 5,1 5,1 1))) 'high'
row2 ("POLYGON((2 2,5 1,5 5,1 5,2 2))) 'medium'
row3 ("POLYGON((5 5,5 1,7 7,1 5,5 5))) 'high'
row3 ("POLYGON((8 8,5 1,5 5,1 7,8 8))) 'low'

I'm a little stumped at the best way to creatively slice up my shapefile, ideally by some of the attributes defined in the accompanying dbf file. Ideally I'd like to:

  1. export, as WKT, all of the polygons with 'high'
  2. export, as WKT, all of the polygons with 'low'

etc, etc.

closed as unclear what you're asking by underdark Jan 5 '15 at 22:02

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    Are you saying everything is stored in the shapefile and co already? There's no converter like shp2pgsql for sql-server? That would import the dbf as the table and add the geometry column from the shp. – lynxlynxlynx Jul 27 '14 at 17:57
  • 1
    is there any reason you converted to WKT from SHP before going to the RDMS? QGIS, for example can allow you to dump the SHP to SpatiaLite, for example, without going to WKT... maybe I'm not understanding the problem... – DPSSpatial Jul 28 '14 at 20:40