Quantcast
Channel: QGIS Planet
Viewing all 1090 articles
Browse latest View live

nyalldawson.net: Waiting for QGIS 2.2 – Composer Improvements (part 3)

$
0
0

Following on from parts 1 and 2, here’s some more composer changes which are coming in QGIS 2.2

  • Rotation support for all composer item types. Now anything you draw in a composer can be rotated, including scale bars, legends, attribute tables and html frames! Rotation of text labels has also been improved by making the border and background of labels respect the rotation of the label.
Every composer item can now be rotated...

Every composer item can now be rotated…

  • Resizing of rotated items has been improved. Now it’s possible to easily resize rotated items while keeping their correct shape. (There’s still one missing ingredient for complete support here – shear/perspective transforms. Unfortunately this will probably have to wait till 2.4).
Better resizing of rotated items

Better resizing of rotated items

  • Rulers can be shown or hidden in compositions
  • The ruler appearance has been tweaked, adding smaller divisions and better text placement
The ruler appearance has been tweaked

New tweaked appearance for rulers

  • A zoom to actual size button and short cut (Ctrl + 1) have been added
Zoom to 100%

New Zom to 100% button

  • Lastly, the status bar has a new zoom combo box, which shows the current zoom level and allows for quick zoom to several predefined levels. You can also enter an exact zoom level in the box for precise control.
New zoom levels combo box in the status bar

New zoom levels combo box in the status bar

As you can see, the print composer in QGIS 2.2 just keeps getting better! There’s a few other really exciting new additions which have landed recently too, but they deserve their own blog posts. Stay tuned…


Underdark: A QGIS 2.2 preview

$
0
0

With the major release of version 2.0, QGIS is once more returning to a fast release cycle. You can find the project road map on qgis.org. The QGIS 2.2 release is scheduled for Feb, 21st and we are already in feature freeze. This means that now is the time to get the nightly version, do some testing and report possible bugs before the new version is being shipped.

Like for version 2.0, the QGIS team has prepared a great visual change log listing many new features. For me, one of the feature highlights is the possibility to export maps with world files from Print Composer because it means that we can finally create high-resolution, georeferenced images comfortably from within the application.

Another feature which will help save a lot of time is the ability to invert color ramps. So far, we had to recreate the color ramp or use work-arounds involving expression-based color settings to achieve the same effect.

invertcolorramp

These are just my personal favorites. If you haven’t checked out the change log yet, I certainly encourage you to have a look and decide for yourself. Also, if you find the time, please help by testing and reporting any issues you encounter. This way, we can all help to make 2.2 another successful release.


nyalldawson.net: QGIS – Two neat features in 2.2

$
0
0

Here’s a quick run-down on two nice new styling options which I’ve recently added to QGIS 2.2.

Map styling for compositions

This little feature was suggested by Mathieu Pellerin, who is always pushing the boundaries of QGIS’ cartographic tools and coming up with great ideas for new styling features (you can check out some of his work via Flickr). Mathieu’s idea was for a new ‘$map‘ variable for the expression builder. This variable holds the id of the map item which is drawing the map, and allows for some nice tweaking of maps in the composer.

The $map variable is most useful when you have more than one map in your composition. The example below shows $map being used to change the styling of a single layer from the main map to the smaller inset map:

Using $map to style two maps with different colours

Using $map to style a single layer in two maps with different colours

In this example the composition has two maps, the larger has an id of “main_map” and the smaller has “inset_map“. The boundary layer has been styled using the rule based renderer, with one rule for $map=’main_map’ and one for $map=’inset_map’, as shown below:

Rule based rendering using the $map variable

Rule based rendering using the $map variable

The end result is that the layer will be rendered using the two different styles depending on which composer map item it is being drawn into. This trick can also be used to tweak labelling rules between the maps. In the example above I’ve restricted the labelling to only show in the main map. This is achieved by setting an expression for the data defined “Show label” property. I’ve used the expression “$map=’main_map’” so that labels are only shown in the main map and not the smaller inset map.

Tweaking label settings using the $map variable

Tweaking label settings using the $map variable

This small addition to QGIS 2.2 allows for some rather powerful improvements to multi-map compositions!

Drawing polygon borders only inside the polygon

The second new feature I wanted to highlight is a new option for polygon outlines which causes the outline to be drawn only on the inside of a polygon feature. The usual behaviour is for outlines to be drawn directly over the centre of the feature boundary, so that half of the outline is drawn inside the feature and half on the outside.

Simple Line Fill before

This means that the outline in a simple line symbol layer overlaps into the neighbouring polygons, and the result is that outlines from these features blend together:

Shaded borders pre QGIS 2.2

Shaded borders pre QGIS 2.2 – see how the colours bleed into the neighbouring features and overlap

This looks like a big muddy mess. A feature I’ve wanted for a long time is the ability to restrict these outlines so that they are only drawn inside the feature. This effect is commonly seen in world atlases and National Geographic maps, where each neighbouring country is shaded with it’s own unique outline colour. Now it’s possible to do this in QGIS just by ticking a single box!

The new

The new “Draw line only inside polygon” option

As you can see in the above image, the simple line outline style has a new checkbox, “Draw line only inside polygon“. Ticking this box will clip the outline so that only the portion of it which falls inside the feature is rendered. Here’s the result:

Shaded borders with

Shaded borders with “Draw line only inside polygon” checked

