Skip to content

rozap/exshape

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Exshape

Parse ESRI Shapefiles Build Status

Usage

Installation

Add

{:exshape, "~> 2.2"}

to mix.exs deps

From a zip archive

[
  {"rivers", rivers_proj, river_shapes},
  {"lakes", lakes_proj, lake_shapes}
] = Exshape.from_zip("path/to/archive.zip")

Stream.each(river_shapes, &IO.inspect/1) |> Stream.run
Stream.each(lake_shapes, &IO.inspect/1) |> Stream.run

Shapes from a SHP byte stream

File.stream!("rivers.shp", [], 2048)
|> Exshape.Shp.read
|> Stream.each(&IO.inspect/1)
|> Stream.run

Attributes from a DBF byte stream

File.stream!("rivers.dbf", [], 2048)
|> Exshape.Dbf.read
|> Stream.each(&IO.inspect/1)
|> Stream.run

About

shapefiles

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages