1

I've downloaded the data from Natural Earth (coastline at a scale 50 million), I've cut the coastline into my study area, I wanted to clip other vector datasets as well, for this I wanted to convert my coastline to a polygon. I've tried 2 methods: 1) Polygonize and 2) Line to Polygon (both are in processing tool), but as you can see from both of the results of this method, it gave me weird polygon shape.

Are there any other tools to create my coastline to a polygon and how?

This is my study area, which is with 2 polygon

enter image description here

This is the result of "Polygonize" (coordinates: user-defined coordinates)

enter image description here

This is the result of "Line to polygon" (WGS84, 4326) enter image description here

marked as duplicate by Ian Turton Apr 26 '18 at 7:52

This question was marked as an exact duplicate of an existing question.

  • Save as the coastline to a new shapefile and select wgs84 as selected CRS. After that, try to run polygonize to the new shapefile. – ilias m Apr 26 '18 at 6:36
  • @iliasm Nope, I've tried, the result is same as the second screenshot – ndr Apr 26 '18 at 6:45
3

You need to make sure that the polygon is closed before running Polygonize tool:

This is the same coastline that you have (coastline at a scale 50 million) in WGS84:

enter image description here

  • @ ahmadhanb I've edited my question with one more screenshot, which is my study area (North Asia with Europe), include 2 polygons, – ndr Apr 26 '18 at 6:42
  • 1
    @Nadira Since your study area is just a subset of the original data. You can edit the subset data to close the far right part. You need to do some editing of the cropped polyline to close all the parts. You need to move the small part in the far left and close the far right portion. Do not expect the automatic way will be 100% correct. The manual editing sometime is much better than the automatic method. After closing the far right portion, you can run Polygonize to convert the polyline to polygon. – ahmadhanb Apr 26 '18 at 6:48
  • hey thanks a lot! you are right, but how I'll move the left part to the right? I was thinking about drawing them manually on the right side...(sorry, I'm still a newbie) – ndr Apr 26 '18 at 6:58
  • You can refer to this answer: gis.stackexchange.com/questions/70411/…. The answer will enable you to connect the far apart portions by changing the projection. – ahmadhanb Apr 26 '18 at 7:06
  • I've moved the left part to the right and connected them (editing mode > select > move features > merge selected features), and the other part ill cut them again to connected in left below. Is it even correct to do it so? thanks a lot, I'll check that link now. – ndr Apr 26 '18 at 7:10

Not the answer you're looking for? Browse other questions tagged or ask your own question.