So much nicer then the earlier output – now none of the borders overlap into their neighbouring regions! Ok, so it is possible to achieve a similar result by creating a specially crafted layer consisting of negatively buffered polygons subtracted from the original polygons, but this takes a lot of fiddling around. It also has the major disadvantage in that the result is scale dependant, and zooming in or out of the map will alter the size of the polygon outlines. But using this wonderful new checkbox in QGIS, we get proper scale-independent borders, and zooming in or out of the map keeps a consistent border width!

Zooming in keeps a consistent border width...

Zooming in keeps a consistent border width…

So there we go – two small new features added in QGIS 2.2 which have huge potential for your cartographic outputs! As per usual, if you come up with some fancy way of utilising these, don’t forget to add your maps to the QGIS Showcase on Flickr.

Underdark: FOSS4G 2014 is taking off

Underdark: podcast.qgis.org

$
0
0

This weekend, I had the pleasure to join Tim Sutton for the second edition of the QGIS Podcast. Every episode, the podcast aims to summarize the latest mailing list discussions and greatest new features.
This episode’s topics include: new CAD tools, usability and the new UX mailing list, new QGIS user groups (QUGs), point cloud support plans, and QGIS design.

If you would like to ask a question or suggest a topic, you can write to podcast@qgis.org.


nyalldawson.net: Atlas previews in QGIS 2.2

$
0
0

QGIS 2.2 includes some great additions to the map composer’s “Atlas” feature. If you’re not familiar with atlas prints they are QGIS’ equivalent of ArcGIS’s “data driven pages”, or something like a map based version of Microsoft Word’s “mail merge”. In an atlas composition you can select one of your map layers to use as a “coverage layer“, and QGIS will automatically generate multiple pages from the composition with each page highlighting a different feature from this coverage layer.

Atlas Previews

Thanks to funding from SIGE, I’ve added some useful new features to QGIS’ atlas abilities for 2.2. The first of these is the ability to preview atlas compositions before printing them. In QGIS 2.0, atlas generation took a bit of guess work. You’d set up the parameters for the atlas, then export the whole atlas in one shot and just hope you’d got the settings right. If not, you’d have to tweak the settings and export the whole lot again to see the result. But not any more! Now, in QGIS 2.2, you can switch on a live atlas preview mode by clicking “Preview Atlas” in the new atlas preview toolbar:

The new atlas preview toolbar

The new atlas preview toolbar

The composer window will switch to showing you a preview of exactly how the atlas will look when exported. You can tweak the appearance of any layout item, adjust the atlas and map parameters, or experiment with the new options for atlas feature styling to see instantly what the final export will look like.

The composer window in atlas preview mode

The composer window in atlas preview mode (complete with gratuitous use of label rotation and rounded rectangles…) 

When this Atlas Preview mode is enabled, you navigate through all the features in the coverage layer by clicking any of the navigation buttons in the atlas preview toolbar:

Navigating the atlas preview

Navigating the atlas preview

While previewing you can export individual pages from the atlas. So, if just one or two pages in your atlas need to be individually tweaked you can do that as you step through the features. A neat thing with this is that you can make temporary tweaks to the extent and scale of the map items as you go, without affecting how the rest of the atlas maps look.

(Oh, by the way, I should mention that as an added bonus QGIS 2.2 lets you control more than one map with an atlas print!)

Selecting the current atlas feature

The second part of the work funded by SIGE was creation of shortcut actions for selecting the current atlas feature. If your atlas coverage layer has many records it may not be practical to step through the atlas previews one at a time until you find a specific feature. That’s where these new shortcut actions come in handy!

There’s a few ways of jumping directly to a specific atlas feature. The first is to open a browser window for your coverage layer, then right click a row and choose “Set as atlas feature for …“:

Setting the atlas feature from the browser window

Setting the atlas feature from the browser window

Selecting this menu item will cause the composer to immediately jump to the matching atlas row. Another way of selecting the current atlas feature is to use the “Set as atlas feature” map action. You activate this by first selecting your coverage layer in the layers panel, then clicking the “Run Feature Action” tool button and selecting “Set as atlas feature…“:

The set atlas feature map action

The set atlas feature map action

The mouse cursor will change to a cross-hair, and clicking any matching feature in the map window will cause the composer atlas preview to jump straight to that feature. Lastly, you can also activate the “Set as atlas feature” action directly from the identify results window.

That’s just a small taste of some of the new atlas creation features which will be available in QGIS 2.2, coming your way by the end of February 2014!

(One last note – as mentioned, this work was kindly sponsored by SIGE. If there’s a specific composer based feature or bug you’d like me to work on, I’m available for further sponsored work. Just contact me directly for details.)

Sourcepole: Sourcepole Kursprogramm Frühling 2014

$
0
0

Im Mai 2014 bietet Sourcepole wieder sein kompetentes Kursprogramm rund um alle GDI Komponenten an. Zu allen Kursen gehört umfangreiches Kursmaterial, Mittagessen und Kaffepausen. Bei Buchung eines Grundkurses und den darauf folgenden Aufbaukurs erhalten die Teilnehmer Rabatt auf den Kurspreis.

Geo-Datenbank:

  • PostgreSQL / PostGIS Einführung (5. - 6. Mai 2014)
  • PostgreSQL / PostGIS für Fortgeschrittene (7. Mai 2014)

Desktop GIS

  • QGIS 2.0 / Enterprise Desktop Grundkurs (12. - 13. Mai 2014)
  • QGIS 2.0 / Enterprise Desktop für Power User (14. Mai 2014)

