Announcement

Collapse
No announcement yet.

Joining a matrix of tiles to make digital map

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Joining a matrix of tiles to make digital map

    Hi,
    I am able to make a map from an area of tiles, but this is very time consuming, and wonder if anyone has done it by using Command line and scripts using Irfanview.

    Command line and scripts will be very difficult for me, as I have rarely used them, and then only with supervision.

    The tiles I have are a matrix with a top number so all of the top horizontal row of tiles may be say '123', with the next row '124' and so on. I first make the top line by using search and panorama, which gives me a line.png. After doing this hundreds of times I would have save all of the lines down to the bottom. Now I would have to do the same with the rows, for hundreds of times, and once the vertical panorama is done, I would have a map of my county.

    Would anyone show me how to automate it please?

    Cheers, Camerart.
    Last edited by camerart; 03.12.2019, 05:59 PM.

    #2
    Have you tried creating a contact sheet instead of a panorama?

    I could see no command line option for that, but one can make a grid without gaps between the images. The hard part is getting the files in the right order (drag and drop in Thumbnails can be used instead of renaming), then calculating the right values to enter in the Contact Sheet dialogue.
    Before you post ... Edit your profile • IrfanView 4.62 • Windows 10 Home 19045.2486

    Irfan PaintIrfan View HelpIrfanPaint HelpRiot.dllMore SkinsFastStone CaptureUploads

    Comment


      #3
      Originally posted by Bhikkhu Pesala View Post
      Have you tried creating a contact sheet instead of a panorama?

      I could see no command line option for that, but one can make a grid without gaps between the images. The hard part is getting the files in the right order (drag and drop in Thumbnails can be used instead of renaming), then calculating the right values to enter in the Contact Sheet dialogue.

      Hi B,
      The end product of what I want, is one image of my county as a map, which will be a very big file.

      Drag and drop perhaps thousands of files would be too time consuming, and I think a contact sheet has gaps between eac image, so no good.

      Let me know that you understand what I do longhand please.

      The top horizontal row, are string of images all named the same e,g, '123' I search the whole of the tiles, which are a matrix, for 123, and then join them into a long strip.

      Next I have to repeat the process 100s of times, 124, 125 and so on. Then I join them vertically.

      I imagine that any command file or scripts, would be a two part process.

      C.

      Comment


        #4
        Contact sheets do not have to have gaps.
        Before you post ... Edit your profile • IrfanView 4.62 • Windows 10 Home 19045.2486

        Irfan PaintIrfan View HelpIrfanPaint HelpRiot.dllMore SkinsFastStone CaptureUploads

        Comment


          #5
          Originally posted by Bhikkhu Pesala View Post
          Contact sheets do not have to have gaps.
          Hi B,
          That sound ok to me.

          Is it possible to make a contact sheet of all of the images in one go?

          If so, how would I do it, with all the same number at the top, making one PNG or JPG image?
          C

          Comment


            #6
            I am not going to do the maths for you.

            If the images are a x b pixels and there are 10 rows and 10 columns your contact sheet will need to be 10a x 10b pixels, with no gaps or margins.
            Before you post ... Edit your profile • IrfanView 4.62 • Windows 10 Home 19045.2486

            Irfan PaintIrfan View HelpIrfanPaint HelpRiot.dllMore SkinsFastStone CaptureUploads

            Comment


              #7
              Originally posted by Bhikkhu Pesala View Post
              I am not going to do the maths for you.

              If the images are a x b pixels and there are 10 rows and 10 columns your contact sheet will need to be 10a x 10b pixels, with no gaps or margins.
              Hi B,

              I got better result using 'contact sheet' but I can't get my images into the correct order, so the final image is jumbled.

              I'm trying to figure out just what order they're in. If I search for [ *.PNG ] in the top folder, then choose Thumbnails, I get this matrix, before 'contact sheet.

              Here's an image showing how they should join: Put the coloured stars together.

              C.
              Attached Files

              Comment


                #8
                The images can be dragged into any desired order in the Thumbnails view. Then create the contact sheet. with the selected images.
                Before you post ... Edit your profile • IrfanView 4.62 • Windows 10 Home 19045.2486

                Irfan PaintIrfan View HelpIrfanPaint HelpRiot.dllMore SkinsFastStone CaptureUploads

                Comment


                  #9
                  Originally posted by Bhikkhu Pesala View Post
                  The images can be dragged into any desired order in the Thumbnails view. Then create the contact sheet. with the selected images.
                  Hi B,

                  As there may be >1,000,000 tiles, this would be too time consuming.

                  I'll try other forums, thanks for you help.
                  C

                  Comment


                    #10
                    How is this ever going to work?

                    How big are these images that you're joining? If 1,000 x 1,000 pixels, that is 1 Megapixel. An image of one million megapixels is not going to load in IrfanView. Even those high resolution NASA images are only 256 Megapixels.
                    Before you post ... Edit your profile • IrfanView 4.62 • Windows 10 Home 19045.2486

                    Irfan PaintIrfan View HelpIrfanPaint HelpRiot.dllMore SkinsFastStone CaptureUploads

                    Comment


                      #11
                      Originally posted by Bhikkhu Pesala View Post
                      How is this ever going to work?

                      How big are these images that you're joining? If 1,000 x 1,000 pixels, that is 1 Megapixel. An image of one million megapixels is not going to load in IrfanView. Even those high resolution NASA images are only 256 Megapixels.
                      Hi B,

                      I don't know how, but I'm sure it can be done, people are doing it all of the time.

                      In my first message I asked for command line, or scripts, so perhaps it is done by compressing as it proceeds. The finished image of 1,00,000, images won't be megapixels, but much smaller.
                      Cheers, C.

                      Comment


                        #12
                        Pixels cannot be compressed. If you discard pixels you must lose resolution. PNG compression is pretty good, especially with images with few colours, which is likely to be the case with your (Google Map?) images. However, that reduces the size of the image on disk, not in memory. To reduce the RAM needed one can either reduce colour-depth or reduce resolution; either way one loses data.

                        How big are the images being joined together? If they are a typical screen shot, they may well be more than 1 Megapixel.

                        Click image for larger version

