# Draw Bounds with coordinates in QGIS from CSV

I have a CSV file that contains 4 coordinates on each line, 1 min latitude, 1 max latitude, 1 min longitude and 1 max longitude. These 4 points delimit a particular region(they are the bounds) I would like to draw for each row of my CSV, the region corresponding to the 4 points. How can I do that?

To be more clear this is what i want(done with OpenStreetMap):

This is the csv:

In particular NORTH,SOUTH,WEST and EAST are the 4 coordinates that define my bounds

• Can give a screenshot of your csv file, or provide the first 4 rows. Sep 27 '18 at 3:09
• OK i added it. Look at the post Sep 27 '18 at 3:15

## How to convert east-west-north-south bounds to WKT formatted polygon

WKT format for polygons is like this:

POLYGON ((x y, x y, x y, x y, x y))

It's useful to note that the OGC standard definition requires a polygon to be topologically closed. It also states that if the exterior linear ring of a polygon is defined in a counter clockwise direction it will be seen from the "top". Any interior linear rings should be defined in opposite fashion compared to the exterior ring, in this case, clockwise. - Wikipedia

So you need to convert your boundary lat/long values to corner coordinates. It helps to draw out the polygon, like so:

Starting at the southwest corner and proceeding counterclockwise, the WKT coordinates look like this:

POLYGON ((W S, E S, E N, W N, W S))

In your spreadsheet, add a new column called WKT. Use the `concatenate()` function to combine the W-E-S-N values into WKT format.

=CONCATENATE("POLYGON ((", C2, " ", E2, ", ", D2, " ", E2, ", ", D2, " ", F2, ", ", C2, " ", F2, ", ", C2, " ", E2, "))")

I would import my data 4 times using the Add Delimiter 4 times:

West-South West-North East-North East-South

Merge the layers and then use the Points2One plugin (not available in Qgis3x)

Group your layers by Region. You might need to create intermediary ids to sort the order of you points in the merged file.

I hope this helps.