Web GIS / OWS-Services

  • QGIS 2.0 / Enterprise Server und QGIS Web Client (22.Mai 2014)

QGIS Programmierung

  • QGIS 2.0 / Enterprise Plugin Entwicklung mit PyQt4 und PyQGIS (19. - 20. Mai 2014)

Informationen zu den Kursen und die Online Anmeldung finden Sie im Kursprogramm

Wir freuen uns darauf Sie in Zürich begrüssen zu können.

QGIS Dutch Community: Using MetaSearch plugin to search and load (meta)data from your National Georegister

$
0
0
We (mostly Tom Kralidis, Angelos Tzotsos with some additions by me) just released the MetaSearch Catalogue Client plugin for QGIS. The new plugin is an update of the CSWClient plugin from NextGIS. This new MetaSearch plugin makes searching metadata and using the services peanuts! A Catalog Service for the Web (CSW), for example provided by […]

Underdark: Just one more day until QGIS 2.2

$
0
0

QGIS 2.2 will be released tomorrow, February 21st. Following the release of 2.0, the QGIS project decided to move to a time-based release plan with releases every four months. This provides a clear framework for developers, translators and documenters which makes it possible to plan ahead and know when tasks have to be finished to be included in a release version.

Similar to the 2.0 release, the project has invested considerable resources to make 2.2 “Valmiera” a successful release. I have already blogged about some of the great new features. Thanks to the project donors and sponsors it was also possible to fund developer time for many important bug fixes.

One of the greatest resources of the QGIS project are its users. One group that deserves our special thanks is the Swiss QGIS User Group. They collect a modest annual membership fee which provides a steady and growing crowd-funding that can be used to positively influence the QGIS project. For example, they invested in bug fixing for 2.0 and they are co-funding work on multi-threaded rendering for QGIS 2.4.

With the rise of new QGIS user groups “QUGs” all around the world, e.g. in Australia, the UK, and the US, I hope these groups will find ways to bring users together and to positively influence the development of QGIS towards the next releases.


Sourcepole: NTv2 transformations with QGIS

$
0
0

Datum transformations with grid shift files are used in several countries to convert coordinates between different datums. In Switzerland, datum transformation using the NTv2 method is important because of the upcoming conversion between the LV03 system and the new LV95 system. Up to now, doing coordinate transformations with grid shift files was possible in QGIS, but unconvenient.

To use an NTv2 transformation in QGIS, the grid shift file needs to be placed in a directory where proj4 can find it (usually /usr/share/proj on Linux and OSGeo4W\share\proj on Windows). Alternatively, the environment variable PROJ_LIB can be set to point to the directory with the grid shift file(s). Then we have to enable the setting Options->CRS->’Ask for datum transformation when no default is defined’.

The next time we use a coordinate transformation which involves a datum transformation, a dialog shows up and presents the available options.

Now it is possible to select the NTv2 transformation file ‘chenyx06a.gsb’ to convert between LV03 and LV95. It is also possible to select the datum transformation as default to avoid being asked again. Default transformation settings can be changed / added / delted in the options tab (or set during installation by an administrator).

To use an NTv2 based transformation which is not yet in the projection database of QGIS, a new entry has to be added to the datum transformation table in srs.db. If you add a transformation which is widely used in your country, please send the changes back to the project so that those entries can be included by default.

The new datum transformation handling will be available in the upcoming QGIS 2.2 and QGIS Enterprise 13.05. The development has been funded by the Swiss cantons Basel-Landschaft and Solothurn. I also want to thank Fabio Di Pietro, Stefan Ziegler and Frank Warmerdam for answering all my questions about datums, coordinate transformations and proj4.

Sourcepole: Multithreaded rendering with QGIS

$
0
0

Nowadays, most computers have several processor cores. However, most computer programs are still designed to only use one processing unit. As a convenient and portable way of writing software using all the available processing power, Qt provides the excellent QtConcurrent framework.

In 2010, a Google Summer of Code project examined the suitabilty of using Qt concurrent for rendering the map image in QGIS using several processor cores. Following that approach, each layer renders its image in a separate thread. Once all layer threads are finished, the layer images are composited into one map image and the labels are drawn on top of it. Despite providing good results, that code was unfortunately never merged into the main development branch.

QGIS Enterprise 13.05 will provide the capability of multithreaded rendering. A screencast of the new functionality shows that not only the render time is shorter using multiple cores. More important is to have the possibility to cancel the render progress and the labeling any time, thus achieving a much more responsive user interface when navigating maps.

Sourcepole: AGIT 2013: QGIS Cloud - Karten einfach ins Netz

$
0
0

Noch nie war es so einfach individuelle Web Map Services mit ansprechenden Karten, Geodatenbank und Web Client zu erstellen, wie mit QGIS Cloud. Der am 5. Juli an der AGIT 2013 in Salzburg präsentierte Vortrag kann hier herunter geladen werden.

Präsentation

Underdark: QGIS 2.2 has landed in OSGeo4W

$
0
0

QGIS 2.2 is now available for Windows through OSGeo4W installer. Packages for other systems are being prepared by the package maintainers.

The Windows packages are currently marked experimental, so you have to use the advanced install in OSGeo4W and check the ‘Exp’ radio button on the top to install them.

osgeo4w_qgis22

As release manager Jürgen Fischer announced:

Please test and report problems, so that I can soon promote them to ‘curr’ent.
Once that has happend, I’ll proceed with turning them into standalone
installers.


