2

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

5

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. – Bodhi 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 – Bodhi Nov 26 '18 at 9:34
2

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)
    4326))

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:

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

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.