2

I want to create my own Google Map like this:

My problem is that I can't load and edit my large images.

My Images:

  • PNG / JPG
  • 700 MiB
  • 300000px x 300000px

My attempts:

  • ImageMagick
  • .NET C# / BitmapImages ...
  • C++ / OpenCV
  • general image classes in Java and Python

With which language / library I can edit these big images.

5
  • 5
    Try turning the large image into many smaller images and puzzle them together as if they were one large image. Commented Jan 30, 2016 at 20:33
  • 1
    The thing is, you have multiple images that (300,000 x 300,000) are about ~167GB large (considering 4bits per component, 16bits per pixel). Imagine having to store this in ram! As @JasonHeddle said, you need to fragment the images into smaller ones. After all, there's no point in trying to display this many pixels on a 1080p screen ;) Commented Jan 30, 2016 at 20:37
  • Right idea... but @PhilippeParé it does say "700MB" and "PNG/JPG" which are roughly speaking lossless and lossy kinds of image compression, so maybe they are not actually as big as 167GB. Commented Jan 30, 2016 at 20:50
  • So @CodeEX, where did you get these 300,000 x 300,000 pixel images? How where they created? Commented Jan 30, 2016 at 20:52
  • @uhoh Hello uhoh, I generate the images from Arma 3 Topography Maps. And I want create own Google Maps Google Maps API Commented Jan 30, 2016 at 21:11

2 Answers 2

6

I help maintain libvips, an image processing library designed to work with very large images. It's free and works on Linux, Mac and Windows. You can use it from the command-line, C#, C/C++, Python, Ruby and others.

You can make your google maps tiles from the command-line like this:

vips dzsave hugefile.tif myoutputdir --layout google 

Or from Python (for example) like this:

import pyvips image = pyvips.Image.new_from_file("somehugefile.tif", access="sequential") image.dzsave("filename/of/pyramid", layout="google") 

And it'll scan your huge tiff image and generate all the tiles. It's fast, it needs little memory and it'll work on images of any size. I regularly make 200,000 x 200,000 deepzoom images from microscope slides using my small laptop.

There's a chapter in the libvips docs introducing dzsave and explaining how to use it.

Sign up to request clarification or add additional context in comments.

Comments

0

This is not a full answer, but I need a little more space than a comment can give.

Take a look at the large image support section on the ImageMagick or the discussion board.

This answer mentions the VIPS package which might be helpful.

You might also consider posting in photography stackexchange, or even blender stackexchange - for example I saw this answer which mentions writing individual image tiles - also here, although that question is about rendering. Blender is not specifically for image processing and editing, but it's pretty amazing and flexible and has a very active and supportive community. You can use python within Blender as well.

You could also think of asking in gis stackexchange.

When you post in the other stackexchanges, take a look around first and make sure you write your question so that it does not look too off-topic for that site.

Good luck - it seems tiling is everywhere!

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.