jacky

A technique blog for jacky

here are my artitles about work(embeded system develop, docker, etc.) and life(cook, hiking)


How to run osmscout2 base on libosmscout

libosmscout-OSMSCout2 demo test

first, pull down from libosmscout

###check environment variable

export QTDIR=/opt/Qt5.9.3/5.9.3/gcc_64
export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH
export QT_QPA_PLATFORM_PLUGIN_PATH=$QTDIR/plugins
export PATH=$PATH:$QTDIR/bin
export PATH=$PATH:/home/toolchain/arm-2014.09/bin
export PATH=$PATH:/opt/qt5.9.3-arm-confirm-license/bin
alias qtcreator=/opt/Qt5.9.3/Tools/QtCreator/bin/qtcreator
export CMAKE_PREFIX_PATH=$QTDIR:$CMAKE_PREFIX_PATH
export CMAKE_PREFIX_PATH=$QTDIR/lib/cmake/Qt5Widgets:$CMAKE_PREFIX_PATH

installed third-part libs to support Import and OSMScout2 demo.

e.g.

libxml2, libglfw3, libprotobuf, libmarisa, and so on. You can get explicit list when run cmake

build

mkdir ./libosmscout/build
cmake ..
make -j8
sudo make install

libosmscout should be installed to /usr/local/

###run

open ./libosmscout/OSMScout2/*.pro or CMakeLists.txt in QtCreator

####case .pro

suggest to comment line of PKGCONFIG, instead of INCLUDE and LIBS. i will try to use PKGCONFIG later.

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
INCLUDEPATH += /usr/local/include

LIBS += -L/usr/local/lib -losmscout -losmscout_map -losmscout_map_qt -losmscout_client_qt -lxml2 -lmarisa -losmscout_gpx -losmscout_import
#PKGCONFIG += libosmscout-map-qt libosmscout-client-qt

then you should be OK with compile and run

####case CMakeLists.txt

check CMAKE_PREFIX_PATH,

find_library(Qml Qwidgets Quick and so on)
最近的文章

怎么转换srtm hgt数据到osm

怎么转换SRTM hgt数据到OSM​ -jacky推荐使用工具 phyghtmap 主页 使用手册参考环境Ubuntu16.04 python3.5第一步 搭建使用环境搭建python3.5开发环境验证首先验证当前python版本,验证方法如下:打开终端(control + alt + T),输入这是python2.7的版本,phyghtmap不依赖2.7的版本,只需要3.x的版本jacklin@ubuntu:~$ python --versionPyth...…

继续阅读
更早的文章

How to import contour line to libosmscout

how to import contour line to libosmscoutreferencePageflag:elevationContourwhen we get .osm file from hgt, then we can import osm with *.osm.pbf to libosmscout../Import --typefile ../../stylesheets/map.ost --destinationDirectory \ ../../maps/demCh...…

继续阅读