13

I'm assuming this is a simple question, though my efforts have not yet found the answer!

I want to import a large number of polylines and/ or polygons into one one or more QGIS layers in order to plot the data. Each will only have simple attributes (e.g. name). I need to know:

  1. The required format of the CSV file to enable step 2.
  2. The command or plug in required to create a polyline or polygon layer in QGIS.

For information, the input CSV files are written by bespoke Excel VBA or by FORTRAN codes, so I have full control of these output formats. Essentially I'm looking for the polyline and polygon equivalent of the delimited text plugin. Thanks!

  • Maybe you can have a look at gis.stackexchange.com/questions/24264/…. – PieterB Jul 18 '12 at 13:08
  • If you have full control of the output, perhaps you could write the data into well known text or .kml or .gml, all of which you could use in QGIS? What format do you ultimately want the data in? – Darren Cope Jul 18 '12 at 17:05
  • Thanks for your reply. Interesting, but I think not the solution. I have co-ordinates in decimal degrees in simple text or CSV files. I want these to be displayed in QGIS as polylines (not all points to be joined together), not as points. The option of polygons would be helpful, but not so important. – Tim Fowler Jul 19 '12 at 10:21
  • Thanks for your interest. I should have been more precise. I have full output control of the format of my character files (.txt, .csv) but not easy access to complex file formats, and being new to GIS I have no idea what .kml or .gml are! – Tim Fowler Jul 19 '12 at 10:24
8

You can use Layer > Add delimited text layer

enter image description here enter image description here

For more about this, you can read: Visualising WKT geometry string in QGIS

  • 1
    @TimFowler Please let us know what you ended up doing. I am in a similar situation, but I don't think the import option above will work for me. Thanks! – James Oct 3 '12 at 3:14
  • @James Just do as with normal CSV file but instead of "X Field" and "Y Field", select "WKT Field" (right above the "Sample text" window in PieterB's second picture) and the corresponding column. – Cao Minh Tu Feb 8 '17 at 8:01

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.