arcgrid: Parse ESRI/ArcInfo (ArcGrid) raster GIS files

[ bsd3, geo, library, program ] [ Propose Tags ]

A parser for ESRI/ArcInfo (ArcGrid) files. These are raster GIS files widely used by many geographics-related software to represent elevations or terrain features.


[Skip to Readme]

Modules

[Index]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1.0.0
Dependencies arcgrid, base (>=4.7 && <5), parsec, parsec-numeric [details]
License BSD-3-Clause
Author Nikolay Burkov
Maintainer nbrk@linklevel.net
Category Geo
Home page https://github.com/nbrk/arcgrid
Source repo head: git clone https://github.com/nbrk/arcgrid
Uploaded by nbrk at 2017-11-13T18:17:07Z
Distributions NixOS:0.1.0.0
Executables arcgrid-dump
Downloads 1040 total (13 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2017-11-13 [all 1 reports]

Readme for arcgrid-0.1.0.0

[back to package description]

Description

This is a parser for ESRI/ArcInfo (ArcGrid) files. These are raster GIS files widely used by many geographics-related software to represent elevations or terrain features.

Only ASCII GRID (.asc) files are supported at the moment.

In app/valley.asc there is a test elevation model of a small valley area. It is parsed and printed by the arcgrid-exe if you do stack exec arcgrid-exe.

Usage

The library exports the ArcGrid datatype and its accessors:

data ArcGrid = ArcGrid
               { ncols :: Int
               , nrows :: Int
               , xllcorner :: Maybe Float
               , yllcorner :: Maybe Float
               , xllcenter :: Maybe Float
               , yllcenter :: Maybe Float
               , cellsize :: Float
               , nodata_value :: Maybe Int
               , vat :: [Int]
               }

The main interface for reading of grid files is arcGridFromFile, but the bytestring parser (to be used with Parsec) is also exported.

arcGridFromFile :: String -> IO ArcGrid

asciiGridParser :: Parser ArcGrid

TODO:

  • unparsing
  • optimizations
  • support of proprietary binary formats?