top logo
 

QGIS on Android using external GPS receivers

Thanks to FORNAT AG which sponsored me I could spend some time looking for solutions to make QGIS on android working with an external GPS receiver that sends NMEA strings.
It all boils down to the following:

  • via bluetooth works
  • via USB not yet (as soon as I get more sponsoring or time I’ll look more into it since I’ve some ideas).

To use an external bluetooth GPS you have to follow six easy steps:

  1. Turn of internal gps
  2. enable allow mock locations in settings>developer options
  3. install Bluetooth GPS app (there are others as well but I had some problems, this was the best for me)
  4. Pair the tablet and the gps receiver
  5. start Bluetooth GPS select enable mock locations provider and hit connect (here you can see if the connection works by checking the coords you see or even by looking on a google map)
  6. start QGIS, enable the GPS panel (view> panels > gps) and hit connect. that’s it

The only caveat is that you can’t check satellites and signal strength directly from within QGIS since the GPS data is relayed over the mock locations provider.

but for the rest it works as expected, now it would be cool if somehow it would be possible to connect a magic usb-to-bluetooth converter to our beloved usb only gps units…

ciao

 


QGIS on Android Phone

At FOSSGIS I was asked to try to install qgis on a very small android phone, I think it was a 3.2″ screen. the install went smoothly after making some space but then the problems came because of the small screen.
Eventually I thought about setting a smaller font size to make the UI scale more, the problem was that it was impossible to get to the size setting because the UI was to big.
As a workaround I created a QGIS.conf file with this content
[General]
IconSize=32
fontPointSize=4
and pushed it to the device using the android debug bridge like this:
adb push myQGISConfigFile.conf /data/data/org.qgis.qgis/files/Settings/QuantumGIS/QGIS.conf
On the next start the whole gui was nice and small and fitted the screen.

Here some screenshots from my Samsung galaxy 9000 with 4″ screen and a video demonstrating digitising (with pen and fingers), GPS, compass and zooming on the phone.

This video shows QGIS on a Samsung I9000 Galaxy S Android smartphone with 4.0″ screen. the point size in settings->option->general is set to 4

QGIS Multiview and globe screenshots

This screenshots have been created using the QGIS with the following plugins:

  • Multitemporal and multivariate data visualisation (http://hub.qgis.org/projects/multiview)
  • Scttergram identify (http://hub.qgis.org/projects/scattergramdentify
  • Globe Plugin
Screenshot-13 Screenshot-14 Screenshot-15 Screenshot-16 Screenshot-17 Screenshot-18 Screenshot-19 Screenshot-20 Screenshot-22 Screenshot-23 Screenshot-24 Screenshot-25 Screenshot-26 Screenshot-27 Screenshot-28 Screenshot-29 Screenshot-30 Screenshot-31 Screenshot-32 Screenshot-33 Screenshot-34 Screenshot-35 Screenshot-36 Screenshot-37 Screenshot-38


QGIS for android alpha 7

7, my luck number… So here you are, the latest and greatest QGIS for Android.
This release includes the super new pinch zoom tool, should have no blocking dialogs anymore (i fixed the attribute table) and the help->about shows now from which commit the package has been created.
The packages containing armeabi and armeabi-v7a code are still less stable that the armeabi only packages (the ones with the -armeabi suffix) which are still the preferred. For the moment the release packages are built with Debug symbols as well.

I hope you will enjoy this release, and remember that if you or anybody you know can help sponsor the development I would greatly appreciate it.
Btw, noticed the nice new yellow PayPal donate button ;) ?

Ciao Marco

QGIS for android gets Pinch zooming

Well, it is a super winter and there is a lot of snow here in Switzerland and all this makes me super happy which means that my productivity increases… here you are, the last and greatest improvement for QGIS on android: a fancy zooming map tool like you know from other applications like google maps.
The tool allows for:

  • panning
  • pinch zooming
  • double tap zoom in with Center
  • twofinger tap zoom out

Furthermore I added a close button to the attribute table so that there are no blocking dialog left. The attribute table doesn’t look perfect yet, but works well (a workaround to make it look better is to force it into a dock-widget by checking “Open attribute table in dock window” under Settings->Options->General
I’ll release soon a new version and look forward to your comments and support.

and here a video:

QGIS supports now an all new touch maptool that allows panning, pinch zooming, double tap zoomWithCenter and twofinger tap zoomOut

ciao Marco


QGIS on android ALPHA 5

Hi all couple of days ago I pushed a new alpha version of qgis for android on android.qgis.org

This release includes all the goodies that I got to implement lately including: – right click support through longClick – shape file support – gps – compass – android 4 support – partial hardware optimization for armV7a (most newish devices have it) – no debug symbols

I m very happy with this release because it adresses and fixes all high priority bugs. Adding support for a armv7a optimized whit no debug symbols build increased greatly the speed of the app. The package you need to install is the same and includes both armv5 and armv7a code. Android will take care of using the correct version. Gdal and geos are not available yet in v7a code so the v5 versions will be loaded. I couldn’t test much the v7 code so I hope you can help me testing it. As well, on www.opengis.ch I published many videos and screenshots of qgis. As usual, please remember if you can (or if you know anybody that could) that sponsoring would help a lot implementing some more great features.

Ciao


QGIS on Android videos

So, finally preparing for the next conferences, I made some videos demonstrating the current super status of QGIS on android. here you go: In this video I use all currently available features of QGIS on android. Part of the video


QGIS gets Compass support

After implementing GPS support for QGIS on Android I’ve implemented a plugin that reads the internal compass readings and shows the value in a small dock widget.
All theese new features are available in the master-alpha4 version and the nightly.
Hope you enjoy


QGIS on Android gets GPS support

Lately I’ve been working on adding native GPS support to QGIS on Android, here is a short video showing how it works. A big thanks goes to the municipality of Schoten in Belgium which sponsored the developement. This functionality is included in the latest nightly builds as of yesterday.

GPS tracking on QGIS for android from Marco Bernasocchi on Vimeo.


Creating non-versioned shared libraries for android

While porting QGIS to android using necessitas I encountered the problem of versioned libs. Android does not support versioned libs and it is not going to. In the first vesions I used rpl -R -e libqgis_core.so.1.9.90 "libqgis_core.so\x00\x00\x00\x00\x00\x00\x00" $APK_LIBS_DIRand similar hacks to remove the version from the libs. But it was rather hacky. Then I found this post by Tom Russo where he mentioned how he changed his build process to force non versioned libs. I wrote him with some questions and finally, thanks to his hints, I managed to create a fairly general patch for libtool to make it generate android compatible configure scripts. I sent the patch to libtool and we’ll see what they think.diff --git a/m4/libtool.m4 b/m4/libtool.m4
index a9e20cf..a5cc8eb 100644
--- a/m4/libtool.m4
+++ b/m4/libtool.m4
@@ -2642,8 +2642,17 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu)
version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ case $host_os in
+ # This must be Linux Android ELF which has no support for versioned libs.
+ linux-android*)
+ library_names_spec='$libname${shared_ext}'
+ soname_spec='${libname}${shared_ext}'
+ ;;
+ *)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+ esac
finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=no

Now, the problem is that this patch fixes libtool.m4 which is the file that is used when a project manager creates a configure script. So it will take time until libtool includes the patch, your project manager updates the configure script and so on. But, no problem, mean while you can just look for something similar in your configure file (I was very lucky using “this must be linux ELF” as search criteria) and replace it accordingly and reconfigure passing –host=arm-linux-androideabi (as you probably already do if you are reading this). I managed to crosscompile expat, gdal, geos, gsl, proj, libiconv and libcharset without version.
QGIS uses libpq (postgres client) to connect to some services, but there is no hint in the configure script about soname_spec and library_names_spec, so I searched for SO_VERSION and found it set in Makefile.shlib and adapted it accordingly. Bottom line is that you need to search creatively for anything related to soname, SO_VERSION and similar.