Nathans QGIS and GIS blog: Keeping QGIS settings in sync on different machines

$
0
0

Here is a quick tip from a GIS.SE post that I answered the other day.

The topic was keeping the WMS settings in sync over different operating systems and machines. Normally QGIS will store it settings in the registry on Windows and in different locations on Linux and OS X. So then comes the question of how do you keep them in sync if you are using different machines.

Well the answer is simple. QGIS provides --optionspath and --configpath command line options in order to move the .qgis2 and settings files. Using these two options, or just the one depending on what you need, will allow you to store the QGIS settings in a different location. Rather then storing the settings in the registry, or .config and .plist files, it will create a .ini file and save everything there.

All in all this means you can redirect your QGIS settings to a folder on dropbox and tell your QGIS installs to load the settings from a single place keeping everything in sync. When you change a setting it will sync with Dropbox and onto your other machines.

The simple way on Windows to add the --optionspath and --configpath options is to copy the shortcut to QGIS and append it to the end of the Target.

--optionspath "F:\mydropbox\qgis" --configpath "F:\mydropbox\qgis"

QGIS IN THE CLOUD!!11! ok not really but still cool

QGIS Tips: Build and deploy c++ QGIS app on windows

$
0
0

After a lot of troubles, I managed to compile and deploy a QGIS c++ app on windows. This small guide will describe the steps I followed. This has been tested on win xp and windows 7, both in 32 bits.

Development environment

Your app must be built using MSVC 9.0 (2008) since QGIS in OSGeo’s package was built with it. Hence, MinGW cannot be used.

  1. Install Microsoft Visual Studio Express 2008.
  2. Install QGIS and Qt libs using OSGeo4W installer
  3. Install Qt Creator
  4. If you want a debugger,you should install CDB. This can be achieved by installing Windows SDK environment. In the installation process, only select Debugging toos for windows.

I wasn’t able to use the compiler yet, so I am not 100% sure about 4.

Now, if you want to build using Qt Creator, it must be started in a proper environment. Adapt this batch to launch Qt Creator:

ECHO Setting up QGIS DEV ENV

set PYTHONPATH=

set OSGEO4W_ROOT=C:\OSGeo4W
call "%OSGEO4W_ROOT%\bin\o4w_env.bat"

@set QMAKESPEC=win32-msvc2008
@set PATH=%OSGEO4W_ROOT%\bin;%OSGEO4W_ROOT%\apps\qgis-dev\bin;%PATH%

@set INCLUDE=%INCLUDE%;%OSGEO4W_ROOT%\include;%OSGEO4W_ROOT%\apps\qgis-dev\include
@set LIB=%LIB%;%OSGEO4W_ROOT%\lib;%OSGEO4W_ROOT%\apps\qgis-dev\lib

path %OSGEO4W_ROOT%\bin;%SYSTEMROOT%\System32;%SYSTEMROOT%;%SYSTEMROOT%\System32\wbem;C:\Progra~1\Git\bin;C:\Qt\qtcreator-3.0.1\bin;%PATH%

set VS90COMNTOOLS=C:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools\
call "C:\Program Files\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" x86

start "Qt Creator" /B C:\Qt\qtcreator-3.0.1\bin\qtcreator.exe %*

Then, you need to configure a proper kit in Qt Creator.

  1. Go to Options -> Build & Run -> Compilers and check that Microsoft Visual C++ Compiler 9.0 is correctly detected.
  2. Then in Qt Versions tab, add Qt from the OSGeO installation, normally c:\OSGeo4W\bin\qmake.exe
  3. In Debuggers tab, add cdb.exe found in c:\Debugging tools for windows\ 
  4. Finally, check in Kits that it is properly configured.

Building the application

This is what looks like an application project file.

QT += core gui xml
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = hfp
TEMPLATE = app
SOURCES += YOURSOURCES
HEADERS +=YOUR HEADERS
FORMS += YOUR FORMS
RESOURCES += images/images.qrc

win32:CONFIG(Release, Debug|Release) {
 LIBS += -L"C:/OSGeo4W/lib/" -lQtCore4
 LIBS += -L"C:/OSGeo4W/lib/" -lQtGui4
 LIBS += -L"C:/OSGeo4W/lib/" -lQtXml4
 LIBS += -L"C:/OSGeo4W/apps/qgis-dev/lib/" -lqgis_core
 LIBS += -L"C:/OSGeo4W/apps/qgis-dev/lib/" -lqgis_gui
}
else:win32:CONFIG(Debug, Debug|Release) {
 PRE_TARGETDEPS += C:/OSGeo4W/lib/QtCored4.lib
 PRE_TARGETDEPS += C:/OSGeo4W/lib/QtGuid4.lib
 PRE_TARGETDEPS += C:/OSGeo4W/lib/QtXmld4.lib
 LIBS += -L"C:/OSGeo4W/lib/" -lQtCored4
 LIBS += -L"C:/OSGeo4W/lib/" -lQtGuid4
 LIBS += -L"C:/OSGeo4W/lib/" -lQtXmld4
 LIBS += -L"C:/OSGeo4W/apps/qgis-dev/lib/" -lqgis_core
 LIBS += -L"C:/OSGeo4W/apps/qgis-dev/lib/" -lqgis_gui
}
win32:{
 INCLUDEPATH += C:/OSGeo4W/include
 DEPENDPATH += C:/OSGeo4W/include
 INCLUDEPATH += C:/OSGeo4W/apps/qgis-dev/include
 DEPENDPATH += C:/OSGeo4W/apps/qgis-dev/include
 DEFINES += GUI_EXPORT=__declspec(dllimport) CORE_EXPORT=__declspec(dllimport)
}
unix {
 LIBS += -L/usr/local/lib/ -lqgis_core -lqgis_gui
 LIBS += -L/usr/local/lib/qgis/plugins/ -lgdalprovider
 INCLUDEPATH += /usr/local/include/qgis
 DEFINES += GUI_EXPORT= CORE_EXPORT=
}

