GithubHelp home page GithubHelp logo

archgdal.jl's Introduction

ArchGDAL

Build Status Build status Coverage Status codecov

  | | |_| | | | (_| |  |  Version 0.4.6 (2016-06-19 17:16 UTC)
 _/ |\__'_|_|_|\__'_|  |  Official http://julialang.org/ release
|__/                   |  x86_64-apple-darwin13.4.0

julia> import ArchGDAL; const AG = ArchGDAL
ArchGDAL

julia> function read(f, filename)
           return AG.registerdrivers() do
               AG.read(filename) do dataset
                   f(dataset)
       end end end
read (generic function with 1 method)

julia> read("data/point.geojson") do dataset
           print(dataset)
       end;
GDAL Dataset (Driver: GeoJSON/GeoJSON)
File(s): data/point.geojson
Number of feature layers: 1
  Layer 0: OGRGeoJSON (wkbPoint), nfeatures = 4

julia> read("data/point.geojson") do dataset
           print(AG.getlayer(dataset, 0))
       end;
Layer: OGRGeoJSON, nfeatures = 4
  Geometry 0 (): [wkbPoint], POINT (100 0), POINT (100.2785 0.0893), ...
     Field 0 (FID): [OFTReal], 2.0, 3.0, 0.0, 3.0
     Field 1 (pointname): [OFTString], point-a, point-b, a, b

julia> read("data/point.geojson") do dataset
           AG.getfeature(AG.getlayer(dataset, 0), 2) do feature
              print(feature)
           end
       end;
Feature
  (index 0) geom => POINT
  (index 0) FID => 0.0
  (index 1) pointname => a

julia> read("gdalworkshop/world.tif") do dataset
           print(dataset)
       end;
GDAL Dataset (Driver: GTiff/GeoTIFF)
File(s): gdalworkshop/world.tif
Dataset (width x height): 2048 x 1024 (pixels)
Number of raster bands: 3
  [GA_ReadOnly] Band 1 (Red): 2048 x 1024 (UInt8)
  [GA_ReadOnly] Band 2 (Green): 2048 x 1024 (UInt8)
  [GA_ReadOnly] Band 3 (Blue): 2048 x 1024 (UInt8)

julia> read("gdalworkshop/world.tif") do dataset
           print(AG.getband(dataset, 1))
       end;
[GA_ReadOnly] Band 1 (Red): 2048 x 1024 (UInt8)
    blocksize: 256x256, nodata: -1.0e10, units: 1.0px + 0.0
    overviews: (0) 1024x512 (1) 512x256 (2) 256x128
               (3) 128x64 (4) 64x32 (5) 32x16
               (6) 16x8

archgdal.jl's People

Contributors

visr avatar yeesian avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.