EnglishFrenchSpanish

OnWorks favicon

pkascii2img - Online in the Cloud

Run pkascii2img in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command pkascii2img that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

PROGRAM:

NAME


pkascii2img - program to create raster image based on ascii file

SYNOPSIS


pkascii2img [-i input] [-o output] [-ot type] [-of GDALformat] [-co NAME=VALUE] [-dx
value] [-dy value] [-ulx value] [-uly value] [-ct filename] [-a_srs
EPSG:number] [-d description]

DESCRIPTION


pkascii2img creates a raster dataset from an ASCII textfile. The textfile is in matrix
format (rows and columns). The dimensions in x and y are defined by the number of columns
and rows respectively. The georeferencing can be defined by providing the options for
cell size (-dx -dy), upper left position (-ulx -uly) and the projection (-a_srs). Some
dataset formats can also store a description (-d) and a color table (-ct).

OPTIONS


-i filename, --input filename
input ASCII file

-o filename, --output filename
Output image file

-ot type, --otype type
Data type for output image ({Byte / Int16 / UInt16 / UInt32 / Int32 / Float32 /
Float64 / CInt16 / CInt32 / CFloat32 / CFloat64}). Empty string: inherit type from
input image

-of GDALformat, --oformat GDALformat
Output image format (see also gdal_translate(1)). Empty string: inherit from input
image

-co NAME=VALUE, --co NAME=VALUE
Creation option for output file. Multiple options can be specified.

-ulx value, --ulx value
Upper left x value bounding box (in geocoordinates if georef is true)

-uly value, --uly value
Upper left y value bounding box (in geocoordinates if georef is true)

-dx value, --dx value
Output resolution in x (in meter)

-dy value, --dy value
Output resolution in y (in meter)

-ct filename, --ct filename
colour table in ASCII format having 5 columns: id R G B ALFA (0: transparent, 255:
solid)

-a_srs EPSG:number, --a_srs EPSG:number
Override the projection for the output file

-d description, --description description
Set image description

-v, --verbose
verbose

EXAMPLE


We create a 5x5 raster dataset containing all 0 values except for its center (value=1)

cat input.txt

0 0 0 0 0
0 0 0 0 0
0 0 1 0 0
0 0 0 0 0
0 0 0 0 0

We define a pixel size of 25 by 25 m and and a projected in the European projection system
ETS89/LAEA. The location of the upper left pixel is also set:

pkascii2img -i input.txt -o output.tif -of GTiff -a_srs epsg:3035 -dx 25 -dy 25 -ulx 1000000 -uly 1000000

We check the output GeoTIFF using gdalinfo:

gdalinfo output.tif

