I have extracted shape files with polygon coordinates in geojson format for a particular area. Now I want to use this shapefile in qgis to extract individual images from Bing Maps corresponding to Polygon coordinates. How to do that?
1 Answers
If you want to clip the exact area from the Polygons, i think you can't extract them from Bing Maps. You need the raw data. On the other hand if you are just fine with an image of the area of the Maximum bounding box of your Polygons you could calculate these and than automatically clip them from the WMS server.
I had a similar problem where i downloaded several building shapefiles from Open Street Map and needed to get an image for each building from annother WMS server with aerial images (e.g.Google Satellite). In Qgis load in the Bing WMS server and your shapefiles then you can click on your specific polygon in the attribute table and zoom to this Polygon. This will set the Qgis map canvas to the Maximum Bounding Box containing your shape. Then you go to "Project" -> "Save as image" and you can save this screen as a image, tiff, png... Of course you can automate this using the Python consol:
from qgis.PyQt.QtCore import *
l=range(0,90)
for i in l:
x=int(i)
layer = iface.mapCanvas().currentLayer()
layer.select(x)
qgis.utils.iface.actionZoomToSelected().trigger()
layer.deselect(x)
name=str(x)
qgis.utils.iface.mapCanvas().saveAsImage('yourpath'+ name +'.png')

- 1
- 2
-
Please can you expand your answer to include using this information in QCIS as the OP requested? – Spangen Nov 01 '17 at 11:44
-
I had a similar problem where i downloaded several building shapefiles from Open Street Map and needed to get an image for each building from annother WMS server with aerial images (e.g.Google Satellite). In Qgis load in the Bing WMS server and your shapefiles then you can click on your specific polygon in the attribute table and zoom to this Polygon. This will set the Qgis map canvas to the Maximum Bounding Box containing your shape. Then you go to "Project" -> "Save as image" and you can save this screen as a image, tiff, png... Of course you can automate this using the Python consol – deepthought42 Nov 01 '17 at 12:16
-
Great! Please can you amend your answer to include this information so other people can see it easily? – Spangen Nov 01 '17 at 12:18