Name:	1 Megapixel Image.png
Views:	1
Size:	12.2 KB
ID:	83347

                        Perhaps someone will pass by who is good at writing batch files, but first let's discover if your project is even feasible.
                        Before you post ... Edit your profile • IrfanView 4.62 • Windows 10 Home 19045.2486

                        Irfan PaintIrfan View HelpIrfanPaint HelpRiot.dllMore SkinsFastStone CaptureUploads

                        Comment


                          #13
                          Originally posted by Bhikkhu Pesala View Post
                          Pixels cannot be compressed. If you discard pixels you must lose resolution. PNG compression is pretty good, especially with images with few colours, which is likely to be the case with your (Google Map?) images. However, that reduces the size of the image on disk, not in memory. To reduce the RAM needed one can either reduce colour-depth or reduce resolution; either way one loses data.

                          How big are the images being joined together? If they are a typical screen shot, they may well be more than 1 Megapixel.

                          [ATTACH=CONFIG]5690[/ATTACH]

                          Perhaps someone will pass by who is good at writing batch files, but first let's discover if your project is even feasible.
                          Hi B,
                          I'm not so good at this sort of thing, and always need help for this sort of 'blockage' to my ideas.

                          As well as asking forums etc, I have a mate who's also trying. He's a bit more savvy, than me. I give him feedback as I get more information, and he says he's writing an algorithm? and I notice his explanation includes re-sizing plus some other 'clever' words.

                          I opened one image in Irfanview, then saved it as a JPG. Here it is:
                          C
                          Attached Files

                          Comment


                            #14
                            Even at 256 pixels, which is 16 squares to a megapixel, your final image will be 1 million/16 = 62,500 Megapixels. I think you're unlikely to succeed and will end up breaking your country into a thousand strips of 62.5 Megapixels.

                            Saving as JPG just reduces the quality and increases the file size for such images. Use PNG instead, it will be smaller on disk. By reducing the colours to 256 very little colour information is likely to be lost. The attached image is only 7.55 Kbytes on disk, although the same dimensions as your image, which is 12.15 Kbytes on disk.

                            Click image for larger version

Name:	256 pixel image.png
Views:	1
Size:	7.6 KB
ID:	83349
                            Last edited by Bhikkhu Pesala; 05.12.2019, 10:31 AM.
                            Before you post ... Edit your profile • IrfanView 4.62 • Windows 10 Home 19045.2486

                            Irfan PaintIrfan View HelpIrfanPaint HelpRiot.dllMore SkinsFastStone CaptureUploads

                            Comment


                              #15
                              Originally posted by Bhikkhu Pesala View Post
                              Even at 256 pixels, which is 16 squares to a megapixel, your final image will be 1 million/16 = 62,500 Megapixels. I think you're unlikely to succeed and will end up breaking your country into a thousand strips of 62.5 Megapixels.

                              Saving as JPG just reduces the quality and increases the file size for such images. Use PNG instead, it will be smaller on disk. By reducing the colours to 256 very little colour information is likely to be lost. The attached image is only 7.55 Kbytes on disk, although the same dimensions as your image, which is 12.15 Kbytes on disk.

                              [ATTACH=CONFIG]5694[/ATTACH]
                              Hi B,

                              Ok.

                              Let's see how my mate gets on.

                              Thanks, C.

                              Comment

                              Working...
                              X