Driver: GTiff/GeoTIFF
Files: output.tif
Size is 5, 5
Coordinate System is:
PROJCS["ETRS89 / LAEA Europe",
GEOGCS["ETRS89",
DATUM["European_Terrestrial_Reference_System_1989",
SPHEROID["GRS 1980",6378137,298.2572221010042,
AUTHORITY["EPSG","7019"]],
TOWGS84[0,0,0,0,0,0,0],
AUTHORITY["EPSG","6258"]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433],
AUTHORITY["EPSG","4258"]],
PROJECTION["Lambert_Azimuthal_Equal_Area"],
PARAMETER["latitude_of_center",52],
PARAMETER["longitude_of_center",10],
PARAMETER["false_easting",4321000],
PARAMETER["false_northing",3210000],
UNIT["metre",1,
AUTHORITY["EPSG","9001"]],
AUTHORITY["EPSG","3035"]]
Origin = (1000000.000000000000000,1000000.000000000000000)
Pixel Size = (25.000000000000000,-25.000000000000000)
Metadata:
AREA_OR_POINT=Area
TIFFTAG_DATETIME=2014:11:08 11:33:52
TIFFTAG_DOCUMENTNAME=output.tif
TIFFTAG_SOFTWARE=pktools 2.5.4 by Pieter Kempeneers
Image Structure Metadata:
INTERLEAVE=BAND
Corner Coordinates:
Upper Left ( 1000000.000, 1000000.000) ( 23d13' 9.44"W, 25d30'21.01"N)
Lower Left ( 1000000.000, 999875.000) ( 23d13' 8.02"W, 25d30'17.24"N)
Upper Right ( 1000125.000, 1000000.000) ( 23d13' 5.27"W, 25d30'22.72"N)
Lower Right ( 1000125.000, 999875.000) ( 23d13' 3.85"W, 25d30'18.95"N)
Center ( 1000062.500, 999937.500) ( 23d13' 6.65"W, 25d30'19.98"N)
Band 1 Block=5x5 Type=Byte, ColorInterp=Gray
gdalinfo output.tif
Driver: GTiff/GeoTIFF
Files: output.tif
Size is 5, 5
Coordinate System is:
PROJCS["ETRS89 / LAEA Europe",
GEOGCS["ETRS89",
DATUM["European_Terrestrial_Reference_System_1989",
SPHEROID["GRS 1980",6378137,298.2572221010042,
AUTHORITY["EPSG","7019"]],
TOWGS84[0,0,0,0,0,0,0],
AUTHORITY["EPSG","6258"]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433],
AUTHORITY["EPSG","4258"]],
PROJECTION["Lambert_Azimuthal_Equal_Area"],
PARAMETER["latitude_of_center",52],
PARAMETER["longitude_of_center",10],
PARAMETER["false_easting",4321000],
PARAMETER["false_northing",3210000],
UNIT["metre",1,
AUTHORITY["EPSG","9001"]],
AUTHORITY["EPSG","3035"]]
Origin = (1000000.000000000000000,1000000.000000000000000)
Pixel Size = (25.000000000000000,-25.000000000000000)
Metadata:
AREA_OR_POINT=Area
TIFFTAG_DATETIME=2014:11:08 11:33:52
TIFFTAG_DOCUMENTNAME=output.tif
TIFFTAG_SOFTWARE=pktools 2.5.4 by Pieter Kempeneers
Image Structure Metadata:
INTERLEAVE=BAND
Corner Coordinates:
Upper Left ( 1000000.000, 1000000.000) ( 23d13' 9.44"W, 25d30'21.01"N)
Lower Left ( 1000000.000, 999875.000) ( 23d13' 8.02"W, 25d30'17.24"N)
Upper Right ( 1000125.000, 1000000.000) ( 23d13' 5.27"W, 25d30'22.72"N)
Lower Right ( 1000125.000, 999875.000) ( 23d13' 3.85"W, 25d30'18.95"N)
Center ( 1000062.500, 999937.500) ( 23d13' 6.65"W, 25d30'19.98"N)
Band 1 Block=5x5 Type=Byte, ColorInterp=Gray

Use pkascii2img online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

  • 1
    Avogadro
    Avogadro
    Avogadro is an advanced molecular
    editor designed for cross-platform use
    in computational chemistry, molecular
    modeling, bioinformatics, materials
    science and ...
    Download Avogadro
  • 2
    XMLTV
    XMLTV
    XMLTV is a set of programs to process
    TV (tvguide) listings and help manage
    your TV viewing, storing listings in an
    XML-based format. There are utilities to
    do...
    Download XMLTV
  • 3
    strikr
    strikr
    Strikr Free Software project. Artifacts
    released under a 'intent based'
    dual license: AGPLv3 (community) and
    CC-BY-NC-ND 4.0 international
    (commercial)...
    Download strikr
  • 5
    GIFLIB
    GIFLIB
    giflib is a library for reading and
    writing gif images. It is API and ABI
    compatible with libungif which was in
    wide use while the LZW compression
    algorithm was...
    Download GIFLIB
  • 6
    Alt-F
    Alt-F
    Alt-F provides a free and open source
    alternative firmware for the DLINK
    DNS-320/320L/321/323/325/327L and
    DNR-322L. Alt-F has Samba and NFS;
    supports ext2/3/4...
    Download Alt-F
  • More »

Linux commands

  • 1
    4s-queryJ
    4s-queryJ
    4s-query � Run SPARQL queries on a
    4store storage backend ...
    Run 4s-queryJ
  • 2
    4ti2-circuits
    4ti2-circuits
    4ti2 - software package for algebraic,
    geometric and combinatorial problems on
    linear spaces ...
    Run 4ti2-circuits
  • 3
    cpufreq-set
    cpufreq-set
    cpufreq-set - A small tool which allows
    to modify cpufreq settings. SYNTAX:
    cpufreq-set [options] DESCRIPTION:
    cpufreq-set allows you to modify cpufreq
    setting...
    Run cpufreq-set
  • 4
    cpufreqd-get
    cpufreqd-get
    cpufreqd-get - Issues "get" commands to
    cpufreqd. SYNTAX: cpufreqd-get [-l]
    PARAMETERS: -l list applied Profiles for
    all cpus. DESCRIPTION: cpufreqd-get
    issues...
    Run cpufreqd-get
  • 5
    gammu
    gammu
    gammu - Does some neat things with your
    cellular phone or modem. ...
    Run gammu
  • 6
    ganglia2pcp
    ganglia2pcp
    ganglia2pcp - import ganglia data and
    create a PCP archive ...
    Run ganglia2pcp
  • More »

Ad