gps2htmlReport 0.2.2 → 0.3
raw patch · 7 files changed
+158/−124 lines, 7 filesdep +tardep ~gdPVP ok
version bump matches the API change (PVP)
Dependencies added: tar
Dependency ranges changed: gd
API changes (from Hackage documentation)
- Data.GPS.Gps2HtmlReport.DrawOsm: TileCoords :: Int -> Int -> Int -> Int -> TileCoords
- Data.GPS.Gps2HtmlReport.DrawOsm: addCopyright :: Image -> IO (Point, Point, Point, Point)
- Data.GPS.Gps2HtmlReport.DrawOsm: data TileCoords
- Data.GPS.Gps2HtmlReport.DrawOsm: deltaLat :: TileCoords -> Int
- Data.GPS.Gps2HtmlReport.DrawOsm: deltaLong :: TileCoords -> Int
- Data.GPS.Gps2HtmlReport.DrawOsm: determineTiles :: [WptType] -> TileCoords -> Int -> TileCoords
- Data.GPS.Gps2HtmlReport.DrawOsm: downloadFile :: String -> IO Image
- Data.GPS.Gps2HtmlReport.DrawOsm: drawLine' :: Point -> Point -> Image -> (Double, Double, Double) -> Int -> IO ()
- Data.GPS.Gps2HtmlReport.DrawOsm: drawLines :: [WptType] -> TileCoords -> Image -> Int -> IO Image
- Data.GPS.Gps2HtmlReport.DrawOsm: filenameStr :: (Show a, Show a1) => a -> a1 -> String
- Data.GPS.Gps2HtmlReport.DrawOsm: fitToWidth :: Image -> IO Image
- Data.GPS.Gps2HtmlReport.DrawOsm: initCoords :: TileCoords
- Data.GPS.Gps2HtmlReport.DrawOsm: lineColor :: Int -> Color
- Data.GPS.Gps2HtmlReport.DrawOsm: makeOSMLayer :: TileCoords -> Int -> IO Image
- Data.GPS.Gps2HtmlReport.DrawOsm: maxTile :: [(Int, Int)] -> (Int, Int)
- Data.GPS.Gps2HtmlReport.DrawOsm: maxX :: TileCoords -> Int
- Data.GPS.Gps2HtmlReport.DrawOsm: maxY :: TileCoords -> Int
- Data.GPS.Gps2HtmlReport.DrawOsm: minX :: TileCoords -> Int
- Data.GPS.Gps2HtmlReport.DrawOsm: minY :: TileCoords -> Int
- Data.GPS.Gps2HtmlReport.DrawOsm: pixelPosForCoord :: (Lon a, Lat a, Integral t, Integral t1) => [a] -> TileCoords -> Int -> (t, t1)
- Data.GPS.Gps2HtmlReport.DrawOsm: placeTile :: Int -> Int -> Image -> TileCoords -> Int -> IO ()
- Data.GPS.Gps2HtmlReport.DrawOsm: project :: Int -> Int -> Int -> (Double, Double, Double, Double)
- Data.GPS.Gps2HtmlReport.DrawOsm: projectMercToLat :: Floating a => a -> a
- Data.GPS.Gps2HtmlReport.DrawOsm: rectangle :: Int -> Int -> Rectangle
- Data.GPS.Gps2HtmlReport.DrawOsm: resizeImg :: Image -> (Int, Int) -> IO Image
- Data.GPS.Gps2HtmlReport.DrawOsm: secant :: Floating a => a -> a
- Data.GPS.Gps2HtmlReport.DrawOsm: selectedTiles :: TileCoords -> [(Int, Int)]
- Data.GPS.Gps2HtmlReport.DrawOsm: tileNumbers :: Double -> Double -> Int -> [(Int, Int)]
- Data.GPS.Gps2HtmlReport.DrawOsm: zoom :: TileCoords -> Int
- Data.GPS.Gps2HtmlReport.DrawOsm: zoomCalc :: TileCoords -> Int
- Data.GPS.Gps2HtmlReport.HTMLGenerator: osmImg :: Html
- Data.GPS.Gps2HtmlReport.HTMLGenerator: statsTable :: [WptType] -> Html
- Data.GPS.Gps2HtmlReport.JourneyCharts: PDF :: OutputType
- Data.GPS.Gps2HtmlReport.JourneyCharts: PNG :: OutputType
- Data.GPS.Gps2HtmlReport.JourneyCharts: PS :: OutputType
- Data.GPS.Gps2HtmlReport.JourneyCharts: SVG :: OutputType
- Data.GPS.Gps2HtmlReport.JourneyCharts: Window :: OutputType
- Data.GPS.Gps2HtmlReport.JourneyCharts: accumDistanceAndElevationChart :: [WptType] -> OutputType -> Renderable ()
- Data.GPS.Gps2HtmlReport.JourneyCharts: data OutputType
- Data.GPS.Gps2HtmlReport.JourneyCharts: speedAndElevationOverTimeChart :: [WptType] -> OutputType -> Renderable ()
- Data.GPS.Gps2HtmlReport.JourneyStats: dfltTZ :: TimeZone
- Data.GPS.Gps2HtmlReport.JourneyStats: lclTime :: DateTime -> LocalTime
- Data.GPS.Gps2HtmlReport.JourneyStats: speedAtPoints :: [WptType] -> [(LocalTime, Speed)]
- Data.GPS.Gps2HtmlReport.JourneyStats: speedAtPoints' :: WptType -> [WptType] -> [(LocalTime, Speed)]
Files
- Data/GPS/Gps2HtmlReport/DrawOsm.hs +28/−47
- Data/GPS/Gps2HtmlReport/HTMLGenerator.hs +6/−4
- Data/GPS/Gps2HtmlReport/JourneyCharts.hs +6/−2
- Data/GPS/Gps2HtmlReport/JourneyStats.hs +13/−2
- Data/GPS/Gps2HtmlReport/Main.hs +62/−36
- README.md +41/−31
- gps2htmlReport.cabal +2/−2
Data/GPS/Gps2HtmlReport/DrawOsm.hs view
@@ -1,9 +1,10 @@ -module Data.GPS.Gps2HtmlReport.DrawOsm where+module Data.GPS.Gps2HtmlReport.DrawOsm (+ generateOsmMap -- :: String -> [WptType] -> IO ()+ ) where import Prelude import Data.GPS-import Graphics.Transform.Magick.Types hiding (Image, minimum, maximum) import Network.HTTP.Enumerator import qualified Data.ByteString as B import qualified Data.ByteString.Lazy as L@@ -15,9 +16,6 @@ import Data.GPS.Gps2HtmlReport.JourneyStats baseurl = "http://tile.openstreetmap.org"-tilesprefix = "tile"-tilesourcename = "osmrender"--- zoom = 16::Int data TileCoords = TileCoords { minX :: Int , maxX :: Int @@ -25,7 +23,6 @@ , maxY :: Int } - tileNumbers :: Double -> Double -> Int -> [(Int,Int)] tileNumbers latitude longitude zoom = let xtile = ((longitude+180) / 360) * fromInteger (shift (1::Integer) zoom)@@ -67,17 +64,8 @@ let tileScope = determineTiles [wpt] tCoords zoom in determineTiles wpts tileScope zoom -deltaLat :: TileCoords -> Int-deltaLat tCoords = maxX tCoords - minX tCoords--deltaLong :: TileCoords -> Int-deltaLong tCoords = maxY tCoords - minY tCoords- maxNumAutoTiles = 32 -zoom :: TileCoords -> Int-zoom = zoomCalc- zoomCalc :: TileCoords -> Int zoomCalc tCoords = let numxtiles = maxX tCoords - minX tCoords + 1@@ -100,17 +88,11 @@ maxy = maxY tCoords in [(i,j) | i <- [minx..maxx], j <- [miny..maxy]] --- | Formats the filename string-filenameStr :: (Show a, Show a1) => a -> a1 -> String-filenameStr xTile yTile = tilesprefix ++ tilesourcename ++ "-z"++show zoom++"-x"++show xTile++"-y"++show yTile++".png" -- | Formats the URL string urlStr xTile yTile zoom = baseurl ++"/"++show zoom++"/"++show xTile++"/"++show yTile++".png" -rectangle :: Int -> Int -> Graphics.Transform.Magick.Types.Rectangle-rectangle x' y' = Rectangle {width=256, height=256, x = x'*256, y = y'*256}- -- | Takes the URL of a given OSM tile and uses curl to download it downloadFile :: String -> IO Image downloadFile url = do@@ -167,34 +149,31 @@ y = round $ (lat' - north) * 256.0 / (south - north) + fromIntegral yoffset in (x,y) + -- | Takes the 'WptType' and draws lines between every -- point to point connection in the 'Trail'-drawLines :: [WptType] -> TileCoords -> Image -> Int -> IO Image-drawLines [] _ img _ = return img-drawLines [_] _ img _ = return img-drawLines (wpt:wpts) tCoord img zoom = do+drawLines :: [WptType] -> TileCoords -> Image -> Image -> Int -> IO ()+drawLines [] _ _ _ _ = return ()+drawLines [_] _ _ _ _ = return ()+drawLines (wpt:wpts) tCoord img lineImg zoom = do let start = pixelPosForCoord [wpt] tCoord zoom end = pixelPosForCoord [head wpts] tCoord zoom minEle = fromMaybe 0 $ fmap snd $ findPoint wpts wpt ele (<) maxEle = fromMaybe 0 $ fmap snd $ findPoint wpts wpt ele (>)- drawLine' start end img (minEle,fromMaybe 0 $ ele wpt,maxEle) 0- drawLines wpts tCoord img zoom+ drawLine' start end img lineImg (minEle,fromMaybe 0 $ ele wpt,maxEle)+ drawLines wpts tCoord img lineImg zoom --- | This is a fix on the fact that the 'drawLine' function--- provided by the GD bindings do not provid a `width' parameter-drawLine' :: Point -> Point -> Image -> (Double,Double,Double) -> Int -> IO ()-drawLine' start end img (minEle,ele',maxEle) i- | i < 4 = do- drawLine (fst start+(i-2),snd start-(i-2)) (fst end+(i-2),snd end-(i-2)) color' img- drawLine (fst start+(i+2),snd start-(i-2)) (fst end+(i+2),snd end-(i-2)) color' img- drawLine (fst start+(i+2),snd start-(i+2)) (fst end+(i+2),snd end-(i+2)) color' img- drawLine (fst start+(i-2),snd start-(i+2)) (fst end+(i-2),snd end-(i+2)) color' img- drawLine' start end img (minEle,ele',maxEle) (i+1)- | otherwise = return ()- where range = maxEle - minEle- x' = ele' - minEle- x'' = x' / range- color' = lineColor $ round $ 255.0*x''+-- | Sets the colour for a single line segment in the track,+-- and +drawLine' :: Point -> Point -> Image -> Image -> (Double,Double,Double) -> IO ()+drawLine' start end img lineImg (minEle,ele',maxEle) = do+ fillImage color lineImg+ setBrush img lineImg+ drawLine (fst start,snd start) (fst end,snd end) (unPCREOption brushed) img+ where range = maxEle - minEle+ x' = ele' - minEle+ x'' = x' / range+ color = lineColor $ round $ 255.0*x'' -- | Uses a sliding scale for the red value in the RGB Color -- to show a sliding color from green to yellow in accordance@@ -235,8 +214,10 @@ let tiles = determineTiles points initCoords 16 zoom = zoomCalc tiles tiles' = determineTiles points initCoords zoom- backgroundImg <- makeOSMLayer tiles' zoom- imgWithLines <- drawLines points tiles' backgroundImg zoom- resizedImg <- fitToWidth imgWithLines- addCopyright resizedImg- savePngFile (webDir++"/osm.png") resizedImg+ img <- makeOSMLayer tiles' zoom+ lineImg <- newImage (5,5)+ drawLines points tiles' img lineImg zoom+ savePngFile (webDir++"/osm_fullsize.png") img+ img' <- fitToWidth img+ addCopyright img'+ savePngFile (webDir++"/osm.png") img'
Data/GPS/Gps2HtmlReport/HTMLGenerator.hs view
@@ -1,13 +1,15 @@ -- | The `HTMLGenerator' module generates the HTML content for the index.html generated-module Data.GPS.Gps2HtmlReport.HTMLGenerator where+module Data.GPS.Gps2HtmlReport.HTMLGenerator (+ generateHtmlPage -- :: [WptType] -> Html+ ) where import Text.Html import Data.GPS hiding (src,link,href) import Text.Printf import Data.Maybe -import Data.GPS.Gps2HtmlReport.JourneyStats+import Data.GPS.Gps2HtmlReport.JourneyStats (journeyDistance,meanElevation,journeyTime,maxSpeed,meanJourneySpeed,findPoint,dateOfJourney) -- | Takes all the WayPoints and generates the HTML file generateHtmlPage :: [WptType] -> Html@@ -18,13 +20,13 @@ title = thetitle $ stringToHtml "GPX Track Report" theStyle = style (stringToHtml cssContent) ! [thetype "text/css"] theHeader = header $ concatHtml [title,theStyle]- mainArea = thediv (concatHtml [header1,statsTable points,br,header2,chartTable,header3,osmImg]) -- ! [identifier "main"]+ mainArea = thediv (concatHtml [header1,statsTable points,br,header2,chartTable,header3,osmImg]) theBody = body mainArea in concatHtml [theHeader,theBody,pgFooter] -- | The OpenStreetMap image area osmImg :: Html-osmImg = center $ image ! [src "osm.png"]+osmImg = anchor (image ! [src "osm.png"]) ! [href "osm_fullsize.png"] -- | Takes all the WayPoints and calculates the journey statistics statsTable :: [WptType] -> Html
Data/GPS/Gps2HtmlReport/JourneyCharts.hs view
@@ -1,7 +1,11 @@ -- | This module uses the JourneyStats module to generate -- the statistics about the journey WayPoints, then -- uses the Cairo bindings to generate the charts-module Data.GPS.Gps2HtmlReport.JourneyCharts where+module Data.GPS.Gps2HtmlReport.JourneyCharts (+ renderToPng, -- :: (t, OutputType -> Renderable a) -> FilePath -> IO (PickFn a)+ chart1, -- :: [WptType] -> (String, OutputType -> Renderable ())+ chart2 -- :: [WptType] -> (String, OutputType -> Renderable ())+ )where import Data.GPS import Data.Maybe@@ -11,7 +15,7 @@ import Data.Colour.Names import Data.Time.LocalTime -import Data.GPS.Gps2HtmlReport.JourneyStats+import Data.GPS.Gps2HtmlReport.JourneyStats (ptsElevation,avrSpeedOverTime,accumDistance,findPoint) data OutputType = Window | PNG | PS | PDF | SVG
Data/GPS/Gps2HtmlReport/JourneyStats.hs view
@@ -1,8 +1,19 @@ -- | This module provides the JourneyCharts and HTMLGenerator -- modules with statistics for the charts, and the journey statistics-module Data.GPS.Gps2HtmlReport.JourneyStats where+module Data.GPS.Gps2HtmlReport.JourneyStats (+ ptsElevation, -- :: [WptType] -> [(LocalTime,Double)]+ avrSpeedOverTime, -- :: [(LocalTime,Speed)] -> Double -> Double -> [(LocalTime,Speed)] -> [(LocalTime,Speed)]+ accumDistance, -- :: [WptType] -> Double -> [(LocalTime,Distance)]+ findPoint, -- findPoint :: [WptType] -> WptType -> (WptType -> Maybe Double) -> (Double -> Double -> Bool) -> Maybe (LocalTime,Double)+ journeyDistance, -- :: (Lat a, Lon a) => [a] -> Distance+ meanElevation, -- :: Ele a => [a] -> Double+ journeyTime, -- :: Time a => [a] -> NominalDiffTime+ maxSpeed, -- :: [WptType] -> Speed+ meanJourneySpeed, -- :: (Lat a, Lon a, Time a) => [a] -> Distance+ dateOfJourney -- :: Time a => [a] -> Maybe Day+ ) where -import Data.GPS -- hiding (speed)+import Data.GPS import Data.Maybe import Data.Time.LocalTime import Data.Time.Clock
Data/GPS/Gps2HtmlReport/Main.hs view
@@ -1,5 +1,5 @@ -{-# LANGUAGE RecordWildCards,DeriveDataTypeable #-}+{-# LANGUAGE RecordWildCards,DeriveDataTypeable,DoAndIfThenElse #-} module Main where @@ -8,19 +8,25 @@ import System.Directory import Text.Html hiding (name) import System.Console.CmdArgs+import Codec.Archive.Tar+import System.Random -import Data.GPS.Gps2HtmlReport.HTMLGenerator-import Data.GPS.Gps2HtmlReport.JourneyCharts-import Data.GPS.Gps2HtmlReport.DrawOsm+import Data.GPS.Gps2HtmlReport.HTMLGenerator (generateHtmlPage)+import Data.GPS.Gps2HtmlReport.JourneyCharts (renderToPng,chart1,chart2)+import Data.GPS.Gps2HtmlReport.DrawOsm (generateOsmMap) data MyOptions = MyOptions- { imageOnly :: Bool+ { imageonly :: Bool,+ archive :: Bool,+ hashnames :: Bool } deriving (Data, Typeable, Show, Eq) -- Customize your options, including help messages, shortened names, etc. myProgOpts :: MyOptions myProgOpts = MyOptions- { imageOnly = def &= help "Generates only an image of the track overlay on an OpenStreetMap layer"+ { imageonly = def &= help "Generates only an image of the track overlay on an OpenStreetMap layer",+ archive = def &= help "Produce tar archive for web and image files",+ hashnames = def &= help "Create reports in hashed directory names" } getOpts :: IO MyOptions@@ -33,7 +39,7 @@ &= program _PROGRAM_NAME _PROGRAM_NAME = "gps2HtmlReport"-_PROGRAM_VERSION = "0.2.2"+_PROGRAM_VERSION = "0.3" _PROGRAM_INFO = _PROGRAM_NAME ++ " version " ++ _PROGRAM_VERSION _PROGRAM_ABOUT = "A Haskell utility to generate HTML page reports of GPS Tracks and Track overlays on OpenStreetMap tiles" _COPYRIGHT = "(C) Rob Stewart 2011"@@ -45,25 +51,21 @@ -- Before directly calling your main program, you should warn your user about incorrect arguments, if any. optionHandler :: MyOptions -> IO [()]-optionHandler opts@MyOptions{..} =- exec opts+optionHandler opts@MyOptions{..} = exec opts exec :: MyOptions -> IO [()] exec MyOptions{..} =- if imageOnly- then processGps False- else processGps True- + processGps imageonly archive hashnames -- | Reads the current directory for all .gpx files, then maps to `generateReport' for each one-processGps :: Bool -> IO [()]-processGps fullReport = do+processGps :: Bool -> Bool -> Bool -> IO [()]+processGps imageonly archive hashnames = do curDir <- getCurrentDirectory allFiles <- getDirectoryContents curDir let allFilesSplit = map splitExtension allFiles let gpxFiles = filter (\(_,b) -> b==".gpx") allFilesSplit- putStr ("Processing "++show (length gpxFiles)++" file(s)...\n")- mapM (\(a,b) -> generateReport (curDir++"/"++a) (a++b) fullReport) gpxFiles+ putStrLn ("Processing "++show (length gpxFiles)++" file(s)...")+ mapM (\(a,b) -> generateReport curDir a (a++b) imageonly archive hashnames) gpxFiles -- | Creates empty directory for each web report createEmptyDir :: FilePath -> IO ()@@ -74,22 +76,46 @@ -- | Generates the HTML report for each .gpx file, -- or simply an osm.png file if the '--imageonly' argument -- is used-generateReport :: FilePath -> FilePath -> Bool -> IO ()-generateReport webDir gpxFile fullReport = do- points <- readGPX gpxFile- case length points of- 0 -> putStr "Unable to parse GPX file. Skipping..."- _ -> do- createEmptyDir webDir- if fullReport then do- putStr "Generating statistical charts...\n" - renderToPng (chart1 points) (webDir++"/chart1.png")- renderToPng (chart2 points) (webDir++"/chart2.png")- writeFile (webDir++"/index.html") (renderHtml $ generateHtmlPage points)- putStr "Downloading OpenStreetMap tiles...\n"- generateOsmMap webDir points- putStr $ "Processing '"++gpxFile++"' complete. Report saved in: "++webDir++"/index.html\n"- else do- putStr "Downloading OpenStreetMap tiles...\n"- generateOsmMap webDir points- putStr $ "Processing '"++gpxFile++"' complete. Image saved in: "++webDir++"/osm.png\n"+generateReport :: FilePath -> String -> FilePath -> Bool -> Bool -> Bool -> IO ()+generateReport webDir projectName gpxFile imageonly archive hashnames = do+ points <- readGPX gpxFile++ -- A successfully parsed gpx file will create+ -- a list of waypoints+ case length points of+ 0 -> putStrLn "Unable to parse GPX file. Skipping..."+ _ -> do+ let projName = if hashnames then do+ hashedProjName+ else return projectName+ name <- projName+ let path = (webDir++"/"++name)+ createEmptyDir path+ + -- If --imageonly was set, only produce OSM image+ if imageonly then do+ putStrLn "Downloading OpenStreetMap tiles..."+ generateOsmMap path points+ putStrLn $ gpxFile ++" processed. Image saved in: "++path++"/osm.png"++ -- Otherwise, create the complete web page report+ else do+ putStrLn "Generating statistical charts..." + renderToPng (chart1 points) (path++"/chart1.png")+ renderToPng (chart2 points) (path++"/chart2.png")+ writeFile (path++"/index.html") (renderHtml $ generateHtmlPage points)+ putStrLn "Downloading OpenStreetMap tiles..."+ generateOsmMap path points+ putStrLn $ gpxFile ++" processed. Report saved in: "++path++"/index.html"+ + -- Lastly, if --archive was set, then create .tar+ -- and put all contents into this archive+ if archive then do+ putStrLn $ "Creating archive: " ++ (path++".tar")+ create (path++".tar") webDir [name]+ else return ()+ ++hashedProjName = do+ r <- randomIO+ if r > 0 then return (show (r::Int)) else hashedProjName
README.md view
@@ -9,69 +9,77 @@ * Diagrams charting speed, elevation, accumulated distance etc.. * OpenStreetMap diagram highlighting the GPS track -An example can be seen [HERE](http://www.macs.hw.ac.uk/~rs46/gps2htmlreport/3/index.html).+An example can be seen [here](http://www.macs.hw.ac.uk/~rs46/gps2htmlreport/3/index.html). The hackage page is [here](http://hackage.haskell.org/package/gps2htmlReport). Installation -------------It is assumed that you have the Haskell Platform installed.+A user first of all needs to install the Haskell Platform. For+exmaple, on an RPM-based machine, as root:+```+># yum install haskell-platform+``` -Just run these commands to configure and install the `gps2HtmlReport' utility, run these commands: +The **recommended** way to install the `gps2HtmlReport' program, is to+grab it via http://hackage.haskell.org: ```+cabal update+cabal install gps2htmlReport+```++Or to install the version in the github repository:+```+git clone git://github.com/robstewart57/Gps2HtmlReport.git+cd Gps2HtmlReport+cabal update cabal configure cabal install ``` -This Haskell program also makes use of the bindings to **GraphcsMagick** and **Cairo**, and so the necessary system packages need to be installed, via a Linux package manager.+This Haskell program also makes use of the bindings to+**GraphcsMagick** and **Cairo**, and so the necessary system packages+need to be installed, via a Linux package manager. On an RPM-based package manager, run this command as root:- ```-yum install GraphicsMagick cairo alex happy gtk2hs-buildtools+># yum install GraphicsMagick cairo gtk2hs-buildtools ``` Prerequisites --------------First of all, you need to have your GPS date in a GPX file. There are many gpx exporters available. I use my Android phone to take GPX tracks, with a great application, [OSMTracker](https://code.google.com/p/osmtracker-android/). This application allows you to export your GPS tracks to GPX.+First of all, you need to have your GPS date in a GPX file. There are+many gpx exporters available. I use my Android phone to take GPX+tracks, with a great application,+[OSMTracker](https://code.google.com/p/osmtracker-android/). This+application allows you to export your GPS tracks to GPX. Usage ----- The program will search for all files ending in ".gpx", and for each one, generate a HTML report.- ``` $ cd $location_of_gpx_files $ ls 1.gpx-$ gps2HtmlReport-Processing 1 file(s)...-Generating statistical charts...-Downloading OpenStreetMap tiles...-Processing '1.gpx' complete. Report saved in: /home/foo/bar/1/index.html-```+$ gps2HtmlReport --help -Alternatively, you can you this program to simply generate an image of your track on top of an OpenStreetMap layer.+gps2HtmlReport [OPTIONS]+ A Haskell utility to generate HTML page reports of GPS Tracks and Track+ overlays on OpenStreetMap tiles -```-$ gps2htmlReport --imageonly-Processing 1 file(s)...-Downloading OpenStreetMap tiles...-Processing '1.gpx' complete. Image saved in: /home/foo/bar/1/osm.png+Common flags:+ -i --imageonly Generates only an image of the track overlay on an+ OpenStreetMap layer+ -a --archive Produce tar archive for web and image files+ --hashnames Create reports in hashed directory names+ -h --help Display help message+ -v --version Print version information+ -V --Verbose Loud verbosity+ -q --quiet Quiet verbosity ``` -Notes-------This project requires testing!--If you are able to use the utility to generate HTML reports, then I'd like to hear suggestions for improvements. If you are **unable** to run it, then I **really** want to hear from you. What the problem is; How far did you get; or better still, send me the .gpx file.--I'd also like to know what is required to make this utility work on non-Linux systems. This has been tested on a Fedora Linux machine. Does it work on Mac OSX? Windows? What needs doing to run it on other Linux distro's?--Either way, get in touch!-- Problems ----- @@ -89,6 +97,8 @@ * Ubuntu 32bit: $# ln -vs $(gcc --print-file-name=libstdc++.so) /usr/local/lib/ * Ubuntu 64bit: $# ln -vs $(gcc --print-file-name=libstdc++.so) /usr/local/lib64/ +If you experience other problems, please let me know - and preferrably+sending me the problematic .gpx file. Credits -------
gps2htmlReport.cabal view
@@ -1,5 +1,5 @@ Name: gps2htmlReport-Version: 0.2.2+Version: 0.3 Cabal-Version: >=1.6 Description: Generate a HTML summary report of GPS tracks synopsis: GPS to HTML Summary Report@@ -19,7 +19,7 @@ Main-is: Data/GPS/Gps2HtmlReport/Main.hs library- Build-Depends: base >= 4 && < 5, html, gps >= 0.8.4, time, cairo, Chart, random, data-accessor, colour, xsd >= 0.3.5, filepath, directory, process, gd, bytestring, http-enumerator, hsmagick, cmdargs+ Build-Depends: base >= 4 && < 5, html, gps >= 0.8.4, time, cairo, Chart, random, data-accessor, colour, xsd >= 0.3.5, filepath, directory, process, gd >= 3000.7.1, bytestring, http-enumerator, hsmagick, cmdargs, tar Exposed-Modules: Data.GPS.Gps2HtmlReport.HTMLGenerator, Data.GPS.Gps2HtmlReport.JourneyStats, Data.GPS.Gps2HtmlReport.JourneyCharts, Data.GPS.Gps2HtmlReport.DrawOsm source-repository head