In Java I would like to stroke the bathymetry depth lines instead of filling the area. I'm starting with the Natural Earth Bathymetric Data: http://www.naturalearthdata.com/downloads/10m-physical-vectors/. When I apply a stroke with these files I get extra lines where the data is split into features.

Working in QGIS with the ne_10m_bathymetry_K_200 file I've tried dissolve, Polygons to lines, and in Grass tried to follow the steps outlined in this post: Dissolve polygons in QGIS (GEOS) with tolerance

No matter what I do I'm left with a stubborn line just North of Australia and a line at the right edge of the screen. If I zoom in on the line North of Australia it does look like there is a gap between these polygons.

How can I remove those last two lines?

  • is the right edge you mentioned just to the east of NZ? If so it might be the antimeridian?
    – Steven Kay
    Commented Jul 18, 2015 at 18:30
  • Yes, I think it is. I think I'm able to remove it by splitting it up into real short line segments like described in this post: gis.stackexchange.com/questions/32192/…
    – Kerusher
    Commented Jul 18, 2015 at 18:48

1 Answer 1

  • zoom to the extent you're after
  • optionally, ctrl-b to save the extent
  • rectangle select the polygons (drag over the whole canvas extent)
  • vector > geometry tools > buffer (selected features only, distance .001 or less, dissolve results)

This will expand the coastline outwards just enough to overlap across the line, the dissolve will 'heal' the gap.

You can use buffer again with a corresponding negative distance to get the original coastline. Whether or not you want or need to do that depends on what scale you need.

I've tried this on the dataset you linked to and it gets rid of the diagonal line in the indian ocean and the line north of australia.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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