I'm new to QGIS. In my project i have two layers: one is my vector (city boundaries) and the other is the OSM (obtained with the plugin). How can I cut the OSM along the edges of the vector? I want to obtain only a region of the map, to save it as an image.
Answer
This way it works:
unselect your vector data, to show only the Openstreetmap background
File -> Save as Image
Load the image as raster, set EPSG:3857 as CRS
Delete the Openstreetmap background layer
Raster -> Projection -> Reproject
, choosing EPSG:3857 as source CRS and the CRS of the vector data as target CRS, saving as Geotiff under a different name, adding that to the canvasRemove the image loaded in step 3
Raster -> Extraction -> Clipper
checkMask layer
with the vector data, and add the result to the canvasRemove the unclipped raster layer from step 5
EDIT
If you want the clipping for all zoom levels, see my answer here:
How do I clip OSM basemap with a polygon?
No comments:
Post a Comment