Jump to content

 
Photo

dealing with 2GB MrSID files

- - - - -

  • Please log in to reply
7 replies to this topic

#1
Dennis McClendon

Dennis McClendon

    Hall of Fame

  • Validated Member
  • PipPipPipPipPipPipPip
  • 1,083 posts
  • Gender:Male
  • Location:Chicago
  • Interests:map design, large-scale maps of cities
  • United States

I've been sent an aerial photo composite of an entire New Mexico county. In MrSID format, it's 2.6 GB. I need to go in and crop out a few snippets to update a street map, but I'm not sure how to work with such a monster file.

I normally use Graphic Converter to do such things, but version 5.7 says it can't open a file larger than 2 GB. Ideas for either Mac or Windows?
Dennis McClendon, Chicago CartoGraphics
chicagocarto.com

#2
kjmcgrath

kjmcgrath

    Newbie

  • Validated Member
  • Pip
  • 6 posts
  • Gender:Male
  • Location:Madison, Wisconsin
  • United States

Wow what a monster.

Several possible ideas though none of which are definite solutions.

GDAL library via FWTools with or scripting through python might be the way to go. It would allow you to get information about the file for simple cropping of edges to reduce to 2 gb to open in program used in your work flow. Also you could re-sample or convert with GDAL to different format through GDAL to let you get into the image and see what areas you need.

Another possibility might be to use MrSidDecode which was discussed on a discussion board (http://forum.manifold.net/forum/t35971) for someone having a similar problem. I have no experience with this utility but might be an avenue to try.

Good luck and be well

#3
springmeyer

springmeyer

    Newbie

  • New Member
  • Pip
  • 3 posts
  • United States

I've been sent an aerial photo composite of an entire New Mexico county. In MrSID format, it's 2.6 GB. I need to go in and crop out a few snippets to update a street map, but I'm not sure how to work with such a monster file.

I normally use Graphic Converter to do such things, but version 5.7 says it can't open a file larger than 2 GB. Ideas for either Mac or Windows?



The solution I use for this scenario is to either uncompress the whole SID into a GeoTIFF using a GDAL installation that supports BigTiff (tiffs over 4GB), or I use the gdal_translate program to just clip out a small subsection directly to into a tiff. The latter is certainly more optimal, given that you can figure out the right bounding coordinates to pass to gdal_translate's '-'projwin' flag, which can be tricky to know ahead of time.

If you are willing to dive into command line usage of gdal_translate then here is a small guide:

http://trac.osgeo.or...ectionofaraster

Otherwise, I would recommend trying to open the MrSID file in QGIS, installing the 'Raster Tools' qgis plugin, and then using that to clip out a small subsection. This should work but I've personally only used the command line route previously.

#4
Nick H

Nick H

    Legendary Contributor

  • Validated Member
  • PipPipPipPipPip
  • 307 posts
  • Gender:Male
  • Location:Caversham, Reading, England.
  • United Kingdom

I've been sent an aerial photo composite of an entire New Mexico county. In MrSID format, it's 2.6 GB. I need to go in and crop out a few snippets to update a street map, but I'm not sure how to work with such a monster file.

I normally use Graphic Converter to do such things, but version 5.7 says it can't open a file larger than 2 GB. Ideas for either Mac or Windows?

As suggested, gdal_translate should work:

gdal_translate -of GTiff -srcwin 600 600 400 400 in.sid out.tif

Where 600 and 600 is the pixel coordinate for the top left corner of the area you want to extract and the 400 and 400 is the size of the required extract, also in pixels.

gdalinfo in.sid

Will give you the information you need to work out the pixel coordinate for the top left corner of the extract you want. As proof of concept, just run the command above as it is. It works here :).

Regards, N.
Caversham, Reading, England.

#5
VeroLJ

VeroLJ

    Contributor

  • Validated Member
  • PipPip
  • 25 posts
  • Gender:Female
  • Location:Toronto
  • France

I've been sent an aerial photo composite of an entire New Mexico county. In MrSID format, it's 2.6 GB. I need to go in and crop out a few snippets to update a street map, but I'm not sure how to work with such a monster file.

I normally use Graphic Converter to do such things, but version 5.7 says it can't open a file larger than 2 GB. Ideas for either Mac or Windows?

Hi

You could try to use Geographic Imager plug-in for Adobe Photoshop from Avenza Systems Inc. It provides a function called "Geocrop Import" which allows you crop the image before opening it into Adobe Photoshop, so it can handle pretty big files.
I wouldn't try to open the full 2.6 Gb file directly though, you really need to do GeoCrop on import.

You can download a 14 day evaluation version here: http://www.avenza.com/download
It works on mac and windows.

In the current version (2.5), you have to know the coordinates of the snippets to do the crop (pixel or world coordinates in the image coordinate system). With the up-coming version 3.0 there will be a preview which is much nicer to do the cropping on import.

If you contact Avenza Systems, we can probably provide you with a beta version of 3.0. (sales@avenza.com) if you need the preview functionality.
Véronique Lutes-Jégat
Avenza Systems Inc.
Applications Specialist

#6
dsl

dsl

    Master Contributor

  • Validated Member
  • PipPipPipPip
  • 225 posts
  • Gender:Male
  • Location:Denver
  • United States

I usually use Global Mapper to extract a smaller image from larger ones. It seems to handle really large files well. Of course, it isn't free. There is also the problem that the export tiff file or jpeg has a limit on file size. I don't know, but it is possible that GDAL will run into the same limitations. It will depend on the size of the area you need to pull out. Might also look into Manifold's capabilities. I figure it is worth suggesting because many people on Cartotalk seem to already have a license for these two programs.

Cheers,
David

#7
aug_aug

aug_aug

    Key Contributor

  • Validated Member
  • PipPipPip
  • 52 posts
  • Gender:Male
  • Location:Mountlake Terrace, Washington
  • United States

If you have ArcDesktop you could clip the sections with Raster>Extract by Mask/Feature/etc. into smaller .SID files, then use the Raster to Other Format tool to uncompress those .SID files and export them individually as .tifs or whatever format you like.

#8
SteveR

SteveR

    Master Contributor

  • Validated Member
  • PipPipPipPip
  • 158 posts
  • Gender:Male
  • Location:Utah, USA
  • United States

http://www.usna.edu/...em/microdem.htm

Microdem is freeware and I use it frequently to open countywide MrSID images, with few problems. You will need to get 2 plug-ins from Lizardtech, and the county image will open at a usual initial resolution of 64 or 32 meters per pixel. The window has a "SID" button that lets you subset the county image to cover just your area of interest at your choice of scale to 1 meter. The image can then be saved in TIF, BMP, or PNG format for use by other software.

Steve Richardson
www.2i3D.com




1 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users


    Bing (1)
-->