-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Efficient, polymorphic Map Algebra. -- -- Efficient, polymorphic Map Algebra. -- -- This library is an implementation of Map Algebra as described -- in the book GIS and Cartographic Modeling by Dana Tomlin. The -- fundamental type, the Raster, is typesafe. Rasters of different -- size and projection are considered different types, and so cannot be -- combined in any way. -- -- Also featured are op fusion (i.e. "lazy Rasters"), extremely fast -- Focal Operations, and typesafe NoData handling. Please see the main -- module for a more detailed introduction. @package mapalgebra @version 0.1.0 -- | This library is an implementation of Map Algebra as described -- in the book GIS and Cartographic Modeling (GaCM) by Dana -- Tomlin. The fundamental primitive is the Raster, a rectangular -- grid of data that usually describes some area on the earth. A -- Raster need not contain numerical data, however, and need not -- just represent satellite imagery. It is essentially a matrix, which of -- course forms a Functor, and thus is available for all the -- operations we would expect to run on any Functor. GIS and -- Cartographic Modeling doesn't lean on this fact, and so describes -- many seemingly custom operations which to Haskell are just -- applications of fmap or zipWith with pure functions. -- -- Here are the main classes of operations ascribed to Map Algebra -- and their corresponding approach in Haskell: -- --
-- evi :: Raster D p r c Double -> Raster D p r c Double -> Raster D p r c Double -> Raster D p r c Double -- evi nir red blue = 2.5 * (numer / denom) -- where numer = nir - red -- denom = nir + (6 * red) - (7.5 * blue) + 1 ---- -- 8 binary operators are used here, but none allocate new memory. It's -- only when some lazy Raster is made strict that -- calculations occur and memory is allocated. -- -- Provided your machine has more than 1 CPU, Rasters read by functions -- like fromRGBA will automatically be in Parallel mode. -- This means that forcing calculations with strict will cause -- evaluation to be done with every CPU your machine has. The effect of -- this is quite potent for Focal Operations, which yield special, -- cache-friendly windowed (DW) Rasters. -- -- Familiarity with Massiv will help in using this library. A guide -- can be found here. -- --
-- -- | A lazy 256x256 Raster with the value 5 at every index. Uses DataKinds -- -- and "type literals" to achieve the same-size guarantee. -- myRaster :: Raster D WebMercator 256 256 Int -- myRaster = constant D Par 5 -- -- >>> length myRaster -- 65536 --newtype Raster u p (r :: Nat) (c :: Nat) a Raster :: Array u Ix2 a -> Raster u p a [_array] :: Raster u p a -> Array u Ix2 a -- | <math>. Force a Raster's representation to D, -- allowing it to undergo various operations. All operations between -- D Rasters are fused and allocate no extra memory. lazy :: Source u Ix2 a => Raster u p r c a -> Raster D p r c a -- | Evaluate some lazy (D, DW, or DI) Raster -- to some explicit Manifest type (i.e. to a real memory-backed -- Array). Will follow the Computation strategy of the underlying -- massiv Array. -- -- Note: If using the Par computation strategy, make sure -- you're compiling with -with-rtsopts=-N to automatically use -- all available CPU cores at runtime. Otherwise your "parallel" -- operations will only execute on one core. strict :: (Load v Ix2 a, Mutable u Ix2 a) => u -> Raster v p r c a -> Raster u p r c a -- | An RGBA image whose colour bands are distinct. data RGBARaster p r c a RGBARaster :: !(Raster S p r c a) -> !(Raster S p r c a) -> !(Raster S p r c a) -> !(Raster S p r c a) -> RGBARaster p r c a [_red] :: RGBARaster p r c a -> !(Raster S p r c a) [_green] :: RGBARaster p r c a -> !(Raster S p r c a) [_blue] :: RGBARaster p r c a -> !(Raster S p r c a) [_alpha] :: RGBARaster p r c a -> !(Raster S p r c a) -- | Create a Raster of any size which has the same value -- everywhere. constant :: (KnownNat r, KnownNat c, Construct u Ix2 a) => u -> Comp -> a -> Raster u p r c a -- | <math>. Create a Raster from a function of its row and -- column number respectively. fromFunction :: forall u p r c a. (KnownNat r, KnownNat c, Construct u Ix2 a) => u -> Comp -> (Ix2 -> a) -> Raster u p r c a -- | <math>. Create a Raster from the values of any -- Vector type. Will fail if the size of the Vector does not match -- the declared size of the Raster. fromVector :: forall v p r c a. (KnownNat r, KnownNat c, Vector v a, Mutable (ARepr v) Ix2 a, Typeable v) => Comp -> v a -> Either String (Raster (ARepr v) p r c a) -- | Read any image type into a Raster of distinct colour bands with -- the cell type you declare. If the source image stores its values as -- Int but you declare Double, the conversion will happen -- automatically. -- -- Will fail if the declared size of the Raster does not match the -- actual size of the input image. fromRGBA :: forall p r c a. (Elevator a, KnownNat r, KnownNat c) => FilePath -> IO (Either String (RGBARaster p r c a)) -- | Read a grayscale image. If the source file has more than one colour -- band, they'll be combined automatically. fromGray :: forall p r c a. (Elevator a, KnownNat r, KnownNat c) => FilePath -> IO (Either String (Raster S p r c a)) -- | Convert a Raster into grayscale pixels, suitable for easy -- output with functions like writeImage. grayscale :: Functor (Raster u p r c) => Raster u p r c a -> Raster u p r c (Pixel Y a) -- | An invisible pixel (alpha channel set to 0). invisible :: Pixel RGBA Word8 -- | From page 32 of Cartographer's Toolkit. greenRed :: Ord k => [k] -> Map k (Pixel RGBA Word8) -- | From page 33 of Cartographer's Toolkit. spectrum :: Ord k => [k] -> Map k (Pixel RGBA Word8) -- | From page 34 of Cartographer's Toolkit. blueGreen :: Ord k => [k] -> Map k (Pixel RGBA Word8) -- | From page 35 of Cartographer's Toolkit. purpleYellow :: Ord k => [k] -> Map k (Pixel RGBA Word8) -- | From page 36 of Cartographer's Toolkit. brownBlue :: Ord k => [k] -> Map k (Pixel RGBA Word8) -- | From page 37 of Cartographer's Toolkit. grayBrown :: Ord k => [k] -> Map k (Pixel RGBA Word8) -- | From page 38 of Cartographer's Toolkit. greenPurple :: Ord k => [k] -> Map k (Pixel RGBA Word8) -- | From page 39 of Cartographer's Toolkit. brownYellow :: Ord k => [k] -> Map k (Pixel RGBA Word8) -- | From page 40 of Cartographer's Toolkit. purpleGreen :: Ord k => [k] -> Map k (Pixel RGBA Word8) -- | From page 41 of Cartographer's Toolkit. purpleRed :: Ord k => [k] -> Map k (Pixel RGBA Word8) -- | This function will guess an output file format from the file extension -- and will write to file any image with the colorspace that is supported -- by that format. Precision of the image might be adjusted using -- Elevator if precision of the source array is not supported by -- the image file format. For instance an (Image r RGBA -- Double) being saved as PNG file would be written as -- (Image r RGBA Word16), thus using -- highest supported precision Word16 for that format. If -- automatic colors space is also desired, writeImageAuto can be -- used instead. -- -- Can throw ConvertError, EncodeError and other usual IO -- errors. writeImage :: (Source r Ix2 Pixel cs e, ColorSpace cs e) => FilePath -> Image r cs e -> IO () -- | Write an image to file while performing all necessary precisiona and -- color space conversions. writeImageAuto :: (Source r Ix2 Pixel cs e, ColorSpace cs e, ToYA cs e, ToRGBA cs e, ToYCbCr cs e, ToCMYK cs e) => FilePath -> Image r cs e -> IO () -- | Render a PNG-encoded ByteString from a coloured Raster. -- Useful for returning a Raster from a webserver endpoint. png :: (Source u Ix2 (Pixel cs a), ColorSpace cs a) => Raster u p r c (Pixel cs a) -> ByteString -- | View a Raster as grayscale with the default image viewer of -- your OS. -- -- For more direct control, consider displayImage from -- 'massiv-io'. display :: (Functor (Raster u p r c), Load u Ix2 (Pixel Y a), Elevator a) => Raster u p r c a -> IO () -- | The Earth is not a sphere. Various schemes have been invented -- throughout history that provide Point coordinates for locations -- on the earth, although all are approximations and come with -- trade-offs. We call these Projections, since they are a mapping -- of Sphere coordinates to some other approximation. The -- Projection used most commonly for mapping on the internet is called -- WebMercator. -- -- A Projection is also known as a Coordinate Reference System (CRS). -- -- Use reproject to convert Points between various -- Projections. -- -- Note: Full support for Projections is still pending. class Projection p -- | Convert a Point in this Projection to one of radians on a -- perfect Sphere. toSphere :: Projection p => Point p -> Point Sphere -- | Convert a Point of radians on a perfect sphere to that of a -- specific Projection. fromSphere :: Projection p => Point Sphere -> Point p -- | Reproject a Point from one Projection to another. reproject :: (Projection p, Projection r) => Point p -> Point r -- | A perfect geometric sphere. The earth isn't actually shaped this way, -- but it's a convenient middle-ground for converting between various -- Projections. data Sphere -- | Latitude (north-south position) and Longitude (east-west position). data LatLng -- | The most commonly used Projection for mapping in internet -- applications. data WebMercator -- | A location on the Earth in some Projection. data Point p Point :: !Double -> !Double -> Point p [x] :: Point p -> !Double [y] :: Point p -> !Double -- | Combine two Rasters, element-wise, with a binary operator. zipWith :: (Source u Ix2 a, Source u Ix2 b) => (a -> b -> d) -> Raster u p r c a -> Raster u p r c b -> Raster D p r c d -- | Called LocalClassification in GaCM. The first argument is the -- value to give to any index whose value is less than the lowest break -- in the Map. -- -- This is a glorified fmap operation, but we expose it for -- convenience. classify :: (Ord a, Functor f) => b -> Map a b -> f a -> f b -- | Finds the maximum value at each index between two Rasters. lmax :: (Ord a, Source u Ix2 a) => Raster u p r c a -> Raster u p r c a -> Raster D p r c a -- | Finds the minimum value at each index between two Rasters. lmin :: (Ord a, Source u Ix2 a) => Raster u p r c a -> Raster u p r c a -> Raster D p r c a -- | Averages the values per-index of all Rasters in a collection. lmean :: (Real a, Fractional b, KnownNat r, KnownNat c) => NonEmpty (Raster D p r c a) -> Raster D p r c b -- | The count of unique values at each shared index. lvariety :: (KnownNat r, KnownNat c, Eq a) => NonEmpty (Raster D p r c a) -> Raster D p r c Word -- | The most frequently appearing value at each shared index. lmajority :: (KnownNat r, KnownNat c, Ord a) => NonEmpty (Raster D p r c a) -> Raster D p r c a -- | The least frequently appearing value at each shared index. lminority :: (KnownNat r, KnownNat c, Ord a) => NonEmpty (Raster D p r c a) -> Raster D p r c a -- | A measure of how spread out a dataset is. This calculation will fail -- with Nothing if a length 1 list is given. lvariance :: (Real a, KnownNat r, KnownNat c) => NonEmpty (Raster D p r c a) -> Maybe (Raster D p r c Double) -- | Focal Addition. fsum :: (Num a, Default a, Manifest u Ix2 a) => Raster u p r c a -> Raster DW p r c a -- | Focal Product. fproduct :: (Num a, Default a, Manifest u Ix2 a) => Raster u p r c a -> Raster DW p r c a -- | Focal Monoid - combine all elements of a neighbourhood via their -- Monoid instance. In terms of precedence, the neighbourhood -- focus is the "left-most", and all other elements are "added" to it. -- -- This is not mentioned in GaCM, but seems useful nonetheless. fmonoid :: (Monoid a, Default a, Manifest u Ix2 a) => Raster u p r c a -> Raster DW p r c a -- | Focal Mean. fmean :: (Real a, Fractional b, Default a, Manifest u Ix2 a) => Raster u p r c a -> Raster DW p r c b -- | Focal Maximum. fmax :: (Ord a, Default a, Manifest u Ix2 a) => Raster u p r c a -> Raster DW p r c a -- | Focal Minimum. fmin :: (Ord a, Default a, Manifest u Ix2 a) => Raster u p r c a -> Raster DW p r c a -- | Focal Majority - the most frequently appearing value in each -- neighbourhood. fmajority :: (Ord a, Default a, Manifest u Ix2 a) => Raster u p r c a -> Raster DW p r c a -- | Focal Minority - the least frequently appearing value in each -- neighbourhood. fminority :: (Ord a, Default a, Manifest u Ix2 a) => Raster u p r c a -> Raster DW p r c a -- | Focal Variety - the number of unique values in each neighbourhood. fvariety :: (Ord a, Default a, Manifest u Ix2 a) => Raster u p r c a -> Raster DW p r c Word -- | Focal Percentage - the percentage of neighbourhood values that are -- equal to the neighbourhood focus. Not to be confused with -- fpercentile. fpercentage :: (Eq a, Default a, Manifest u Ix2 a) => Raster u p r c a -> Raster DW p r c Double -- | Focal Percentile - the percentage of neighbourhood values that are -- less than the neighbourhood focus. Not to be confused with -- fpercentage. fpercentile :: (Ord a, Default a, Manifest u Ix2 a) => Raster u p r c a -> Raster DW p r c Double -- | A description of lineal directions with the same encoding as -- Drain. See flinkage and flength. newtype Line Line :: Word8 -> Line [_line] :: Line -> Word8 -- | Focal Linkage - a description of how each neighbourhood focus is -- connected to its neighbours. Foci of equal value to none of their -- neighbours will have a value of 0. flinkage :: (Default a, Eq a, Manifest u Ix2 a) => Raster u p r c a -> Raster DW p r c Line -- | Focal Length - the length of the lineal structure at every location. -- The result is in "pixel units", where 1 is the height/width of one -- pixel. flength :: Functor (Raster u p r c) => Raster u p r c Line -> Raster u p r c Double -- | A layout of the areal conditions of a single Raster pixel. It -- describes whether each pixel corner is occupied by the same "areal -- zone" as the pixel centre. data Corners Corners :: !Surround -> !Surround -> !Surround -> !Surround -> Corners [_topLeft] :: Corners -> !Surround [_bottomLeft] :: Corners -> !Surround [_bottomRight] :: Corners -> !Surround [_topRight] :: Corners -> !Surround -- | A state of surroundedness of a pixel corner. For the examples below, -- the bottom-left pixel is considered the focus and we're wondering -- about the surroundedness of its top-right corner. data Surround -- | A corner has three of the same opponent against it. -- -- The corner is considered "occupied" by the opponent value, thus -- forming a diagonal areal edge. -- --
-- [ 1 1 ] -- [ 0 1 ] --Complete :: Surround -- | One edge of a corner is touching an opponent, but the other edge -- touches a friend. -- --
-- [ 1 1 ] or [ 0 1 ] -- [ 0 0 ] [ 0 1 ] --OneSide :: Surround -- | A corner is surrounded by friends. -- --
-- [ 0 0 ] or [ 0 0 ] or [ 1 0 ] -- [ 0 0 ] [ 0 1 ] [ 0 0 ] --Open :: Surround -- | Similar to Complete, except that the diagonal opponent doesn't -- match the other two. The corner is considered surrounded, but not -- "occupied". -- --
-- [ 1 2 ] -- [ 0 1 ] --RightAngle :: Surround -- | Similar to Complete, except that the area of the focus -- surrounds the diagonal neighbour. -- --
-- [ 0 1 ] -- [ 0 0 ] --OutFlow :: Surround -- | Focal Partition - the areal form of each location, only considering -- the top-right edge. fpartition :: (Default a, Eq a, Manifest u Ix2 a) => Raster u p r c a -> Raster DW p r c Corners -- | Like fpartition, but considers the Surround of all -- corners. Is alluded to in GaCM but isn't given its own operation name. -- -- If preparing for ffrontage or farea, you almost -- certainly want this function and not fpartition. fshape :: (Default a, Eq a, Manifest u Ix2 a) => Raster u p r c a -> Raster DW p r c Corners -- | Focal Frontage - the length of areal edges between each pixel and its -- neighbourhood. -- -- Usually, the output of fshape is the appropriate input for this -- function. ffrontage :: Functor (Raster u p r c) => Raster u p r c Corners -> Raster u p r c Double -- | Focal Area - the area of the shape made up by a neighbourhood focus -- and its surrounding pixels. Each pixel is assumed to have length and -- width of 1. -- -- Usually, the output of fshape is the appropriate input for this -- function. farea :: Functor (Raster u p r c) => Raster u p r c Corners -> Raster u p r c Double -- | The main type for fdownstream and fupstream, used to -- calculate Focal Drainage. This scheme for encoding drainage patterns -- is described on page 81 of GaCM. -- --
-- [ 1 2 4 ] -- [ 8 16 ] -- [ 32 64 128 ] ---- -- Direction values are summed to make the encoding. If there were -- drainage to the North, East, and SouthEast, we'd see a sum of -- <math> to uniquely represent this. -- -- Analysing a drainage pattern from a Drain is just as easy: -- check if the bit corresponding to the desired direction is flipped. -- The direction function handles this. newtype Drain Drain :: Word8 -> Drain [_drain] :: Drain -> Word8 -- | Directions that neighbourhood foci can be connected by. data Direction East :: Direction NorthEast :: Direction North :: Direction NorthWest :: Direction West :: Direction SouthWest :: Direction South :: Direction SouthEast :: Direction -- | Does a given Drain indicate flow in a certain Direction? direction :: Direction -> Drain -> Bool -- | All Directions that a Drain indicates flow toward. directions :: Drain -> Set Direction -- | The opposite of directions. drainage :: Set Direction -> Drain -- | Focal Volume - the surficial volume under each pixel, assuming the -- Raster represents elevation in some way. fvolume :: (Fractional a, Default a, Manifest u Ix2 a) => Raster u p r c a -> Raster DW p r c a -- | Focal Gradient - a measurement of surficial slope for each pixel -- relative to the horizonal cartographic plane. Results are in radians, -- with a flat plane having a slope angle of 0 and a near-vertical plane -- approaching <math>. fgradient :: (Manifest u Ix2 Double) => Raster u p r c Double -> Raster DW p r c Double -- | Focal Aspect - the compass direction toward which the surface descends -- most rapidly. Results are in radians, with 0 or <math> being -- North, <math> being East, and so on. For areas that are -- essentially flat, their aspect will be Nothing. faspect :: Manifest u Ix2 Double => Raster u p r c Double -> Raster DW p r c (Maybe Double) -- | Like faspect, but slightly faster. Beware of nonsense results -- when the plane is flat. faspect' :: Manifest u Ix2 Double => Raster u p r c Double -> Raster DW p r c Double -- | Focal Drainage - downstream portion. This indicates the one or more -- compass directions of steepest descent from each location. Appropriate -- as the input to fupstream. -- -- Note: Peak-like surfaces will not flow equally in all 8 -- directions. Consider this neighbourhood: -- --
-- [ 1 1 1 ] -- [ 1 3 1 ] -- [ 1 1 1 ] ---- -- According to the rules in GaCM for calculating the intermediate -- surficial "facet" points for the focus, 3, we arrive at the following -- facet height matrix: -- --
-- [ 1.5 2 1.5 ] -- [ 2 3 2 ] -- [ 1.5 2 1.5 ] ---- -- With these numbers it's clear that the corners would yield a steeper -- angle, so our resulting Drain would only contain the directions -- of the diagonals. fdownstream :: Manifest u Ix2 Double => Raster u p r c Double -> Raster DW p r c Drain -- | Focal Drainage - upstream portion. This indicates the one of more -- compass directions from which liquid would flow into each surface -- location. See also fdownstream. fupstream :: Manifest u Ix2 Drain => Raster u p r c Drain -> Raster DW p r c Drain -- | The first part to the "left pseudo inverse" needed to calculate a -- best-fitting plane of 9 points. leftPseudo :: Matrix Double -- | <math>. One full rotation of the unit circle. tau :: Double instance Data.Default.Class.Default Geography.MapAlgebra.Drain instance Data.Primitive.Types.Prim Geography.MapAlgebra.Drain instance Foreign.Storable.Storable Geography.MapAlgebra.Drain instance GHC.Show.Show Geography.MapAlgebra.Drain instance GHC.Classes.Ord Geography.MapAlgebra.Drain instance GHC.Classes.Eq Geography.MapAlgebra.Drain instance GHC.Show.Show Geography.MapAlgebra.Corners instance GHC.Classes.Eq Geography.MapAlgebra.Corners instance GHC.Show.Show Geography.MapAlgebra.Surround instance GHC.Classes.Ord Geography.MapAlgebra.Surround instance GHC.Classes.Eq Geography.MapAlgebra.Surround instance GHC.Show.Show Geography.MapAlgebra.Direction instance GHC.Enum.Enum Geography.MapAlgebra.Direction instance GHC.Classes.Ord Geography.MapAlgebra.Direction instance GHC.Classes.Eq Geography.MapAlgebra.Direction instance Data.Default.Class.Default Geography.MapAlgebra.Line instance Data.Primitive.Types.Prim Geography.MapAlgebra.Line instance Foreign.Storable.Storable Geography.MapAlgebra.Line instance GHC.Show.Show Geography.MapAlgebra.Line instance GHC.Classes.Ord Geography.MapAlgebra.Line instance GHC.Classes.Eq Geography.MapAlgebra.Line instance forall k (p :: k). GHC.Show.Show (Geography.MapAlgebra.Point p) instance forall k (p :: k). GHC.Classes.Eq (Geography.MapAlgebra.Point p) instance Control.DeepSeq.NFData Geography.MapAlgebra.Drain instance Control.DeepSeq.NFData Geography.MapAlgebra.Corners instance Control.DeepSeq.NFData Geography.MapAlgebra.Surround instance Control.DeepSeq.NFData Geography.MapAlgebra.Line instance forall k a u (p :: k) (r :: GHC.Types.Nat) (c :: GHC.Types.Nat). (GHC.Show.Show a, Data.Massiv.Core.Common.Load (Data.Massiv.Core.Common.EltRepr u Data.Massiv.Core.Index.Ix.Ix2) Data.Massiv.Core.Index.Ix.Ix2 a, Data.Massiv.Core.Common.Size u Data.Massiv.Core.Index.Ix.Ix2 a) => GHC.Show.Show (Geography.MapAlgebra.Raster u p r c a) instance forall k a (p :: k) (r :: GHC.Types.Nat) (c :: GHC.Types.Nat). (GHC.Classes.Eq a, Data.Vector.Unboxed.Base.Unbox a) => GHC.Classes.Eq (Geography.MapAlgebra.Raster Data.Massiv.Array.Manifest.Unboxed.U p r c a) instance forall k a (p :: k) (r :: GHC.Types.Nat) (c :: GHC.Types.Nat). (GHC.Classes.Eq a, Foreign.Storable.Storable a) => GHC.Classes.Eq (Geography.MapAlgebra.Raster Data.Massiv.Array.Manifest.Storable.S p r c a) instance forall k a (p :: k) (r :: GHC.Types.Nat) (c :: GHC.Types.Nat). (GHC.Classes.Eq a, Data.Primitive.Types.Prim a) => GHC.Classes.Eq (Geography.MapAlgebra.Raster Data.Massiv.Array.Manifest.Primitive.P p r c a) instance forall k a (p :: k) (r :: GHC.Types.Nat) (c :: GHC.Types.Nat). (GHC.Classes.Eq a, Control.DeepSeq.NFData a) => GHC.Classes.Eq (Geography.MapAlgebra.Raster Data.Massiv.Array.Manifest.BoxedNF.N p r c a) instance forall k a (p :: k) (r :: GHC.Types.Nat) (c :: GHC.Types.Nat). GHC.Classes.Eq a => GHC.Classes.Eq (Geography.MapAlgebra.Raster Data.Massiv.Array.Manifest.BoxedStrict.B p r c a) instance forall k a (p :: k) (r :: GHC.Types.Nat) (c :: GHC.Types.Nat). GHC.Classes.Eq a => GHC.Classes.Eq (Geography.MapAlgebra.Raster Data.Massiv.Array.Delayed.Internal.D p r c a) instance forall k (p :: k) (r :: GHC.Types.Nat) (c :: GHC.Types.Nat). GHC.Base.Functor (Geography.MapAlgebra.Raster Data.Massiv.Array.Delayed.Windowed.DW p r c) instance forall k (p :: k) (r :: GHC.Types.Nat) (c :: GHC.Types.Nat). GHC.Base.Functor (Geography.MapAlgebra.Raster Data.Massiv.Array.Delayed.Internal.D p r c) instance forall k (p :: k) (r :: GHC.Types.Nat) (c :: GHC.Types.Nat). GHC.Base.Functor (Geography.MapAlgebra.Raster Data.Massiv.Array.Delayed.Interleaved.DI p r c) instance forall k (r :: GHC.Types.Nat) (c :: GHC.Types.Nat) (p :: k). (GHC.TypeNats.KnownNat r, GHC.TypeNats.KnownNat c) => GHC.Base.Applicative (Geography.MapAlgebra.Raster Data.Massiv.Array.Delayed.Internal.D p r c) instance forall k a (p :: k) (r :: GHC.Types.Nat) (c :: GHC.Types.Nat). Data.Semigroup.Semigroup a => Data.Semigroup.Semigroup (Geography.MapAlgebra.Raster Data.Massiv.Array.Delayed.Internal.D p r c a) instance forall k a (r :: GHC.Types.Nat) (c :: GHC.Types.Nat) (p :: k). (GHC.Base.Monoid a, GHC.TypeNats.KnownNat r, GHC.TypeNats.KnownNat c) => GHC.Base.Monoid (Geography.MapAlgebra.Raster Data.Massiv.Array.Delayed.Internal.D p r c a) instance forall k a (r :: GHC.Types.Nat) (c :: GHC.Types.Nat) (p :: k). (GHC.Num.Num a, GHC.TypeNats.KnownNat r, GHC.TypeNats.KnownNat c) => GHC.Num.Num (Geography.MapAlgebra.Raster Data.Massiv.Array.Delayed.Internal.D p r c a) instance forall k a (r :: GHC.Types.Nat) (c :: GHC.Types.Nat) (p :: k). (GHC.Real.Fractional a, GHC.TypeNats.KnownNat r, GHC.TypeNats.KnownNat c) => GHC.Real.Fractional (Geography.MapAlgebra.Raster Data.Massiv.Array.Delayed.Internal.D p r c a) instance forall k (p :: k) (r :: GHC.Types.Nat) (c :: GHC.Types.Nat). Data.Foldable.Foldable (Geography.MapAlgebra.Raster Data.Massiv.Array.Delayed.Internal.D p r c) instance Geography.MapAlgebra.Projection Geography.MapAlgebra.Sphere