Development and Integration of an Offline and Open Source
Alternative Mapping Solution
Antoine Abélard
Spécinov, Angers, France
Keywords: DotSpatial, Open Source GIS, C#, .NET, OpenStreetMap.
Abstract: Nowadays, more and more business applications integrate Geographical Information System (GIS) to use
and display data at the right place and the right time. However, this integration could face two problems.
The first one is the integration cost of a commercial GIS and the second is cartographic data access. Indeed,
the web map services used to provide cartographic background are charged depending on queries, so the
cost of these services can increase quickly and the bill is not mastered. The second problem has occurred
with the end of Microsoft MapPoint, so, this brings up the problem to find an offline mapping solution that
can be integrated with business applications. There is a need to fill this gap and answer to these two main
problems. This paper presents an offline and open source alternative which allow integration with business
applications, a real business case of a truck tour management application has initiated this work.
1 INTRODUCTION
GIS and mapping technologies have grown in
popularity in recent years, especially since the
success of Google Maps, Bing Maps and Here
Maps, all available on the web. However, these GIS
platforms do not meet the requirements of some
business applications such as the cost and the offline
mapping.
The main issue of this study is about a business
application of truck tour management called Biotour,
it is a desktop application used by SARIA Industries
(SARIA Group, 2015) and developed by Spécinov
(Spécinov, 2015). SARIA Industries is specialized in
collecting organic waste and biomass conversion.
The group operates over 127 sites, in 12 European
countries. SARIA Industries has four areas of
expertise: Rendering, Food industry, Oleochemicals
and Energy.
Spécinov is an IT services company localized
next to Angers in France. Working in partnership
with a university research laboratory, Spécinov
developed 11 years ago this tour management
application named Biotour, used by SARIA
Industries for his rendering activity in 20 sites in
France. This activity involves the collection,
transport and treatment of animal waste. The
software is designed to calculate the best collection
routes to optimize the human and material resources.
This application was developed in VB and C# on
.NET platform and used Microsoft MapPoint
(Microsoft, 1999) for his cartographic rendering. But
since MapPoint announce the end of his support, the
sustainability of Biotour is threatened. Moreover,
MapPoint was not built to manage multiple data
layers and as important volumes of business data. So
there were stability issues which stop the application
or slowing it. In fact, MapPoint was the right choice
11 years ago due to the offline solution which is a
key point for this application.
So, today, the goal is to build a replacement
solution which is offline and with a limited cost. The
chosen solution will have to implement the same
functionality as MapPoint, to display data with the
same rendering and to be more stable.
To build the alternative solution we have to find
the two main features of a mapping solution: a GIS
platform and a data provider. In the MapPoint
solution, both are integrated.
The present work is divided into 8 sections. We
present the data provider OpenStreetMap in section
2. Section 3 introduces the GIS platform DotSpatial.
The application architecture is given in section 4.
Section 5 details the management of data layers in
the solution both concerning the cartographic layers
and the business layers. In section 6 we describe the
management of interactions. Afterwards, section 7
Abélard, A.
Development and Integration of an Offline and Open Source Alternative Mapping Solution.
In Proceedings of the 2nd International Conference on Geographical Information Systems Theory, Applications and Management (GISTAM 2016), pages 139-144
ISBN: 978-989-758-188-5
Copyright
c
2016 by SCITEPRESS – Science and Technology Publications, Lda. All rights reserved
139
shows the work done on integration and
optimization. We conclude with the results and the
feedback of this new solution in section 8.
2 OpenStreetMap: THE DATA
PROVIDER
OpenStreetMap (OpenStreetMap, 2004) is a
crowdsourcing project to create a free map of the
world. This project was launched 11 years ago and
provide now a high-quality world map coverage
(Girres, 2010) (Haklay, 2010). OpenStreetMap data
are under Open Database License (ODbL). This
license agreement intended to allow users to freely
share, modify, and use this dataset while maintaining
this same freedom for others, provided that the
original source and author(s) are credited.
The main advantage of OpenStreetMap data is
that they are free and can be downloaded for an
offline use. Indeed, there are no many data providers
that allow to download data for an offline use. In our
study case we need France cartographic data, there
are only two data providers for an offline use,
OpenStreetMap and IGN (French National
Geographical Institute). However, the reference
pricing of IGN for the France data is €160,000, so
the cost constraint is important. Therefore,
OpenStreetMap was chosen as the data provider of
the application.
For our use with the GIS platform which has
been chosen, OpenStreetMap data will not be used
in their default format but in the shapefile format. It
is possible to convert OpenStreetMap data default
format, osm, in a format compatible with GIS
platform with some tools. But, for simplicity
reasons, we get OpenStreetMap data directly in
shapefile format from Geofabrik (Geofabrik, 2007)
server. Indeed, Geofabrik does a daily extraction and
split data by region, which allow us to manage
basemap by region. Moreover, shapefiles provided
by Geofabrik are also split by data type (roads,
railways, places, …). So it allows to manage
independently each data layer depending on data
type.
3 DotSpatial: THE GIS
PLATFORM
DotSpatial is an open source GIS library written for
.NET 4 which has been developed by members from
the Geospatial Software Lab at Idaho State
University, Idaho Falls, Idaho, USA (Idaho State
University, 2015), as well as an international open
source community (Ames, 2007). It allows
developers to add spatial data, analysis and mapping
functionality into their applications, it provides a
map control for .NET and several GIS capabilities.
The DotSpatial architecture follows two
paradigms. The first is a separation of the user
interface and business logic. The second is to use a
larger number of modules to increase code
reusability, and allow access to certain parts of the
library without requiring a whole. So, DotSpatial is
divided into 17 DLL and just some of them are used
to build a GIS platform needed by the business
application (Cao, 2012). The reasons for choosing
this library has been its ability to manage large
volumes of data, its flexibility and mainly the size of
the community mobilized around this project. This
open source alternative for GIS allows the
development of specific software (Sameen, 2014);
(Wang, 2014).
4 APPLICATION
ARCHITECTURE
Figure 1 illustrates the Biotour application
architecture.
Symbology
editor
BioTour
.dspx
C#
Interface
library
DotSpatial
library
shapefiles
SQLServer
Figure 1: Application architecture.
The Biotour application being developed in
Visual Basic .NET, the choice is made to develop a
C# interface library that will access the DotSpatial
library. It creates an abstraction layer between the
business application and the library that allows to
manage all function calls in the interface library and
to work at a higher level. For example, when loading
the cartographic background, DotSpatial called a
function from the interface library which then uses
the DotSpatial library to perform this action.
As can be seen from the architecture presented
above, the DotSpatial library uses several elements.
First, to display the cartographic background, a
.dspx file (XML) is used. This file contains the
GISTAM 2016 - 2nd International Conference on Geographical Information Systems Theory, Applications and Management
140
description of layers to import and the symbology to
apply to them. This file is editable through a
symbology editor included with the library.
The cartographic data from OpenStreetMap are
stored in shapefiles, they each contain a data layer
(roads, natural features, places...) for a defined area.
Once the data from shapefiles were loaded, the
symbology defined in the dspx file is applied and the
basemap is displayed in the map control. Then,
business data like the Biotour network and the
customer location points are displayed on additional
data layers created from the data stored in the SQL
Server database.
5 MANAGEMENT OF DATA
LAYERS
DotSpatial allows, like any GIS solution, to manage
the data in a system of map layers. Among the layers
used in the map controls, some are part of the
basemap and are static layers. Other layers are
business layers on which the user will be able to act
(selection, drawing, additional data display, etc.).
The map data layers are loaded from shapefiles
while business data layers are loaded from the
existing SQL Server database of Biotour.
Businesslayers
SQLServer
Cartographiclayers
shapefiles
Figure 2: Layer types and their origin.
Next, when we look at the representation of data
on a map, the notion of map projection comes in. In
all online mapping services, such as Google Maps or
Bing Maps, the projection used is the Web Mercator
projection, this projection is also used by MapPoint.
Because of the constraint to remain as close as
possible of MapPoint rendering, this projection is
used in the new solution. However, coordinates of
basemap data are not projected in Web Mercator but
are in WGS84 format (a standard for use in
cartography, geodesy, and navigation including by
GPS), so a projection of this data is required. These
projections are made when the dspx file containing
the legend is loaded. About coordinates of business
data present in the database, they are also in WGS84
format. So, conversion functions for switching from
one projection to another have been implemented to
project coordinates from WGS84 to Web Mercator
and vice versa.
5.1 Cartographic Layers
Data of these layers are collected under the shapefile
format. In this format, each entity has metadata that
includes information on it. For example, for a
segment of roads data file, there is the type, the
direction of movement, etc. To display raw data in
an understandable representation, a symbology must
be applied to each data layer based on metadata.
Symbology operates on the association of a
representation and a filter expression. The filtering
works with simple logical expressions that are
applied to the metadata. When a symbology is
applied to a data layer, if the metadata associated
with an entity corresponds to the case of a filter
expression then the corresponding style will be
applied to that entity. Here are some examples of
filter expressions:
• [TYPE] <> 'primary' AND [TYPE] <>
'secondary'
• [NAME] = 'Rue Victor Hugo' AND
[ONEWAY] = '0'
Data displayed on the map depends on the zoom
level. However, in the DotSpatial library, the
function to manage the appearance of a data layer
depending on zoom level is implemented but does
not manage the appearance depending on metadata.
Thus, the appearance of data is set for the entire
layer and it is therefore not possible to display only a
part. So, this behavior had to be implemented by
modifying the symbology when the user changes the
zoom level.
A basemap which look likes all others basemap
provided by web map services has been
implemented. The symbology is applied both from
the .dspx configuration file for the majority of layers
and from the interface library which allows to
implement a symbology depending on zoom level.
5.2 Business Layers
Data of these layers are loaded from the existing
database of the application. No changes of the data
structure are required to build a map layer from an
existing table. A map object is built from a business
object by assigning his coordinates to the map object
and all others properties to the metadata of the map
object. Then all built map objects are assigned to a
layer that can be displayed with the appropriate
symbology. Inversely, to get a business object from
a selected map object, coordinates and all metadata
of the selected object are used to build a business
object that can be used in a business process.
Development and Integration of an Offline and Open Source Alternative Mapping Solution
141
In the same way as for data of cartographic
layers, metadata attached is used to manage the
symbology assigned to each entity. For example, the
items loaded in the pick-up points data layer will
contain in metadata the period from which the pick-
up point is waiting for, to have a differentiated
display of points according to this criterion. Unlike
basemap, data of business layers are modifiable and
will take into account the interactions, so it is
possible to draw or select elements in these layers.
Data from the basemap layer are loaded and are
not altered. By cons, data of business layers can be
loaded, modified or deleted. So, add, modify and
delete functions have to be implemented for each
business layer.
6 MANAGEMENT OF
INTERACTIONS
The next step to build a mapping solution is the
management of interactions. Indeed, beyond display
data, a mapping solution has to manage user
interactions with these data.
The first one is the selection. When an item is
selected on the map control, an event is raised and it
must be processed to get the selected item on the
selected data layer.
Then, MapPoint can display a tooltip that
contains information about the clicked point, but the
selected framework does not implement it. So, this
feature has been implemented in the interface library
using the default tooltip of .NET platform.
Another interaction is the position and distance
calculations. The position calculation provides a
geographical position from the cursor position on the
map. For example, it is used in the network design
for positioning a point of a new segment. The
distance calculation provides the distance between
two coordinates, it is particularly used in the
network design to assign a length to a drawn
segment.
The print feature is used in the roadmap printing
feature. This roadmap is printed for each driver, it is
a representation of the tour and pick-up points on the
basemap. This feature has been implemented with
the new solution, a map control is loaded and a
snapshot of the tour loaded on the basemap is
generated and integrated into the roadmap.
The last one is a location search function. The
implemented feature allows a repositioning of the
map at the position of the desired location. To do
this, the user must enter the name of the desired
location, a function search if some of maps objects
have a name which corresponding in their metadata
and return the results. Then, if results are found they
are displayed and the map can be repositioned on a
found location.
7 INTEGRATION AND
OPTIMIZATION
Finally, once the alternative mapping solution was
built, the final step is its integration in the business
application.
Following the integration of the mapping
solution in Biotour, it appeared that the map is
refreshed at every addition or modification of data in
a layer. This behavior leads to waiting time due to a
large number of refreshment called when adding or
editing multiple data following. To optimize this
operation and prevent unnecessary map refreshment,
additional functions were set up in the library to
disable and enable the map events. So before we add
or edit data, events are blocked. When we will
reactivate it after acting on the data, all events will
be queued up and the map is refreshed only once.
This greatly reduces the waiting time of the user
when he acts on the map data.
To avoid loading several times the data of the
basemap the map control used in the application is
unique. But even by doing it this way, loading the
map data is still required at least once. This time is
about 1 to 2 minutes, which may seem long for a
user. To avoid having a visible latency that time will
be masked by loading data in a dedicated thread.
We can see the result of the integration in the 3
following figures. In figure 3 we can see the window
of Biotour network drawing in which the Biotour
network can be modified over the basemap. Figure 4
is the window of manual management of generated
tours which allows to adjust manually the generated
tours. In this figure, we can see that the symbology
applies to the basemap data is not the same as in
figure 3 to have a better readability. Finally, figure 5
shows the window of pick-up points selection before
tours generation.
GISTAM 2016 - 2nd International Conference on Geographical Information Systems Theory, Applications and Management
142
Figure 3: Window of Biotour network drawing.
Figure 4: Window of manual management of generated tours.
Figure 5: Window of pick-up points selection.
Development and Integration of an Offline and Open Source Alternative Mapping Solution
143
8 CONCLUSIONS
To conclude, an innovative alternative mapping
solution which is offline and open source was built.
It has much more flexibility than MapPoint and
others existing online mapping solutions. In each
screen of Biotour, the implemented solution allows
the user to see only layers that he needs to see.
Further, unlike MapPoint, data of the basemap can
be daily updated from OpenStreetMap to always
having quality data ensuring two features
completeness and correctness. Finally, the new
solution is much more stable than MapPoint so the
user experience is improved.
A key point is that the project takes place in the
case of a real business application, with customer
constraints. The flexibility of the new solution
allowed to implement customer needs that can’t be
implemented before with MapPoint, so the interest
of the map in the application is reinforcing.
Moreover, the application is more stable and offer
important development opportunities. Therefore, its
sustainability is now ensured.
The new version of Biotour using the new
mapping solution has been evaluated and compared
with the previous version which is in production.
The results show that the new solution is better in all
criteria : flexibility, rapidity, stability, ability to
work with large amounts of data and especially
sustainability. Indeed, the new Biotour application
works without MapPoint now, so all the defects of
the application, which are inherent to MapPoint,
were removed.
This new version is now deployed in all Saria
sites and users’ feedback is very good. They all
noticed a significant improvement of stability and
quality of the application. So, beyond the scientific
success to build an innovative mapping solution with
specific constraints, it is also a business success.
These successes show that another way to integrate a
mapping solution is possible.
ACKNOWLEDGEMENTS
This work was carried out thanks to ESEO,
Spécinov and Saria Industries.
REFERENCES
Saria Group (2015) – Specialists in the recycling of animal
and vegetable products and waste products.
http://www.saria.com/
Spécinov (2015) – IT services company.
http://www.specinov.fr/
Microsoft (1999) – Software program created by
Microsoft that allows users to view, edit and integrate
maps. https://www.microsoft.com/mappoint/en-us/
home.aspx
OpenStreetMap (2004) – Collaborative mapping project.
http://www.openstreetmap.org/about
Girres, J. F., & Touya, G. (2010). Quality assessment of
the French OpenStreetMap dataset. Transactions in
GIS, 14(4), 435-459.
Haklay, M. (2010). How good is volunteered geographical
information? A comparative study of OpenStreetMap
and Ordnance Survey datasets. Environment and
Planning B Planning and Design, (37), 682-703.
Geofabrik (2007) – Company providing shapefile
extractions of OpenStreetMap data.
http://www.geofabrik.de/geofabrik/geofabrik.html
DotSpatial (2010) – Open Source Geospatial Framework
in .NET. http://dotspatial.codeplex.com.
Cao, Y., & Ames, D. P. (2012). A strategy for integrating
open source GIS toolboxes for geoprocessing and data
analysis. In Proceedings International Environmental
Modelling & Software Society (iEMSs) 2012
International Congress on Environmental Modelling
and Software, Sixth Biennial Meeting.
Idaho State University (2015) – Members from the
Geospatial Software Lab developed DotSpatial.
http://www.isu.edu/
Ames, D. P., Michaelis, C., & Dunsford, T. (2007).
Introducing the MapWindow GIS project. OSGeo
Journal, 2(1).
Sameen, M. I., Ali, A. A., Wahid, N. O. A., & Kubaisy,
M. A. A. (2014). An Approach to Develop a
Geographic Information Database Using Dot Spatial
Open Source Platform and Google Search Engine. J
Comput Sci Syst Biol, 7, 217-220.
Wang, R., Liu, N., Xu, M., & Kong, X. (2014). Research
on the Open Source GIS Development Oriented to
Marine Oil Spill Application. Journal of Software,
9(1), 116-120.
GISTAM 2016 - 2nd International Conference on Geographical Information Systems Theory, Applications and Management
144