Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6034047
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T05:34:22+00:00 2026-05-23T05:34:22+00:00

I am using OpenMap and have to load very large dimensioned images. I tried

  • 0

I am using OpenMap and have to load very large dimensioned images.
I tried to load these images as big raster which fails with an OufOfMemoryException. In debug mode the layer constructor tells me that the image dimensions are too large.

In an OpenMap mailing list I found the MyJAIPlugin, which allows me to load and display GeoTiff files.

How can I show a 300mb GeoTiff in OpenMap?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T05:34:23+00:00Added an answer on May 23, 2026 at 5:34 am

    I had a nearly same situation by loading hd maps with at least 690mb filesize.

    I also used the JAIPlugIn from the mailing list and internaly they use the OMScalingRaster witch works with a BufferedImage. These limits your image size and causes the debug message.

    I’ve solved it by modifieing the OMScalingRaster. I’ve changed the BufferedImage to a TiledImage to handle large images and fixed the upcoming errors. Here it’s important you change the scaleTo(Projection thisProj)-method, to scale with JAI.

    Now i can load the file and it’s rendered on the map. But if you are zooming out too much, it will throw a OutOfMemoryException because in my modification i make a subimage of the part of the image that will be visible and give it as BufferedImage to the OMRaster.

    Here is the mod. at the end of the scaleTo-method:

                // Now we can grab the bit we want out of the source
                // and
                // scale it to fit the intersection.
    
                // Calc width adjustment
                float widthAdj = (float) ((double) iRect.width
                        / (double) clipRect.width);
                // Calc height adjustment
                float heightAdj = (float) ((double) iRect.height
                        / (double) clipRect.height);
    
                // Create the transform
                // JAI-Version
                ParameterBlock pb = new ParameterBlock();
                pb.addSource(sourceImage.getSubImage(clipRect.x,
                        clipRect.y,
                        clipRect.width,
                        clipRect.height).getAsBufferedImage());
                pb.add(widthAdj);          // The xScale
                pb.add(heightAdj);          // The yScale
                pb.add(0.0F);           // The x translation
                pb.add(0.0F);           // The y translation
                RenderedOp newImage = JAI.create("scale",pb, null);
    
                bitmap = newImage.getAsBufferedImage();
    
    
                point1.setLocation(iRect.x, iRect.y);
                // setVisible(currentVisibility);
            }
        } else {
            bitmap = null;
        }
    }
    

    For the other errors by replacing BufferedImage with TiledImage use the equivalent TiledImage-methods. But to save memory you should use the TiledImage-constructor with the sharedDataBuffer flag = true.

    For Exsample this mod. can handle maps (compressed 690mb) with a scaling of 1:50000 and i can zoom out to 1:600000 before the layer says it run out of memory.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a very weird problem using OpenMP in my C++ code: void update(double
I have this function which I would like to parallelize using openmp: for(i=len-1;i>=0;i--){ if(bin[i]==49)
I have a C++ program using OpenMP, which will run on several machines that
I have a C++ program which is working quite well using OpenMP to parallelize
I have a serial application that I parallelized using OpenMP. I simply added the
Using online interfaces to a version control system is a nice way to have
Using TortoiseSVN against VisualSVN I delete a source file that I should not have
I'm using OpenMap and I'm reading a ShapeFile using com.bbn.openmap.layer.shape.ShapeFile. The bounding box is
I have enabled OpenMP using following settings on 10.7.2 OS (Xcode): GCC_VERSION = 4.2
I have the following C/C++ code using OpenMP: int nProcessors=omp_get_max_threads(); if(argv[4]!=NULL){ printf(argv[4]: %s\n,argv[4]); nProcessors=atoi(argv[4]);

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.