Remarks

  • GUI_EXPORT and CORE_EXPORT must be set to __declspec(dllimport). I don’t know exactly what it means, but I found out reading this thread, with some hazardous tries. If you don’t set these, you won’t be able to call any variable defined as extern in QGIS (e.g. cursors).
  • Qt release libraries shall not be mixed up with debug config in your project. In other words, use release libs for release mode and debug libs for debug mode.

With this, you should be able to compile your QGIS application in Qt Creator!

You can find some coding examples on github which are a bit old but still useful to start.

Now, to get the whole potential of QGIS libs, you must initialize the QgsApplication in your main window class:

#if defined(Q_WS_WIN)
  QString pluginPath = "c:\\OSGeo4W\\apps\\qgis-dev\\plugins";
  QString prefixPath = "c:\\OSGeo4W\\apps\\qgis-dev\\";
#else
  QString pluginPath = "/usr/local/lib/qgis/plugins/";
  QString prefixPath = "/usr/local";
#endif

  QgsApplication::setPluginPath( pluginPath );
  QgsApplication::setPrefixPath( prefixPath, true);
  QgsApplication::initQgis();

Deploying on windows

Since QGIS is not to be installed on the target computer, the built app will not be able to find the path declared in previous code.
There is probably a better approach, but here is a way to solve this:
Change the path to

  QString pluginPath = "c:\\myapp\\qgis\plugins";
  QString prefixPath = "c:\\myapp\\qgis";

This means you must deploy the app to this exact location: c:\myapp. In this directory, you need to create a qgis folder in which you will copy c:\OSGeo4W\apps\qgis-dev\resources and c:\OSGeo4W\apps\qgis-dev\plugins.

Besides, this you will need to copy some DLLs to be able to run the applications. You might want to use the dependency walker to find which are needed.

The batch file hereafter creates a folder on the building machine that will contain all the needed files in my case (it might be different in your case).

rmdir c:\myapp /Q /S
mkdir c:\myapp
mkdir c:\myapp\iconengines
mkdir c:\myapp\qgis
mkdir c:\myapp\qgis\resources
mkdir c:\myapp\qgis\plugins

copy PATHTOMYAPP\build-myapp-Desktop-Release\release\myapp.exe c:\myapp\
copy c:\OSGeo4W\bin\QtCore4.dll c:\myapp\
copy c:\OSGeo4W\bin\QtGui4.dll c:\myapp\
copy c:\OSGeo4W\bin\QtXml4.dll c:\myapp\
copy c:\OSGeo4W\bin\QtNetwork4.dll c:\myapp\
copy c:\OSGeo4W\bin\QtSvg4.dll c:\myapp\
copy c:\OSGeo4W\bin\QtWebKit4.dll c:\myapp\

copy c:\OSGeo4W\bin\zlib_osgeo.dll c:\myapp\
copy c:\OSGeo4W\bin\msvcr71.dll c:\myapp\
copy c:\OSGeo4W\bin\phonon4.dll c:\myapp\
copy c:\OSGeo4W\bin\proj.dll c:\myapp\
copy c:\OSGeo4W\bin\geos_c.dll c:\myapp\
copy c:\OSGeo4W\bin\gdal110.dll c:\myapp\
copy c:\OSGeo4W\bin\ogdi_32b1.dll c:\myapp\
copy c:\OSGeo4W\bin\libexpat.dll c:\myapp\
copy c:\OSGeo4W\bin\xerces-c_3_1.dll c:\myapp\
copy c:\OSGeo4W\bin\LIBPQ.dll c:\myapp\
copy c:\OSGeo4W\bin\SSLEAY32.dll c:\myapp\
copy c:\OSGeo4W\bin\LIBEAY32.dll c:\myapp\
copy c:\OSGeo4W\bin\krb5_32.dll c:\myapp\
copy c:\OSGeo4W\bin\comerr32.dll c:\myapp\
copy c:\OSGeo4W\bin\k5sprt32.dll c:\myapp\
copy c:\OSGeo4W\bin\gssapi32.dll c:\myapp\
copy c:\OSGeo4W\bin\hdf_fw.dll c:\myapp\
copy c:\OSGeo4W\bin\mfhdf_fw.dll c:\myapp\
copy c:\OSGeo4W\bin\jpeg_osgeo.dll c:\myapp\
copy c:\OSGeo4W\bin\jpeg12_osgeo.dll c:\myapp\
copy c:\OSGeo4W\bin\netcdf.dll c:\myapp\
copy c:\OSGeo4W\bin\geotiff.dll c:\myapp\
copy c:\OSGeo4W\bin\libtiff.dll c:\myapp\
copy c:\OSGeo4W\bin\sqlite3.dll c:\myapp\
copy c:\OSGeo4W\bin\spatialite4.dll c:\myapp\
copy c:\OSGeo4W\bin\freexl.dll c:\myapp\
copy c:\OSGeo4W\bin\iconv.dll c:\myapp\
copy c:\OSGeo4W\bin\libxml2.dll c:\myapp\
copy c:\OSGeo4W\bin\LIBMYSQL.dll c:\myapp\
copy c:\OSGeo4W\bin\hdf5.dll c:\myapp\
copy c:\OSGeo4W\bin\szip.dll c:\myapp\
copy c:\OSGeo4W\bin\libcurl.dll c:\myapp\
copy c:\OSGeo4W\bin\zlib1.dll c:\myapp\
copy c:\OSGeo4W\bin\openjp2.dll c:\myapp\
copy c:\OSGeo4W\bin\spatialindex1.dll c:\myapp\
copy c:\OSGeo4W\bin\qwt5.dll c:\myapp\

