[GRASSLIST:506] formats

Hello :slight_smile:

Is there any GIS function that recognizes a file type by extension ? For example, if given a file .jpg it recognizes it as a raster image format.

Thanks :slight_smile:

Is there any GIS function that recognizes a file type by extension ? For
example, if given a file .jpg it recognizes it as a raster image format.

The GNU program "file" or the GDAL program "gdalinfo"?

Hamish

On Sat, 1 Apr 2006, Hamish wrote:

> Is there any GIS function that recognizes a file type by extension ? For
> example, if given a file .jpg it recognizes it as a raster image format.

The GNU program "file" or the GDAL program "gdalinfo"?

I believe the Unix/Linux "file" command uses "magic numbers" at the
start of the file to determine the type, but it's a very good tool.
Much better than trying to guess based on file extensions.

Others:

    dbfinfo
    gdalinfo (mentioned)
    ogrinfo
    shpinfo
    tiffinfo

And then there are the "dump" variants to get more info out of a
particular type:

    dbfdump
    shpdump
    tiffdump

Then there are my favorites, when the contents still elude you:

    strings
    hexdump -C

--
Curt, WE7U. APRS Client Comparisons: http://www.eskimo.com/~archer
"Lotto: A tax on people who are bad at math." -- unknown
"Windows: Microsoft's tax on computer illiterates." -- WE7U
"The world DOES revolve around me: I picked the coordinate system!"