Skip to content

Instantly share code, notes, and snippets.

@mdsumner
Last active December 15, 2022 17:50
Show Gist options
  • Save mdsumner/7f0904e5f5739909c7ef999e9a8295ca to your computer and use it in GitHub Desktop.
Save mdsumner/7f0904e5f5739909c7ef999e9a8295ca to your computer and use it in GitHub Desktop.
git clone https://github.com/r-barnes/ArcRasterRescue.git
cd ArcRasterRescue
make
cd ..
./ArcRasterRescue/arc_raster.exe fveg15_1.gdb/ 0 fveg15.tif
#Arc Raster Rescue (url=github.com/r-barnes/ArcRasterRescue, hash=b60ea39fcf11666d, compiled=2018-05-08 03:43:04 UTC)
#Allocating 4x30592x35456 = 4338679808
gdalinfo fveg15.tif
Driver: GTiff/GeoTIFF
Files: fveg15.tif
Size is 30592, 35456
Coordinate System is:
PROJCS["NAD_1983_California_Teale_Albers",
    GEOGCS["GCS_North_American_1983",
        DATUM["D_North_American_1983",
            SPHEROID["GRS_1980",6378137.0,298.257222101]],
        PRIMEM["Greenwich",0.0],
        UNIT["Degree",0.017453292519943295]],
    PROJECTION["Albers"],
    PARAMETER["False_Easting",0.0],
    PARAMETER["False_Northing",-4000000.0],
    PARAMETER["Central_Meridian",-120.0],
    PARAMETER["Standard_Parallel_1",34.0],
    PARAMETER["Standard_Parallel_2",40.5],
    PARAMETER["Latitude_Of_Origin",0.0],
    UNIT["Meter",1.0]]
Origin = (-636254.999999998137355,530295.000000000000000)
Pixel Size = (30.000000000000000,-30.000000000000000)
Metadata:
  AREA_OR_POINT=Area
  PROCESSING_HISTORY=2018-05-08 03:48:17 UTC | Arc Raster Rescue (url=github.com/r-barnes/ArcRasterRescue, hash=b60ea39fcf11666d, compiled=2018-05-08 03:43:04 UTC) | /perm_storage/home/mdsumner/Git/ArcRasterRescue/arc_raster.exe fveg15_1.gdb/ 0 fveg15.tif
  TIFFTAG_DATETIME=2018-05-08 03:48:17 UTC
  TIFFTAG_SOFTWARE=Arc Raster Rescue (url=github.com/r-barnes/ArcRasterRescue, hash=b60ea39fcf11666d, compiled=2018-05-08 03:43:04 UTC)
Image Structure Metadata:
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  ( -636255.000,  530295.000)
Lower Left  ( -636255.000, -533385.000)
Upper Right (  281505.000,  530295.000)
Lower Right (  281505.000, -533385.000)
Center      ( -177375.000,   -1545.000)
Band 1 Block=30592x1 Type=Int32, ColorInterp=Gray
  NoData Value=-9999

Compress and recreate with tiling.

mv fveg15.tif fveg15_00.tif
gdal_translate fveg15_00.tif fveg15.tif -co COMPRESS=DEFLATE -co TILED=YES
@mdsumner
Copy link
Author

mdsumner commented May 9, 2018

from the GeoTIFF created by AGis

Driver: GTiff/GeoTIFF
Files: fveg15_1.tif
       fveg15_1.tif.ovr
       fveg15_1.tif.aux.xml
Size is 39623, 38094
Coordinate System is:
PROJCS["NAD_1983_California_Teale_Albers",
    GEOGCS["NAD83",
        DATUM["North_American_Datum_1983",
            SPHEROID["GRS 1980",6378137,298.2572221010042,
                AUTHORITY["EPSG","7019"]],
            AUTHORITY["EPSG","6269"]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433],
        AUTHORITY["EPSG","4269"]],
    PROJECTION["Albers_Conic_Equal_Area"],
    PARAMETER["standard_parallel_1",34],
    PARAMETER["standard_parallel_2",40.5],
    PARAMETER["latitude_of_center",0],
    PARAMETER["longitude_of_center",-120],
    PARAMETER["false_easting",0],
    PARAMETER["false_northing",-4000000],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]]]
Origin = (-636269.999999998137355,530310.000000000000000)
Pixel Size = (30.000000000000000,-30.000000000000000)
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  COMPRESSION=LZW
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  ( -636270.000,  530310.000) (127d44' 2.84"W, 42d33'31.44"N)
Lower Left  ( -636270.000, -612510.000) (126d44'50.64"W, 32d17'39.60"N)
Upper Right (  552420.000,  530310.000) (113d16'53.19"W, 42d36'58.97"N)
Lower Right (  552420.000, -612510.000) (114d 8'21.71"W, 32d20'40.82"N)
Center      (  -41925.000,  -41100.000) (120d28'32.91"W, 37d38'44.53"N)
Band 1 Block=128x128 Type=Int32, ColorInterp=Gray
  Min=1.000 Max=14352.000 
  Minimum=1.000, Maximum=14352.000, Mean=6561.787, StdDev=4312.845
  NoData Value=2147483647
  Overviews: 19812x19047, 9906x9524, 4953x4762, 2477x2381, 1239x1191, 620x596, 310x298, 155x149
  Metadata:
    STATISTICS_COVARIANCES=18600628.16071996
    STATISTICS_MAXIMUM=14352
    STATISTICS_MEAN=6561.7870424573
    STATISTICS_MINIMUM=1
    STATISTICS_SKIPFACTORX=1
    STATISTICS_SKIPFACTORY=1
    STATISTICS_STDDEV=4312.8445555944
<GDALRasterAttributeTable>

@mdsumner
Copy link
Author

mdsumner commented May 9, 2018

Extent from ArcRasterRescue

30592, 35456
Upper Left  ( -636255.000,  530295.000)
Lower Left  ( -636255.000, -533385.000)
Upper Right (  281505.000,  530295.000)
Lower Right (  281505.000, -533385.000)
Center      ( -177375.000,   -1545.000)

From Agis

Size is 39623, 38094
Upper Left  ( -636270.000,  530310.000) (127d44' 2.84"W, 42d33'31.44"N)
Lower Left  ( -636270.000, -612510.000) (126d44'50.64"W, 32d17'39.60"N)
Upper Right (  552420.000,  530310.000) (113d16'53.19"W, 42d36'58.97"N)
Lower Right (  552420.000, -612510.000) (114d 8'21.71"W, 32d20'40.82"N)
Center      (  -41925.000,  -41100.000) (120d28'32.91"W, 37d38'44.53"N)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment