I am using QGIS 3.2 and I need to create an area to form a polygon shapefile using latitude and longitude, not using Python as I am just a beginner. How to do this?


To give an example according to @geom recommendation. You must use the syntax to define polygons in WKT format, here an example in CSV:

enter image description here

Finally use add delimited text data source:

enter image description here

With the following result:

enter image description here

To edit the question to provide an example of where I need to create a polygon via distances.

I need to create a polygon to represent a survey area. The survey area required is 3.58km x 3.0km. I have used the v.buffer GRASS tool and the Buffer tool. Which I select a certain point to buffer Around to create the survey area. However I cant find any input within these tools where I can enter such distances. Do you know how to fix this?

  • perfect, thank you for providing an example. Would I follow the same formula if I wanted a polygon with specific dimensions rather than coordinates. e.g length in km. – Louis Tate Nov 21 '18 at 14:16
  • Could @Bodhi provide some example, some data to provide what you require? I think it's best to do the coordinate calculations from the dimensions in the spreadsheet and then perform their representation in QGIS. – SamTux Nov 21 '18 at 16:17
  • sure, Provided an example in the problem – Louis Tate Nov 26 '18 at 9:34

An addition to the answer above: I found it pretty complicated to write the WKT using the boundary coordinates myself. If you have Postgres with Postgis extension (and possibly pgadmin) available (use the Docker version!), just execute the following:

SELECT ST_AsEWKT(ST_MakeEnvelope (
    12.147653576, 50.978794549, --lng-lat bounding 
    13.216635542, 51.684973715, --lng-lat box limits (Example)

You will get back the eWKT formatted string:

SRID=4326;POLYGON((12.147653576 50.978794549,12.147653576 51.684973715,13.216635542 51.684973715,13.216635542 50.978794549,12.147653576 50.978794549))

This can be loaded using the answer above in QGIS with import CSV or using the "QuickWKT" plugin

For anyone who still wants to do this manually, here's the format for 2-coordinate bbox-polygon:

left-lng bottom-lat,
left-lng top-lat,
right-lng top-lat,
right-lng bottom-lat,
left-lng bottom-lat))

Use geojson. Just create a valid .geojson file with contents such as:

{"coordinates": [[[31, -5],
                  [32, -5],
                  [32, -4],
                  [31, -4],
                  [31, -5]]],
 "type": "Polygon"}

You can use a tool like geojsonlint to make sure the syntax is correct. Once you have a valid geojson, save it to a file, e.g my_polygon.geojson. Then, just drag and drop it to your "Layers" in QGIS. That's it.

enter image description here

In my opinion, this is much easier than the methods mentioned in other answers.


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.