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]
Versions 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 Mon Nov 13 18:17:07 UTC 2017
Distributions NixOS:0.1.0.0
Executables arcgrid-dump
Downloads 284 total (12 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2017-11-13 [all 1 reports]
Hackage Matrix CI

Modules

[Index]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees


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?