Marble: Difference between revisions

    From KDE TechBase
    (add valgrind section)
    (72 intermediate revisions by 13 users not shown)
    Line 1: Line 1:
    {{Template:I18n/Language Navigation Bar|Projects/Marble}}


    __NOTOC__
     
    [[Image:Marble_logo.png]]
    [[Image:Marble_logo.png]]


    == About Marble ==
    == About Marble ==
    ;[[/Devices_and_Use_Cases|Devices and Use Cases]]
    ;[[/FAQ|Marble FAQ]]
    ;[[/FAQ|Marble FAQ]]


    == Examples of Use ==
    == Success Stories: 3rd party applications using the Marble Library==
    ;[[/MarbleUsedBy|Applications using the Marble library]]
    ;[[/MarbleUsedBy|Software that makes use of Marble]]
     
    == Tutorials: How to use the Marble Widget in your application ==
    ;[[/MarbleDesigner|with Qt Designer]]
    ;[[/MarbleWindows|On Windows, with Qt Creator/Qt Designer]]
     
    === With C++ ===
    ;[[/MarbleCPlusPlus|Hello World]]
    ;[[/MarbleMarbleWidget|Changing basic map properties]]
    ;[[/MarbleSignalsSlots|Creating a window with controls]]
    ;[[/MarbleGeoPainter|Painting onto the map]]
    ;[[/LayerInterface|Drawing in Custom Layers]]
    ;[[/Routing/BasicRouting|Basic Routing]]
    ;[[/Runners/Search|Searching for Points of Interest]]
    ;[[/Runners/ReverseGeocoding|Reverse Geocoding]]
    ;[[/Runners/Parse|Parsing Files]]
    ;[[/Runners/PaintingGeoDataLineString|Painting LineString]]
    ;[[/Runners/DisplayGeoDataPlacemark|Displaying GeoData Documents]]


    == Using the Marble Widget in other applications ==
    ;[[/MarbleDesigner|with QtDesigner]]
    ;[[/MarbleCPlusPlus|with C++]]
    ;[[/MarblePython|with Python]]
    ;[[/MarblePython|with Python]]


    Line 26: Line 40:


    ;[[/GoMarble|How to become a Marble Developer]]
    ;[[/GoMarble|How to become a Marble Developer]]
    == Compiling Marble ==
    ;[[/LinuxCompiling|Compiling on Linux]]
    ;[[/WindowsCompiling|Compiling on Windows]]
    ;[[/MaemoEnvironment|Compiling on Maemo]]
    ;[[/MeeGoEnvironment|Compiling on MeeGo]]
    ;[[/PlasmaActiveEnvironment|Compiling for Plasma Active]]
    ;[[/MacCompiling|Compiling on Mac OS]]
    ;[[/QtCreator|Setting up QtCreator for Marble Development]]


    == Packaging Marble ==
    == Packaging Marble ==


    Here is some advice about how packaging is supposed to happen on the various plattforms that are supported.
    ;[[/NewMarbleMoldules|New Marble Modules]] (future packaging advice)


    ===General===
    Here is some advice about how packaging is supposed to happen on the various platforms that are supported.


    ===Linux===
    ;[[/LinuxPackaging|Packaging for Linux]]
    ;[[/WindowsPackaging|Packaging for Windows]]
    ;[[/MaemoPackaging|Packaging for Maemo]]
    ;[[/MeeGoPackaging|Packaging for MeeGo]]
    ;[[/MacPackaging|Packaging for Mac]]


    ===Mac OS X===
    == Tools for Marble ==


    ==== Qt-Only ====
    Here are some tools and checks that are performed on marble code:
    ;[https://bugs.kde.org/buglist.cgi?query_format=advanced&short_desc_type=allwordssubstr&short_desc=&product=marble&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&cmdtype=doit&order=Importance Marble Open Bugs]
    ;[http://reviewboard.kde.org/groups/marble/ Review Board]
    ;[http://api.kde.org/4.x-api/kdeedu-apidocs/marble/html/index.html API Docs (KDE Trunk)]
    ;[http://www.englishbreakfastnetwork.org/apidocs/apidox-kde-4.x/kdeedu-marble.html APIDOX reports]
    ;[http://www.englishbreakfastnetwork.org/krazy/reports/kde-4.x/kdeedu/marble/index.html Krazy reports]


    Configure Marble with:
    == Programming Coordination ==
    <pre>
    cmake -DCMAKE_BUILD_TYPE=release -DQTONLY=ON -DCMAKE_INSTALL_PREFIX=/Applications/ ../marble
    </pre>


    To generate a Diskimage (.dmg) one can use this script (based on parts by Tim Sutton, thanks!):
    Here are a few links to various issues we are working on:
    ;[[/Gsoc2010| Gsoc Students projects 2010]]
    ;[[/GsocGit| Use of git(orious) for GSOC]]
    ;[[/TODO|TODO list]]
    ;[[/MaemoTODO|Maemo specific TODO list]]


    <code bash>
    ;[[/GSoC2011| GSoC Students' projects 2011]]
    VERSION=0.7.1
    ;[http://community.kde.org/SoCiS/2011/Ideas#Marble_Virtual_Globe ESA SoCIS 2011 ideas]
    APPNAME=Marble


    VOLNAME=${APPNAME}-${VERSION}
    ;[[/GSoC2012| GSoC Students' projects 2012]]
    DMGNAME=${VOLNAME}Uncompressed.dmg
    COMPRESSEDDMGNAME=${VOLNAME}.dmg


    function deploy_file() {
    === Translation ===
    for n in $(otool -L $1 | grep Qt); do
    ;[[/MapTranslation|Map Translation]]
    path=`echo $n | grep Qt`
    ;[[/UiTranslation|UI Translation]]
        if [ $path ] ; then
    ;[[/GeoDataCoordinatesTranslation|GeoDataCoordinates Translation]]
        name=$(basename $path)
    FRAMEWORKS="$FRAMEWORKS $name"
    fi
    done
     
    for framework in $FRAMEWORKS ; do
    install_name_tool -change \
    $framework.framework/Versions/4/$framework \
    @executable_path/../Frameworks/$framework.framework/Versions/4/$framework \
    $1
    done
    }
     
    function deploy_plugins() {
    for plugin in $1/Contents/Resources/plugins/*; do
    deploy_file $plugin
    done
    }
     
    function set_bundle_display_options() {
    osascript <<-EOF
        tell application "Finder"
            set f to POSIX file ("${1}" as string) as alias
            tell folder f
                open
                tell container window
                    set toolbar visible to false
                    set statusbar visible to false
                    set current view to icon view
                    delay 1 -- sync
                    set the bounds to {20, 50, 300, 400}
                end tell
                delay 1 -- sync
                set icon size of the icon view options of container window to 64
                set arrangement of the icon view options of container window to not arranged
                set position of item "Marble.app" to {100,150}
                set position of item "Applications" to {280, 150}
                set background picture of the icon view options of container window to file "background.png" of folder "Pictures"
                set the bounds of the container window to {0, 0, 300, 400}
                update without registering applications
                delay 5 -- sync
                close
            end tell
            delay 5 -- sync
        end tell
    EOF
     
    }
     
    function create_symlinks() {
    cd "$1/Contents/Resources"
    ln -s "../MacOS/resources/data/"    "data"
    ln -s "../MacOS/resources/plugins/" "plugins"
    cd -
    }
     
     
     
     
    rm ~/Desktop/${DMGNAME}
    rm ~/Desktop/${COMPRESSEDDMGNAME}
    hdiutil create -size 150m -fs HFS+ -volname ${VOLNAME} ~/Desktop/${DMGNAME}
     
    # Mount the disk image
    hdiutil attach ~/Desktop/${DMGNAME}
     
    # Obtain device information
    DEVS=$(hdiutil attach ~/Desktop/${DMGNAME} | cut -f 1)
    DEV=$(echo $DEVS | cut -f 1 -d ' ')
    VOLUME=$(mount |grep ${DEV} | cut -f 3 -d ' ')
     
    # copy in the application bundle
    cp -Rp /Applications/${APPNAME}.app ${VOLUME}/${APPNAME}.app
     
    # fix the libs
    macdeployqt ${VOLUME}/${APPNAME}.app
    create_symlinks ${VOLUME}/${APPNAME}.app
    deploy_file "${VOLUME}/${APPNAME}.app/Contents/MacOS/lib/libmarblewidget.7.dylib"
    deploy_plugins ${VOLUME}/${APPNAME}.app
     
    # copy in background image
    mkdir -p ${VOLUME}/Pictures
    # fixme: path
    cp ~/Desktop/marble-dmg-background.png ${VOLUME}/Pictures/background.png
    # symlink applications
    ln -s /Applications/ ${VOLUME}/Applications
    set_bundle_display_options ${VOLUME}
    mv ${VOLUME}/Pictures ${VOLUME}/.Pictures
     
    # Unmount the disk image
    hdiutil detach $DEV
    # Convert the disk image to read-only
    hdiutil convert ~/Desktop/${DMGNAME} -format UDBZ -o ~/Desktop/${COMPRESSEDDMGNAME}
    </code>
     
     
    It uses the macdeployqt tool which copies Qt and its plugins into the App Bundle.
    macdeployqt also tells the main application to link against the libs contained in the bundle, instead of the system libs.
    This does not happen to the libmarblewidget and the Marble plugins, so it has to be done by the script.
    The script also sets a background Image for the dmg. (Place it at ~/Desktop/marble-dmg-background.png or change the path in the script)
     
    After that you should have Marble-version.dmg on you Desktop.
     
    ===Windows===
     
    == Programming Coordination ==
     
    Here are a few links to various issues we are working on:


    === User Interface ===
    === User Interface ===
    ;[[/Mockups|Mockups]]
    ;[[/Mockups|Mockups]]
    ;[[/IconStatus|Icon Status]]


    === Texture Mapping ===
    === Texture Mapping ===
    Line 175: Line 97:


    === GeoData Library / KML ===
    === GeoData Library / KML ===
    ;[[/LibGeoData|GeoData Library]]
    The base classes to manipulate geographic data
    ;[[/GeoData|GeoData Presentation]]
    ;[[/GeoData/GeoDataUse|Use cases for GeoData classes]]
    ;[http://websvn.kde.org/*checkout*/trunk/KDE/kdeedu/marble/src/lib/geodata/data/README.html GeoData API Description]
    ;[[/GeoData/GeoDataParsing|Parsing GeoData]]
    ;[[/GeoData/GeoDataWriter|Writing GeoData]]
    ;[[/GeoData/PointerVsImplicitShare|Pointer vs. Implicit Share]]
     
     
    ;[[/KMLStatus|KML Status]]
    ;[[/KMLStatus|KML Status]]
    ;[[/GPXStatus|GPX Status]]
    ;[[/GPXStatus|GPX Status]]
    Using GeoData:
    ;[[/Placemark|Placemarks Management]]
    ;[[/ModelView|Review of Model-View use in marble]]
    === Geo Graphics View ===
    ;[[/GeoGraphicsViewOverview|Overview of the GeoGraphicsView]]
    ;[[/GraphicsViewGeoParser| Interaction between GeoData and GeoGraphicsView]]


    === GeoPainter / DGML ===
    === GeoPainter / DGML ===
    ;[[/GeoPainter|GeoPainter]]
    ;[[/GeoPainter|GeoPainter]]
    ;[[/Dgml|DGML]]
    ;[[/Dgml|DGML]]
    === Plugin Interfaces ===
    ;[[/Plugins|Plugin interfaces]]


    === Marble Runner ===
    === Marble Runner ===
    Line 187: Line 128:
    ;[[/OsmNameFinderRunner|OSM Runner]]
    ;[[/OsmNameFinderRunner|OSM Runner]]
    ;[[/RunnerHOWTO|Runner HOWTO]]
    ;[[/RunnerHOWTO|Runner HOWTO]]
    === Online Services ===
    ;[[/OnlineServices|Creating new Online Services]]
    ;[[/ListOfPossibleOnlineServices|List of possible Online Services]]


    === Projections ===
    === Projections ===
    ;[[/WinkelIii|Winkel III]]
    ;[[/WinkelIii|Winkel III]]
    ;[[/RobinsonProjection|Robinson projection]]
    [http://www.radicalcartography.net/?projectionref A little overview of map projections]


    === Tile Download ===
    === Tile Download ===
    ;[[/VectorTilingProposal|Vector Tiling Proposal]]
    ;[[/TileDownload|Tile Download]]
    ;[[/TileDownload|Tile Download]]


    === Documentation ===
    === Documentation ===
    ;[[/ApiDocs|API Docs]]
    ;[[/CustomMaps|How to customize maps]]
    ;[[/CustomMaps|How to customize maps]]
    ;[[/PNTFiles|How to change the PNT files used by Marble]]
    ;[[/MarblesSecrets|Marble's Secrets]]
    ;[[/MarblesSecrets|Marble's Secrets]]
    ;[[/ProxyConnection|How to use the Proxy]]
    ;[[/ProxyConnection|How to use the Proxy]]
    Line 202: Line 150:
    === GeoClue / GPS ===
    === GeoClue / GPS ===
    ;[[/GeoClue|GeoClue support in Marble]]
    ;[[/GeoClue|GeoClue support in Marble]]
    === XDG Base Directory Specification ===
    ;[[/xdg|XDG Base Directory Specification]]


    == Mapping Coordination ==
    == Mapping Coordination ==
    Possible maps we could use:
    * [http://pelagios.dme.ait.ac.at/maps/greco-roman/ Tiled map of the classical world] see the [http://pelagios-project.blogspot.co.uk/2012/09/a-digital-map-of-roman-empire.html authors blog] for details
    * [http://www.unearthedoutdoors.net/global_data/true_marble/download TrueMarble Global 250m images]
    * [http://onearth.jpl.nasa.gov/ OnEarth NASA satellite images]
    * [http://worldwindcentral.com/wiki/Add-on:ZoomIt! ZoomIt! (in parts proprietary)]
    * [http://sos.noaa.gov/datasets/ NOAA Science on a Sphere]
    * [http://efele.net/maps/tz/world/ Olsen Time Zone map in Shapefile format].  Public Domain.  Scripted to generate from current tz file.
    === Natural Earth Vector Map ===
    ;[[/NaturalEarth|A proposal to use the Natural Earth vector map]]
    === Documentation ===
    === Documentation ===
    ;[[/HistoricalMaps|How to create Historical Maps]]
    ;[[/HistoricalMaps|How to create Historical Maps]]
    ;[[/CustomMaps|How to create Custom Maps]]


    ;[[/PalaeoMaps|Global Palaeogeography]]
    ;[[/PalaeoMaps|Global Palaeogeography]]


    == Routing ==
    == Routing ==
    ;[[/RoutingIdeas|General ideas about routing]]
    ;[[/OnlineRoutingImplementation|Implementation of Online-Routing]]
    ;[[/MaemoOfflineRouting|Installation of Marble and Gosmore on Maemo]]
    ;[[/RoutingRoadmap|Routing Roadmap]]
    ;[[/RoutingInstructions|Routing Instructions]]


    == valgrind logs ==
    == valgrind ==
    ;[[/ValgrindLogs|if you want to fix memory leaks, valgrind logs can be found here]]
    if you want to fix memory leaks, you can run valgrind with:
     
    valgrind --leak-check=full --track-origins=yes --num-callers=30 marble 2>&1 | tee MARBLE_MEMCHECK


    == Meetings ==
    == Meetings ==
    Summaries and logs of scheduled Marble meetings can be found on the following pages:
    Summaries and logs of scheduled Marble meetings can be found on the following pages:
    ;[[/MarbleMeeting20081029|Wednesday Nov. 10th, 2008]]
    ;[[/MarbleMeeting20081029|Wednesday Nov. 10th, 2008]]
    ;[[/MarbleMeeting20101107|Marble Weekend Sprint, Nov. 5-7]]

    Revision as of 20:50, 19 September 2012


    About Marble

    Devices and Use Cases
    Marble FAQ

    Success Stories: 3rd party applications using the Marble Library

    Software that makes use of Marble

    Tutorials: How to use the Marble Widget in your application

    with Qt Designer
    On Windows, with Qt Creator/Qt Designer

    With C++

    Hello World
    Changing basic map properties
    Creating a window with controls
    Painting onto the map
    Drawing in Custom Layers
    Basic Routing
    Searching for Points of Interest
    Reverse Geocoding
    Parsing Files
    Painting LineString
    Displaying GeoData Documents
    with Python
    via a shell script

    How to become a Marble developer ("Marblehead")

    So you are new to Marble development ...

    Welcome!

    Here you'll get all the information you need to start Marble development:

    How to become a Marble Developer

    Compiling Marble

    Compiling on Linux
    Compiling on Windows
    Compiling on Maemo
    Compiling on MeeGo
    Compiling for Plasma Active
    Compiling on Mac OS
    Setting up QtCreator for Marble Development

    Packaging Marble

    New Marble Modules (future packaging advice)

    Here is some advice about how packaging is supposed to happen on the various platforms that are supported.

    Packaging for Linux
    Packaging for Windows
    Packaging for Maemo
    Packaging for MeeGo
    Packaging for Mac

    Tools for Marble

    Here are some tools and checks that are performed on marble code:

    Marble Open Bugs
    Review Board
    API Docs (KDE Trunk)
    APIDOX reports
    Krazy reports

    Programming Coordination

    Here are a few links to various issues we are working on:

    Gsoc Students projects 2010
    Use of git(orious) for GSOC
    TODO list
    Maemo specific TODO list
    GSoC Students' projects 2011
    ESA SoCIS 2011 ideas
    GSoC Students' projects 2012

    Translation

    Map Translation
    UI Translation
    GeoDataCoordinates Translation

    User Interface

    Mockups
    Icon Status

    Texture Mapping

    Texture Mapping

    GeoData Library / KML

    The base classes to manipulate geographic data

    GeoData Presentation
    Use cases for GeoData classes
    GeoData API Description
    Parsing GeoData
    Writing GeoData
    Pointer vs. Implicit Share


    KML Status
    GPX Status

    Using GeoData:

    Placemarks Management
    Review of Model-View use in marble

    Geo Graphics View

    Overview of the GeoGraphicsView
    Interaction between GeoData and GeoGraphicsView

    GeoPainter / DGML

    GeoPainter
    DGML

    Plugin Interfaces

    Plugin interfaces

    Marble Runner

    Coordinate Runner
    OSM Runner
    Runner HOWTO

    Online Services

    Creating new Online Services
    List of possible Online Services

    Projections

    Winkel III
    Robinson projection

    A little overview of map projections

    Tile Download

    Vector Tiling Proposal
    Tile Download

    Documentation

    How to customize maps
    How to change the PNT files used by Marble
    Marble's Secrets
    How to use the Proxy

    GeoClue / GPS

    GeoClue support in Marble

    XDG Base Directory Specification

    XDG Base Directory Specification

    Mapping Coordination

    Possible maps we could use:

    Natural Earth Vector Map

    A proposal to use the Natural Earth vector map


    Documentation

    How to create Historical Maps
    How to create Custom Maps
    Global Palaeogeography

    Routing

    Implementation of Online-Routing
    Installation of Marble and Gosmore on Maemo
    Routing Roadmap
    Routing Instructions

    valgrind

    if you want to fix memory leaks, you can run valgrind with:

    valgrind --leak-check=full --track-origins=yes --num-callers=30 marble 2>&1 | tee MARBLE_MEMCHECK

    Meetings

    Summaries and logs of scheduled Marble meetings can be found on the following pages:

    Wednesday Nov. 10th, 2008
    Marble Weekend Sprint, Nov. 5-7