QGIS uses as well QWT, which is QMAKE based, in this case to generate non versioned libs it’s enough to add CONFIG += plugin to the .pro or .pri file.

Finally, in CMAKE you need IF (NOT ANDROID)
SET_TARGET_PROPERTIES(qgis_core PROPERTIES
VERSION ${COMPLETE_VERSION}
SOVERSION ${COMPLETE_VERSION}
)
ENDIF (NOT ANDROID)
in your CMakeList.txt and call cmake with -DANDROID

Hope this helps and that more and more people port cool libs to android.
Ciao Marco


GSoC 2011 final report

So, it is over, after 3 months working on QGIS for android as a Google Summer of code project it is now time to wrap up what I did and didn’t do.

First of all a QGIS android app exists now and it has many features including:
- reading/writing projects
- raster support
- spatialite support
- wms support
- (apparent – untested) wfs and postgress support
- partial shape files support (string attributes still chrash the app)
- Fully functional gui (SymbologyV2 doesnt work yet)
- (all?) core C++ plugins beside globe (any takers? ;)

Further more I created a series of build scripts that make it easier to set up a dev environement.

Unfortunately I didnt manage to implement live GPS tracking and a larger gui optimisation, but all in all I’m very happy with the results and seeing that few peoples are already testing it. Soon ill publish a video.

cheers
Marco


QGIS Android works!

image

Just a quick screenshot to show that qgis on android is now a working reality. Tomorrow I’ll make a video and so on. The major missing thing now is reading shp files ad maybe spatialite… maybe tomorrow. Now it’s sunday ;)
Ciao

test it now:


QGIS Android the first test map

image

image

Today I loaded the first data into qgis and although the mapcanvas stays black, in the map composer the data is shown. Here some screenshots.


QGIS data providers and map canvas

After finishing with the gui(see previous post) i started testing the data providers.reading and writing shp files always ends in an app crash. Loading rasters, wms and gpx seems to work but the mapcanvas is never drawn. I have to investigate why. But probably it has to do with the draw used in qgis. The properties are there and get updated, but the canvasstays black. The same happens with decorations plugins like north arrow and copyright.
Next things i want to check is the shape error and the canvas problem. Then probably sqlite and gps.
Ciao Marco

QGIS on android has complete gui and supports translations

Hi I just managed to create an apk with al the resources needed by qgis. On the first runrun the application extracts this file to the proper location a thus the gui is now complete. This means as well that translations and crs databases now work properly. The gui works nice beside some small glitches. It is usefull to go under settings->general->icon size and set it to 32. The only inconvenient at the moment is that at the first startup the app shows a blackscreen while its copying the files for about 30 to 60sec so just be patient and remember that the whole app will takeup to 230mb (it installs on external storage by defaut). I tested th install on my transformer 3.2 and my galaxy 2.3.3and the install works flawless on both.

I wonder if this solves the “squares text problem” also. Tomorrow i ll do a video and will post it.


QGIS on Android has a proper GUI

Today I managed to get QGIS to load all the icons, providers and plugins. The GUI looks very good and quick, it is easy to use with the finger, beside the small arrows hiding multiple icons.
Furthermore I discovered that customization works so that we could pre configure qgis to show bigger icons (as in Settings->Options->Icon size 32) and a subset of tool bars, all in all is cool how good it runs.
To be noticed that the gui now works properly as well on my mobile phone (Galaxy s)!!!
Now I’m tackling all the files like i18n, resources, svg and so on.
Here a video showing the newest stand of qgis for android and on my github you can download it.

QGIS on Android has a proper GUI from Marco Bernasocchi on Vimeo.

ciao Marco


QGIS on Android

