2

I'm trying to create a base map for a Maine Coastal area, and wanted to create a polygon layer of the land cover from the coastline in QGIS.

Whether I created the coastline vector layer from the USGS national map or downloaded it from NOAA, both options leave me with a multipart line. Ignoring islands the USGS data has ~100 almost connected line segments and the NOAA layer (below) is about 800 connected line segments.

I had thought I could disolve these and run linetopoly, but that seems to have some more processing needed that I don't understand, does anyone see what I should be doing to create or get my polygon layer?

The raw data looks like this, maybe I could make the coast into one segment?

856
 -69.340984,44.013133
...
 -69.345531,44.014013
END
857
 -69.356459,44.008586
...
 -69.356459,44.008586
END
858
 -69.340544,44.012986
 -69.341057,44.013719
etc...

failed linestopoly

  • I may have used another question to get what I needed, though I don't have too many "dangling ends" using a buffer to merge all the lines into a thin polygon and then back to lines does get me a polygon layer that will work. gis.stackexchange.com/questions/30765/… Is there a more direct way though? – adzuci Jan 11 '14 at 9:12
1

There seems to be problem in the ordering and the orientation of your lines when you createthe polygons. I suggest that you first create the lines , then you correct the topology (see e.g. v.clean, How to repair topology of a shapefile? ) then convert your lines to polygon.

In your case, I would not use Open street map but keep using data from your "authentic" source. I know this can be discussed, but the quality of Open street map is not uniform. I am particularly careful when the definition of the object of interest is not unique: What is a coastline for you ? If it has been digitized by hand you could have some differences due to the tides. Note that OSM is sometimes using other datasources. So it is worth checking that they are not using the USGS dataset before you start the cleaning work.

EDIT : as your buffer is very small, you could round your coordinates before importing your text to line and this would avoid you lots of trouble. Consider that one meter is about 10E-5, so 10E-9 is less than a millimeter. You won't lose information if your round your coodinates to 10E-7

  • Thanks! You are completely right, the problem is the ordering, but I bet I might have the same problem with an OSM coastline. All the datasources differ, rivers specifically, but even USGS and NOAA seem to be differnt though both look to be derived at "mean high tide" and be accurate to ~1m. The GRASS toolbox looks useful, but tedious, I'll take a look at it when I have the time. -- In the meantime the buffer trick seems to work and took about 10 clicks, 2 extra layers & 10 minutes of processing time to get twitpic.com/ds25xs. Is that type of trick common practice in GIS land? – adzuci Jan 12 '14 at 19:45
  • the connectivity of the OSM coastline is OK. My concern is about the fact that the same coastline could have been built using the interpretation of different users with different definitions (for instance, a GIS scientist on the beach with is GPS, a marine scientist using a VHR image or some analysis of SAR dataset...) – radouxju Jan 12 '14 at 19:51
  • your "buffer trick" is a workaround for topological cleaning of a dataset. Personnaly, I do this by setting a tolerance for the line vertices, but is it works in your case then it is fine. However, if the buffer radius is large, this could create some artefacts or oversimplification of your boundaries. – radouxju Jan 12 '14 at 19:56
  • I'm learning some new vocabulary here, but I think I understand the idea. I'm not sure what you mean by "setting a tolerance for the line vertices", but I would like to understand a more direct process. I think the buffer radius was something like .000000001 map units or whatever the smallest number I could input, so I don't notice the simplifications. – adzuci Jan 12 '14 at 20:08
  • topology = relationship between two feature that do not depend on their shape (e.g. A touches B, C is inside D...) Tolerance: minimum distance to consider that two vertices are equal. – radouxju Jan 12 '14 at 20:43
0

Coastlines already formatted as shapefiles are available from Openstreetmap:

https://osmdata.openstreetmap.de/

So no need to invent the wheel a second time.

Connecting lines to build closed polygons is a bit of fiddling work. I prefer to use the Openstreetmap editor JOSM for such things. There might be other tools in the GIS world too.

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.