Hi All, trying to create a SQL with gdal2wktraster.py. It works on PNG but it doesn't on AIG files...
Note: As Gdal works fine. C:\Program Files\PostgreSQL\8.4\bin>gdalinfo c:\tmp\raster Driver: AIG/Arc/Info Binary Grid Files: c:\tmp\raster c:\tmp\raster\dblbnd.adf c:\tmp\raster\hdr.adf c:\tmp\raster\metadata.xml c:\tmp\raster\prj.adf c:\tmp\raster\sta.adf c:\tmp\raster\vat.adf c:\tmp\raster\w001000.adf c:\tmp\raster\w001000x.adf c:\tmp\raster\w001001.adf c:\tmp\raster\w001001x.adf c:\tmp\raster\z001001.adf c:\tmp\raster\z001001x.adf c:\tmp\raster\z001002.adf c:\tmp\raster\z001002x.adf c:\tmp\raster\z001003.adf c:\tmp\raster\z001003x.adf c:\tmp\raster\z001004.adf c:\tmp\raster\z001004x.adf c:\tmp\raster\z001005.adf c:\tmp\raster\z001005x.adf c:\tmp\raster\z001006.adf c:\tmp\raster\z001006x.adf c:\tmp\raster\z001007.adf c:\tmp\raster\z001007x.adf c:\tmp\raster\z001008.adf c:\tmp\raster\z001008x.adf c:\tmp\raster\z001009.adf c:\tmp\raster\z001009x.adf c:\tmp\raster\z001010.adf c:\tmp\raster\z001010x.adf c:\tmp\raster\z001011.adf c:\tmp\raster\z001011x.adf c:\tmp\raster\z001012.adf c:\tmp\raster\z001012x.adf c:\tmp\raster\z001013.adf c:\tmp\raster\z001013x.adf c:\tmp\raster\z001014.adf c:\tmp\raster\z001014x.adf c:\tmp\raster\z001015.adf c:\tmp\raster\z001015x.adf Size is 107759, 168633 Coordinate System is: PROJCS["unnamed", GEOGCS["Unknown datum based upon the Airy 1830 ellipsoid", DATUM["Not_specified_based_on_Airy_1830_ellipsoid", SPHEROID["Airy 1830",6377563.396,299.3249646, AUTHORITY["EPSG","7001"]], AUTHORITY["EPSG","6001"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.01745329251994328, AUTHORITY["EPSG","9122"]], AUTHORITY["EPSG","4001"]], PROJECTION["Transverse_Mercator"], PARAMETER["latitude_of_origin",49], PARAMETER["central_meridian",-2], PARAMETER["scale_factor",0.9996012717], PARAMETER["false_easting",400000], PARAMETER["false_northing",-100000], UNIT["METERS",1]] Origin = (128110.000000000000000,813270.000000000000000) Pixel Size = (5.000000000000000,-5.000000000000000) Corner Coordinates: Upper Left ( 128110.000, 813270.000) ( 6d29'37.32"W, 57d 7'47.53"N) Lower Left ( 128110.000, -29895.000) ( 5d45'40.00"W, 49d34'10.24"N) Upper Right ( 666905.000, 813270.000) ( 2d24'41.72"E, 57d 7'58.04"N) Lower Right ( 666905.000, -29895.000) ( 1d41'32.29"E, 49d34'18.23"N) Center ( 397507.500, 391687.500) ( 2d 2'15.04"W, 53d25'18.19"N) Band 1 Block=256x4 Type=Byte, ColorInterp=Undefined Min=1.000 Max=4.000 NoData Value=255 C:\Program Files\PostgreSQL\8.4\bin>python gdal2wktraster.py -r c:\tmp\raster -t sebastable -o c:\tmp\sebas.sql gdal2wktraster.py:644: DeprecationWarning: 'H' format requires 0 <= number <= 65535 hexstr = binascii.hexlify(struct.pack(fmt_little, data)).upper() gdal2wktraster.py:644: DeprecationWarning: integer argument expected, got float hexstr = binascii.hexlify(struct.pack(fmt_little, data)).upper() ERROR 2: Multiplication overflow : 107759 * 168633 * 1 Traceback (most recent call last): File "gdal2wktraster.py", line 1013, in <module> main() File "gdal2wktraster.py", line 976, in main wkblify_raster(opts, filename, i) File "gdal2wktraster.py", line 921, in wkblify_raster summary = wkblify_raster_level(options, ds, options.overview_level, band_range, infile, i) File "gdal2wktraster.py", line 888, in wkblify_raster_level hexwkb += wkblify_band(options, band, level, xoff, yoff, read_block_size, block_size, infile, b) File "gdal2wktraster.py", line 777, in wkblify_band target_block_size[0], target_block_size[1]) File "C:\OSGeo4W\apps\gdal-16\pymod\osgeo\gdal.py", line 835, in ReadAsArray buf_xsize, buf_ysize, buf_obj ) File "C:\OSGeo4W\apps\gdal-16\pymod\osgeo\gdal_array.py", line 140, in BandReadAsArray ar = numpy.reshape(ar, [buf_ysize,buf_xsize]) File "C:\OSGeo4W\apps\Python25\lib\site-packages\numpy\core\fromnumeric.py", line 116, in reshape return reshape(newshape, order=order) ValueError: total size of new array must be unchanged Any ideas ? -- Sebastian E. Ovide
_______________________________________________ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users