Hi all, it is a pleasure to announce that I finally got Quantum GIS to start on an android (3.2) tablet (Asus transformer). I tested as well on a Samsung Galaxy phone with cyanogen mod 7 RC1 and it works a well (with the obvious screen size limitations).
Qgis still doesnt load many elements, but the gui is there and the rest should be only minor issues. I’ll post more as soon as i make further developments. Meanwhile, if you want to test the apk, you can download it from my github here. For building your own, have a look at qgis wiki

QGIS on ANDROID from Marco Bernasocchi on Vimeo.

Hope you enjoy
ciao Marco


Globe is in QGIS Trunk

Last night Pirmin committed our Globe plugin to the QGIS trunk. this means that getting the needed dependencies (see below), building QGIS with -DWITH_GLOBE=ON and activating the plugin its all it takes to get a super globe running on QGIS.
Dependencies:
sudo apt-get install osgearth osgearth-dev openscenegraph (should be enough)
WARNING: it appears if you don’t install osgearth-dev, then the plugin will compile fine but will not be available for activation in the plugin list.

Installer: I updated the Installer Script although it is not really needed anymore since you just have to compile QGIS.

I’m not aware yet of the dependency packaging situation for OSs other than ubuntu.
Ciao Marco


QGis Globe runs on a GeoWall using ubuntu natty

4.resized 5.resized 7.resized 8.resized GeoWall GeoWall projectors
After a day of work in the GeoWall lab at the GIScience Center of the Zurich University, I got QGis Globe to work in QuadBuffer stereo mode with polarization glasses.
The hardware used is a Dell Precision 390 workstation with a NVIDIA Quadro® FX 3500 Graphic card and two projectors mounted on a special rack with polarizing lenses.
The software on the software side, the mutex-globe branch was installed on an Ubuntu natty, using the classic (no effects) desktop since stereo cannot be used with the X composite extension. The graphic driver is the 270.41.06 coming from the restricted driver in Ubuntu. The modification I had to do to the /etc/xorg.conf generated from nvidia-settings file where the addition of:
Section "Extensions"
Option "Composite" "off"
EndSection

and within the Section “Device”:
Option "Stereo" "4"
Here the file for reference:# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings: version 270.29 (buildd@roseapple) Fri Feb 25 14:43:24 UTC 2011
#
Section "ServerLayout"
Identifier "Layout0"
Screen 0 "Screen0" 0 0
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Mouse0" "CorePointer"
Option "Xinerama" "0"
EndSection
#
Section "Files"
EndSection
#
Section "InputDevice"
# generated from default
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/psaux"
Option "Emulate3Buttons" "no"
Option "ZAxisMapping" "4 5"
EndSection
#
Section "InputDevice"
# generated from default
Identifier "Keyboard0"
Driver "kbd"
EndSection
#
Section "Monitor"
# HorizSync source: edid, VertRefresh source: edid
Identifier "Monitor0"
VendorName "Unknown"
ModelName "Projectiondesign AS"
HorizSync 30.0 - 140.0
VertRefresh 48.0 - 110.0
Option "DPMS"
EndSection
#
Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "Quadro FX 3500"
Option "Stereo" "4"
EndSection
#
Section "Screen"
Identifier "Screen0"
Device "Device0"
Monitor "Monitor0"
DefaultDepth 24
Option "TwinView" "1"
Option "TwinViewXineramaInfoOrder" "DFP-0"
Option "metamodes" "DFP-0: nvidia-auto-select +0+0, DFP-1: nvidia-auto-select +0+0"
SubSection "Display"
Depth 24
EndSubSection
EndSection
#
Section "Extensions"
Option "Composite" "off"
EndSection


QGIS Globe runs in Trunk

Thanks to Marco Hugentobler’s idea of using Mutex, QGIS Globe now runs in Trunk, i just created a dev branch at https://github.com/mbernasocchi/Quantum-GIS/tree/mutex-globe and updated the installer script at http://www.bernawebdesign.ch/byteblog/2010/12/01/qgis-globe-plugin-installer-script/ (I haven’t tried it yet but it should work)

Cheers Marco


bottom

Powered by Django!