1

How can I reproject multiple vector layers in QGIS? I have a thousand layers (around 100 in each folder) without projection info. All need to be set in WGS84. I know about the batch Processing tool but they are so many and in different folders. Is there a command or script in python?

closed as off-topic by Vince, nmtoken, Kadir Şahbaz, whyzar, neogeomat Jul 19 at 19:37

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "When seeking help to debug/write/improve code always provide the desired behavior, a specific problem/error and the shortest code (as formatted text, not pictures) needed to reproduce it in the question body. Providing a clear problem statement and a code attempt helps others to help you." – Vince, nmtoken, Kadir Şahbaz, whyzar
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    Are you sure they need to be georeferenced, and not simply reprojected/transformed? – Erik Jul 19 at 11:34
  • 1
    Welcome to GIS SE. As a new user, please take the Tour, which explains how our "Focused question/Best answer" model operates. We are not a coding service. All coding questions are expected to contain a good-faith effort to solve the task, with details of the error or other problem encountered. Please edit the question to answer the questions: What have you tried? What problem did you encounter? – Vince Jul 19 at 11:41
  • 2
    What file format is the data in? – TeddyTedTed Jul 19 at 11:54
  • 1
    Do you know corner coordinates of each layer? For example, if all are covering the same region, you will know what are the expected orner coordinates in WGS84. If so, gdal_translate utility as a handy option [-a_ullr ulx uly lrx lry] where you can give upper-left x,y and lower-right x,y coordinates and it will project the layer in the right place. You can write a simple bash script to run this on all layers. – spatialthoughts Jul 19 at 12:18
  • 2
    If all that your layers need is a projection definition of WGS 84 so that software like QGIS can display them properly with other layers, there is a Define Projection tool in Processing - Vector General. It has a batch process option which takes a bit of fiddling with to learn but afterwards works quite well. If you need to change all your layers from a different coordinate system to WGS 84 then use the Reproject layer tool also in Vector General. – johns Jul 19 at 17:11