copy c:\OSGeo4W\apps\qt4\plugins\iconengines\qsvgicon4.dll c:\myapp\iconengines\

copy C:\Progra~1\Git\bin\libiconv-2.dll c:\myapp\
copy C:\Progra~1\Git\bin\libintl-8.dll c:\myapp\

copy c:\OSGeo4W\apps\qgis-dev\bin\qgis_Core.dll c:\myapp\
copy c:\OSGeo4W\apps\qgis-dev\bin\qgis_gui.dll c:\myapp\
copy c:\OSGeo4W\apps\qgis-dev\bin\msvcp90.dll c:\myapp\

copy c:\windows\system32\msvcp100.dll c:\myapp\
copy c:\windows\system32\msvcr100.dll c:\myapp\

copy C:\OSGeo4W\apps\qgis-dev\resources\* c:\myapp\qgis\resources
copy C:\OSGeo4W\apps\qgis-dev\plugins\* c:\myapp\qgis\plugins

To be able to run the app, on a fresh windows XP, I had to install:

And copy the whole folder c:\myapp from the building machine to the target machine.

It seems that from Vista, the 2005 redistributable package is included. So, no need to install it.

And voilà!



Nathans QGIS and GIS blog: IntraMaps Roam - A Python QGIS data collection app

$
0
0

For the last couple of months I, though Digital Mapping Solutions, have been working on a tablet friendly data collection application that has been built on Python and QGIS. For those of you who have seen my QMap project I started a year or so ago you can consider this a reincarnation of that project, and that project retired. Most of the code has been reworked and using the QGIS libs gave me full flexibility in layout and workflow.

IntraMaps Roam (or Roam for short) is a standalone, fully bundled, Python application that was created to do data collection with a QGIS backend. The primary use of Roam is in a disconnected setup were one might not have internet connection, however Roam is using QGIS so will support any data format QGIS does. You can can use Roam in a connected environment, if your internet premits, by having WFS and WMS layers, or direct database connections; it's up to you. Roam forms also allow for custom logic to be added to each form using Python so you can add your own workflow if needed.

Roam Map WindowRoam Data Capture

The binary package comes with a config manager application that can be used to create and manage Roam projects

Config ManagerConfig Manager

The release page contains links to the 2.0 installers. The wiki contains all the information to get started. You can also take a look at the FAQ for the common questions.

Roam has been a great exercise in using and bundling QGIS libs with a Python application, which I have never done before but turned out to be pretty easy. Being a fully bundled application means you don't need to install QGIS, or Python, on the client in order to run the application. Everything is in a nice bundled exe.

As Roam is based on PyQt and QGIS it is under the GPL2 license. Pull requests are welcome.

Currently Roam is only being packaged for Windows, because that was our first priority, however there isn't a lot of Windows only stuff in the code itself so creating a version for OS X and Linux shouldn't be too hard for someone with the know how.

Links

Happy mapping!?

Spatial Galaxy: The PyQGIS Programmer's Guide

$
0
0

The PyQGIS Programmer’s Guide is now available in both paperback and PDF. A sample chapter is also available for download.

The book is fully compatible with the QGIS 2.x series of releases.

Nathans QGIS and GIS blog: QGIS Layer Definitions (An ArcGIS like .lyr function for QGIS)

$
0
0

NOTE Just to clarify. This is not adding the ability to open ArcGIS .lyr files.

One of the reasons that I love working and being part of the QGIS project is how quickly you can take it from not having a needed feature to having said feature. A good example of this is a recent addition I added related to having a ArcGIS .lyr like feature. For those who don't use Arc, the .lyr file is a pretty much a file that points to the data, contains all the styling, and other information, you can then just add this file and it will do all the other magic for you.

A quote from the ArcGIS page on the topic

A layer can exist outside your map as a layer file (.lyr). This makes it easy for others to access the layers you've built. You can share layers over the network and by e-mail. When users add a layer file to their maps, it will draw exactly as it was saved as long as they can get access to the data referenced by the layer. A common way that users help support this is to use relative paths to each layer's data source.

A question came up on GIS.SE asking Does QGIS have the equivalent of ArcGIS's Layer (*.LYR) file?. To which the answer was. "Not really". Which of course was true. At the time.

That got me thinking. Why couldn't we have a feature like this? It would be handy to have as it would let you create layer shortcuts and the ability to a load layers quickly from a single place without worrying about were the data comes from. The XML that we need to recreate the layer on project load was already stored in the project file under the maplayer node. It already has everything we need we can just write that out to disk and create a new file type. After some digging into the API I found QgsMapLayer::writeLayerXML() and Bingo! .qlr was born.

