I have a large image that contains around 7000 trees.

I created a bounding box around each one of them and then saved it as a .xml file. I would now like to create different fishnet sizes and clip both the image and bounding boxes associated with the trees in that image. I know that I can simply make a fishnet and clip within QGIS, but I am not sure how to link the bounding boxes? Perhaps turning them into a .csv file with their xmin, xmax, ymin, ymax, classname and then clipping that with the fishnet?

Any other suggestions that I could consider? Would this be better to code?

enter image description here

  • 1
    Are the green dots in a vector file? If so, are there IDs for every four points related to the same tree? As far as I understand, you try to save every tree as a separate image. If so, I couldn't understand how fishnet works. Because each "four points" form different area boxes. And what do you mean by "linking the bounding box? – Kadir Şahbaz Jan 9 at 5:39
  • the green dots are not vector files. They were made from the labelImg github repository. So they are in a .xml file type. Now thinking about it, I could convert them into a .csv and have a vector file??? – Zman3 Jan 11 at 19:42
  • Lets say I break the image into 4 parts, just a line down the middle and one across (four equal sections). That line would most likely cut one of the trees in half. If it did, how would I remove that trees corresponding .xml? – Zman3 Jan 11 at 19:44

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.