Skip to content

Commit

Permalink
Add create_sample_aoi_map method to raster factory
Browse files Browse the repository at this point in the history
  • Loading branch information
Work authored and Work committed Mar 2, 2016
1 parent 536391c commit 8e5f93b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions fauxgeo/raster_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import random

import gdal
import numpy as np

from fauxgeo.affine import Affine
Expand Down Expand Up @@ -83,3 +84,13 @@ def create_sample_global_map():
factory = RasterFactory(
proj, datatype, nodata_val, shape[1], shape[0])
return factory.uniform(1)

@staticmethod
def create_sample_aoi_map(datatype=gdal.GDT_Float32):
"""Return a simple global map."""
shape = (10, 10)
nodata_val = -9999
proj = 32618
factory = RasterFactory(
proj, datatype, nodata_val, shape[1], shape[0])
return factory.horizontal_ramp(1, 10)

0 comments on commit 8e5f93b

Please sign in to comment.