Because I personally, and some others I talked to, didn't really like just "Save as Layer File.." as it sounds a bit vauge, we picked "QGIS Layer Definition file".

A QGIS Layer Deinition File is simply the XML maplayer node, with the id removed, saved to disk as a .qlr format.

Saving one is as simple as Right Click Layer -> Save As Layer Definition File..

qlrsave.png

and loading Layer -> Add from Layer Definition File...

qlrload.png

Simple!

The layer file will store any of the styles, labels, edit widgets, etc, that you have defined for that layer so it's just a matter of adding the file and you are good to go.

Like I said at the start it's simply the XML maplayer node, so if you move the data or want to change the datasource just open the file in a text editor and change it.

<!DOCTYPE qgis-layer-definition>
<maplayer minimumScale="-4.65661e-10" maximumScale="1e+08" simplifyDrawingHints="1" minLabelScale="0" maxLabelScale="1e+08" simplifyDrawingTol="1" geometry="Polygon" simplifyMaxScale="1" type="vector" hasScaleBasedVisibilityFlag="0" simplifyLocal="1" scaleBasedLabelVisibilityFlag="0">
  <datasource>F:/gis_data/cadastre.shp</datasource>
  <title></title>
  <abstract></abstract>
  <keywordList>
    <value></value>
  </keywordList>
  <layername>cadastre</layername>
  ... {style, etc}
</maplayer

This will work with any layer supported in QGIS, expect special plugin layers.

I will add loading from the browser dock before the release aswell once I get some time.

Can we get it in an older QGIS version?

All the methods that I used for this feature are exposed to the Python API. Once I get some free time I plan on making a plugin that is aimed at QGIS <2.3 to give those users the same feature. Keep an eye out for it in the plugin installer.

Markus Neteler: OSGeo-Live 7.9 Released

$
0
0

OSGeo today announced that the OSGeo-Live GIS software collection version 7.9 has been released, featuring more than fifty open source, standards compliant geospatial desktop applications, web applications and frameworks.

Release Highlights:
This release is a modernization update to last year’s 7.0 release including new versions of the software but preserving much of the core build and operating system. In addition we’ve added a number of small fixes and updated document translations.

OSGeo-Live Lightning Presentation:
The OSGeo-Live Lightning Presentation which explains the breadth of OSGeo software is now bundled with OSGeo-Live. It is often presented by conference organisors, or keynote speakers. The presentation may be given as is, or modified to align with time constraints, presenter’s interest, or conference focus. http://live.osgeo.org/livedvd/docs/en/presentation/

Applications:
Twenty two geospatial programs have been updated to newer versions. The core geospatial stack has also been upgraded from UbuntuGIS, and the base operating system has been updated to Xubuntu 12.04.4 LTS, including all the latest security and bug fixes, and web browser updates.

About OSGeo-Live:
OSGeo-Live is a self-contained bootable DVD, USB flash drive and Virtual Machine based upon Ubuntu Linux. OSGeo-Live is pre-configured with a wide variety of robust open source geospatial software. All applications can be trialled without installing anything on your computer, simply by booting the computer from a DVD or USB drive, or running in a Virtual Machine environment. Each featured package is accompanied by both a publication quality one page descriptive summary and a short tutorial on how to get started using it. http://live.osgeo.org

OSGeo-Live includes:

  • Over sixty quality geospatial Open Source applications installed and pre-configured
  • Free world maps and geodata
  • One page overview and quick start guide for every application
  • Overviews of key OGC standards
  • Translations to multiple languages

