Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a north america shapefile, downloaded from

How can I get a new shapefile from this showing only us? Is there a way doing this in QGIS?


share|improve this question
up vote 2 down vote accepted

You might find there are problems when trying to clip the NA_CEC_Eco shapefile layer with a US borders shapefile. The mask layer solution suggested above might be a better bet.

A slightly less clean way of working might be to load the NA_CEC_Eco shapefile into QGIS, style it and then export an image. So, load the shapefile and style it. Then arrange it on your screen so that it shows the Lower 48 with as little of Canada and Mexico as possible. Then export a georeferenced image of the screen view as a GeoTIFF (File -> Save as Image...).

Next, reproject your US borders shapefile to EPSG:2163. Load the shapefile into QGIS, right-click on it in the layers panel and go 'Save as..'. Select EPSG:2163 as the CRS for the new shapefile.

Now start a new QGIS project, load the georeferenced image and the reprojected borders shapefile, and clip the image with the shapefile (Raster -> Extraction -> Clipper). Tick the 'Mask layer' radio button and make sure that the borders shapefile is set as the mask layer. Also tick the 'Create an output alpha band' box.

Load the clipped image into a new QGIS project. It will have some alarming back borders, remove these by right-clicking on the layer in the layers panels and selecting 'Properties'. Select the 'Transparency' tab and set the 'Transparency band' to Band 5.

Overlay the clipped image with the borders shapefile, just to put a hard edge on the borders (obviously, remove the fill from the borders layer polygons).

A couple of points. Firstly, georeferenced screen images exported from QGIS are at the resolution of the screen, which is low (96 dpi, in my case). If you need a higher-resolution image you will have to export an image from the print composer and georeference it yourself. Secondly, to my way of thinking the NA_CEC_Eco shapefile is unnecessarily large and could do with simplifying. You could do this by going Vector -> Geometry Tools -> Simplify geometries and using 10 or 15 as the 'Simplify tolerance' value.

enter image description here

share|improve this answer
Nick. I want the details. – didimichael Apr 5 '12 at 18:05
I've modified the answer above to include more detail. Hope this helps. Nick. – nhopton Apr 6 '12 at 9:41
Awesome. thanks. – didimichael Apr 6 '12 at 22:31

You will need acquire a vector data file of the US outline, then use this to 'clip' out the features from your North America shapefile. Since your NA file's projection is 'EPSG:2163 - US National Atlas Equal Area,' you will need to make sure your US file is in (or converted to) the same projection. Then use the Vector/Geoprocessing Tools/Clip from the menu function to produce a new shapefile from your NA layer, clipped to the US.

Edit: you may have issues using a US outline as a clip, if it is not of similar resolution or it does not completely contain your NA data for the US. Alternatively, you use Canada and Mexico border outlines to remove those countries from your NA data, leaving the US, then deleting outlying country features, north of Canada and south of Mexico.

You may need to use the Vector/Geoprocessing Tools/Difference function for removing Mexico and Canada from your NA data layer.

share|improve this answer
Thanks for your answer. I will go to find a us outline map. How could I convert the projection system? – didimichael Apr 4 '12 at 19:50
Consult the QGIS manual for projection conversion techniques. You can right-(control-)click on a vector layer and choose Save As (then set new CRS), or use the reprojection function available under the Vector > Data Management Tools menu (or Raster > Projections menu for rasters). – dakcarto Apr 4 '12 at 22:15

If you want to eliminate the areas outside the US for cartographic purposes only, you could just create a "mask" layer that is nothing but a very large rectangular feature with a "US-shaped hole" clipped from the middle of it.

To clip in QGIS: Vector menu > Geoprocessing > Clip.

I don't know if the resolution is suitable for your purposes but you can grab a US shapefile here. Fair warning, I don't remember where I got it or if it includes any of the territories (i.e. Puerto Rico, American Samoa, etc).

share|improve this answer
Your us shapefile has Alaska. I will need to delete that. The projection are different. I will need to deal with that.Thanks. – didimichael Apr 4 '12 at 20:39

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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