2

There are two shapefiles. One is a compilation of municipalities on the coast with borders extending into ocean. The second shapefile is a coastal border.

I'm trying to clip the municipality shapefile with the coastal border shapefile to remove the municipality sea territory from my image, but I've had little success. The municipality boundaries are contiguous, so the coastal border on the second shapefile needs to cut and remove the excess shape.

I'm using QGIS 2.14.3-Essen. I've googled around and tried several strategies. I've used a lot of the GeoProcessing Tools (difference, intersect, clip, union) and what returned was an invisible shapefile.

What should I try to make it work?


Below is a copy of the screen settings for the clip. The results was yet another invisible layer.

Below this is a screencap of municipality boundaries to be cut (CITY) and the coastline in red to cut them (SMC_BORDER).

  • 1
    Have you checked the projections are the same and such? It might be helpful if you describe a specific workflow in more detail and describe what steps you take - that can help folks determine what's going wrong. – mtreg Sep 22 '16 at 2:01
  • 1
    Under vector>geometry run 'check validity'. Are your geometries valid? I'm thinking this is your problem. Run that and let us know what happens. – jbalk Sep 22 '16 at 2:23
  • 1
    by projections, they mean that your shapefiles may have different projections. A projection is the method of converting the curved surface of the earth to a flat piece of paper (or computer screen). If the files don't have the same projection, the clip isn't going to work properly. – jbalk Sep 22 '16 at 2:24
  • 1
    Any chance the data are publicly available and you can provide links? – mtreg Sep 22 '16 at 2:26
  • 4
    Your coastal boarder shapefile needs to be a closed polygon for the clip to work. It is a polygon and not a polyline, correct? If you try to clip polygons with a line, you'll get an empty file back. – jbalk Sep 22 '16 at 2:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.