[GRASS-user] How to import a massive PCI pix raster as tiles?

Hi,

I have a PCI pix raster, and it's pretty big - 2.4 GB. I'm not familiar with this image format as I've never worked with it before. Gdalinfo seems to recognize it, but importing it with r.in.gdal crashes with the following error:

$
$ gdalinfo DEMvalley.pix

Driver: PCIDSK/PCIDSK Database File
Size is 65362, 41926
Coordinate System is:
PROJCS["UTM Zone 20, Northern Hemisphere",
    GEOGCS["Unknown datum based upon the WGS 84 ellipsoid",
        DATUM["Not specified (based on WGS 84 spheroid)",
            SPHEROID["WGS 84",6378137,298.257223563,
                AUTHORITY["EPSG","7030"]]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",-63],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",500000],
    PARAMETER["false_northing",0],
    UNIT["Meter",1]]
Origin = (275082.000000,5021966.000000)
Pixel Size = (2.00000000,-2.00000000)
Metadata:
  SOFTWARE=PACEV10.
  FILE_ID=S_\Peter\Lidar_DEM_MAIN\DEMvalley.pix
  GENERATING_FACILITY=PCI Inc., Richmond Hill, Canada
  DESCRIPTION1=
  DESCRIPTION2=
  DATE_OF_CREATION=10_55 15Nov2006
  DATE_OF_UPDATE=10_55 15Nov2006
Corner Coordinates:
Upper Left ( 275082.000, 5021966.000) ( 65d52'10.28"W, 45d18'54.52"N)
Lower Left ( 275082.000, 4938114.000) ( 65d49'55.86"W, 44d33'40.47"N)
Upper Right ( 405806.000, 5021966.000) ( 64d12'8.49"W, 45d20'41.55"N)
Lower Right ( 405806.000, 4938114.000) ( 64d11'12.10"W, 44d35'24.74"N)
Center ( 340444.000, 4980040.000) ( 65d 1'22.35"W, 44d57'21.17"N)
Band 1 Block=128x128 Type=Float32, ColorInterp=Undefined
  Description = DEMfull.pix_1. focus _Exported from 9 on D_\valley_lidar_DEM\Li
  Metadata:
    DATE_OF_CREATION=10_55 15Nov2006
    DATE_OF_UPDATE=10_55 15Nov2006
    UNITS=
    LAYER_CRC=0x2a8e

$ r.in.gdal -e input=DEMvalley.pix output=DEMvalley
WARNING: Datum 'Not_specified_based_on_WGS_84_spheroid' not recognised by
         GRASS and no parameters found. Datum transformation will not be
         possible using this projection information.
Projection of input dataset and current location appear to match.
Proceeding with import...
*** glibc detected *** double free or corruption (!prev): 0x08484740 ***
Aborted

I'm assuming that the reason this fails is because there's too many rows and columns? Alternatively, is there some command line parameter that can be passed to gdal_translate to import it in sections or tiles?

Thanks,

~ Eric.

Patton, Eric wrote:

Hi,

I have a PCI pix raster, and it's pretty big - 2.4 GB. I'm not familiar with this image format as I've never worked with it before. Gdalinfo seems to recognize it, but importing it with r.in.gdal crashes with the following error:

$
$ gdalinfo DEMvalley.pix

Driver: PCIDSK/PCIDSK Database File
Size is 65362, 41926

Eric,

You can do:

  gdal_translate -srcwin 0 0 65362 20000 DEMvalley.pix DEMvalley_top.tif
  gdal_translate -srcwin 0 20000 65362 21926 DEMvalley.pix DEMvalley_bottom.tif

to split the image into two chunks. I don't know about the r.in.gdal crash.

Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam@pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | President OSGeo, http://osgeo.org