Credits
Over 180 people have directly helped with OSGeo-Live packaging, documenting and translating, and thousands have been involved in building the packaged software. Developers, packagers, documenters and translators include:
Activity Workshop, Agustín Dí­ez, Aikaterini Kapsampeli, Alan Beccati, Alan Boudreault, Alessandro Furieri, Alexander Bruy, Alexander Kleshnin, Alexander Muriy, Alexandre Dube, Alexey Ardyakov, Alex Mandel, Amy Gao, Andrea Antonello, Andrea Yanza, Andrey Syrokomskiy, Andry Rustanto, Angelos Tzotsos, Anna Muñoz, Antonio Falciano, Anton Novichikhin, Anton Patrushev, Argyros Argyridis, Ariel Núñez, Assumpció Termens, Astrid Emde, Barry Rowlingson, Benjamin Pross, Brian Hamlin, Bruno Binet, Bu Kun, Cameron Shorter, Christophe Tufféry, Christos Iossifidis, Cristhian Pin, Damian Wojsław, Dane Springmeyer, Daniel Kastl, Daria Svidzinska, David Mateos, Denis Rykov, Diego González, Diego Migliavacca, Dimitar Misev, Dmitry Baryshnikov, Dominik Helle, Edgar Soldin, Eike Hinderk Jürrens, Elena Mezzini, Eric Lemoine, Erika Pillu, Estela Llorente, Etienne Delay, Etienne Dube, Evgeny Nikulin, Fran Boon, François Prunayre, Frank Gasdorf, Frank Warmerdam, Friedjoff Trautwein, Gavin Treadgold, Giuseppe Calamita, Grald Fenoy, Grigory Rozhentsov, Guy Griffiths, Hamish Bowman, Haruyuki Seki, Henry Addo, Hernan Olivera, Howard Butler, Hyeyeong Choe, Ian Edwards, Ian Turton, Ilya Filippov, Jackie Ng, Jan Drewnak, Jane Lewis, Javier Rodrigo, Javier Sánchez, Jesús Gómez, Jim Klassen, Jing Wang, Jinsongdi Yu, Jody Garnett, Johan Van de Wauw, John Bryant, Jorge Arévalo, Jorge Sanz, José Antonio Canalejo, José Vicente Higón, Judit Mays, Klokan Petr Pridal, Kristof Lange, kuzkok, Lance McKee, Lars Lingner, Luca Delucchi, Lucía Sanjaime, Mage Whopper, Manuel Grizonnet, Marc-André Barbeau, Marco Curreli, Marco Puppin, Marc Torres, Margherita Di Leo, Maria Vakalopoulou, Mario Andino, Mark Leslie, Massimo Di Stefano, Matthias Streulens, Mauricio Miranda, Mauricio Pazos, Maxim Dubinin, Michaël Michaud, Michael Owonibi, Micha Silver, Mike Adair, Milena Nowotarska, M Iqnaul Haq Siregar, Nacho Varela, Nadiia Gorash, Nathaniel V. Kelso, Ned Horning, Nobusuke Iwasaki, Oliver Tonnhofer, Òscar Fonts, Otto Dassau, Pasquale Di Donato, Patric Hafner, Paul Meems, Pavel, Pedro-Juan Ferrer, Pirmin Kalberer, Raf Roset, Regina Obe, Ricardo Pinho, Roald de Wit, Roberta Fagandini, Roberto Antolin, Roberto Antolí­n, Roger Veciana, Ruth Schoenbuchner, Samuel Mesa, Scott Penrose, Sergey Grachev, Sergio Baños, Simon Cropper, Simon Pigot, Stefan A. Tzeggai, Stefan Hansen, Stefan Steiniger, Stephan Meissl, Steve Lime, Takayuki Nuimura, Thierry Badard, Thomas Baschetti, Thomas Gratier, Tom Kralidis, Toshikazu Seto, Trevor Wekel, Valenty González, Vera, Xianfeng Song, Yoichi Kayama, Zhengfan Lin

Sponsoring organisations

  • The Open Source Geospatial Foundation OSGeo provides the primary development and hosting infrastructure and personnel for the OSGeo-Live project, and infrastructure for many of the software projects themselves. http://osgeo.org
  • LISAsoft provides sustaining resources and staff toward the management and packaging of software onto the Live DVD. http://www.lisasoft.com
  • Information Center for the Environment (ICE) at the University of California, Davis provides hardware resources and development support to the OSGeo Live project. http://ice.ucdavis.edu
  • Remote Sensing Laboratory at the National Technical University of Athens, provides hardware resources and development support to the OSGeo-Live project. http://www.ntua.gr
  • The DebianGIS and UbuntuGIS teams provide and quality-assure many of the core packages. http://wiki.debian.org/DebianGis and https://wiki.ubuntu.com/UbuntuGIS

Underdark: 3D viz with QGIS & three.js

$
0
0

If you are looking for a tool to easily create 3D visualizations of your geodata, look no further! Qgis2threejs is a plugin by Minoru Akagi which exports terrain data combined with the map canvas image and optional vector data to an html file which can be viewed in 3D in any web browser which supports WebGL. To do that, this plugin uses the Three.js library.

This is the result of my first experiments with Qgis2threejs. In the following sections, I will show the steps to reproduce it.

Türkenschanzpark, Vienna

click for the interactive version (requires WebGL-capable browser)

1. The data

The building blocks of this visualization are:

  • elevation data and the hillshade derived from this data
  • a base map (WMTS from basemap.at in my case)
  • OSM building data provided by Geofabrik and
  • tree data from the city of Vienna

Load all datasets into QGIS.

2. Preparing the map

Qgis2threejs will overlay the map (as rendered in the QGIS map area) on top of the elevation model. You can combine any number of layers to create your map. I just loaded a basemap.at WMTS and a hillshade layer. To add a nice tree shadow effect, I also added the tree layer (dark grey, 50% transparency, multiply blending).

tuerkenschanzpark_map

3. Preparing the vector features

The vector features in the visualization are buildings and trees. The buildings are based on an OSM building layer. The trees are create from two point layers: one point layer to create the tree trunks (cylinder shape) and a duplicate of this point layer to create the tree crowns (sphere shape).

Load the data and choose the desired fill colors.

4. Using Qgis2threejs

Now we can start Qgis2threejs. The first tab is used to configure the terrain. Just pick the correct elevation data layer. I didn’t modify any of the other default settings.

qgis2threejs_dem

The second tab provides the settings for the vector data. As mentioned in the previous section, the trees are created from two point layers and the buildings are based on a polygon layer. The tree crowns are spheres with a radius size 3 and a z value of 5 above the surface. The tree trunks are cylinders. Finally, the buildings have a height of 10.

qgis2threejs_vector

That’s it! Just press “run” and wait. When the export is finished, your default browser (or a different one, if you specify another one in the plugin settings) will open automatically and display the results.
The visualization is interactive. You can tilt the visualization using the left mouse button, pan using the right mouse button, and zoom using the mouse wheel. I found that Firefox used around 1.6 GB of RAM to render this example.

5. Share your visualization

In the browser window, you will see where Qgis2threejs stored the html and associated Javascript files. To share your visualization, you just need to copy these files onto a webserver.

I would love to see what you come up with. Please share a link in the comments.


Viewing all 1090 articles
Browse latest View live