gps2htmlReport-0.2.1: GPS to HTML Summary Report




data TileCoords Source




minX :: Int
maxX :: Int
minY :: Int
maxY :: Int

maxTile :: [(Int, Int)] -> (Int, Int)Source

secant :: Floating a => a -> aSource

determineTiles :: [WptType] -> TileCoords -> Int -> TileCoordsSource

Determines the minimum and maximum of the X and Y tiles to be downloaded from OSM

selectedTiles :: TileCoords -> [(Int, Int)]Source

Takes the boundaries of the OSM tiles, and generates [(Int,Int)] containing a list of all OSM tiles that need downloading

filenameStr :: (Show a, Show a1) => a -> a1 -> StringSource

Formats the filename string

rectangle :: Int -> Int -> RectangleSource

Formats the URL string

downloadFile :: String -> IO ImageSource

Takes the URL of a given OSM tile and uses curl to download it

makeOSMLayer :: TileCoords -> Int -> IO ImageSource

Takes the boundaries of the OSM tiles covering the the Trail, uses placeTile to download the tile and to place each tile on the background layer

placeTile :: Int -> Int -> Image -> TileCoords -> Int -> IO ()Source

Used to create a mosaic of all downloaded OSM tiles to generate the background layer for plotting the Trail onto the Image

project :: Int -> Int -> Int -> (Double, Double, Double, Double)Source

Used by pixelPosForCoord for N,S,E,W coordinates for (x,y) values

pixelPosForCoord :: (Lon a, Lat a, Integral t, Integral t1) => [a] -> TileCoords -> Int -> (t, t1)Source

Takes a WptType, and the OSM tile boundaries and generates (x,y) points to be placed on the Image

drawLines :: [WptType] -> TileCoords -> Image -> Int -> IO ImageSource

Takes the WptType and draws lines between every point to point connection in the Trail

drawLine' :: Point -> Point -> Image -> (Double, Double, Double) -> Int -> IO ()Source

This is a fix on the fact that the drawLine function provided by the GD bindings do not provid a width parameter

lineColor :: Int -> ColorSource

Uses a sliding scale for the red value in the RGB Color to show a sliding color from green to yellow in accordance with the relative elevation of a given WptType in the Trail

addCopyright :: Image -> IO (Point, Point, Point, Point)Source

Adds the copyright text in accordance with http:wiki.openstreetmap.orgwikiLegal_FAQ

fitToWidth :: Image -> IO ImageSource

If the generated OSM image has a greater width than 800 pixels, it is scaled to have a width of 800 pixels.

resizeImg :: Image -> (Int, Int) -> IO ImageSource

Uses the GraphicsMagick bindings the resize the image

generateOsmMap :: String -> [WptType] -> IO ()Source

Takes the destination directory for the web content, the (Trail WptType), and uses the DrawOsm functions to generate an `osm.png' file showing the trail.