MapPoint 2002 and High-end GIS Functionality Living in Harmony
BJ Holtgrewe, a Senior Product Manager/Technical Evangelist
for MapPoint talks about the Spatial Data Importer
The world of business mapping functionality provided in MapPoint 2002 is comparatively rich when matched up to the high-end features provided by traditional Geographic Information Systems (GIS). By design MapPoint is targeted to end-users looking for an everyday business mapping solution and by design it does not require a degree in cartography.
The typical knowledge worker knows what they want to do with maps but see them as a supplement to their normal day-to-day activity and mission and not the end result. The benefits of having rich address find, route planning, included demographic data, detailed integrated maps and the ability to pull it all together with an easy to understand Office family application to incorporate their own data already stored in Microsoft Excel, Access, Outlook, SQL Server or text delimited files just plain lowers the level of complexity and allows them to do real work with maps without the hassles.
At the other end of the spectrum is the audience of cartographers that live and breathe mapping problems each and every day with high-end GIS applications such as those provided by companies like ESRI and MapInfo. A cartographer has an advanced understanding of spatial datasets and how to get the most out them. They can provide valuable insight into problems that can be very tricky to solve that many times requires the creation, modification and maintenance of base maps.
This traditional world of GIS requires a level of spatial awareness and technical know-how that would be considered overkill and hard to justify in money and time for many businesses and business needs. This is not to say they are not important. If it was not for the skills and dedication of Microsoft cartographers the base maps used in MapPoint would not exist. Without High-end GIS applications valuable but complex levels of spatial analysis used by government agencies and large enterprises would be impossible.
Both ends of this continuum provide unique features and serve important purposes. The basic problem up to now is there is a gap between these two approaches that inhibits an end-user from taking advantage of the strengths of both approaches. The reality is that in a definable number of real-world scenarios users could benefit tremendously if these two worlds of mapping had the ability to easily work together. Let's explore an approach using the new MapPoint 2002 extended object model that provides a means to build a bridge between these to related but divided approaches.
Bridge Building Material
The most obvious common element shared between High-end GIS systems and MapPoint 2002 is their use of spatial datasets but the approach taken to each is unique. ESRI users can create and share SHAPE files. MapInfo users can create and share TAB and MIF format files. There is even third-party software products designed to easily transfer datasets from one format to the other.
These GIS file formats are used to store both the base maps and the corresponding end-user data layers. The quality and coverage of the base maps depend on the source and the amount of modifications and corrections that the end-user might make. This can be a very good thing or can be a very overwhelming activity. If you are a cartographer doing high-end analysis or need the ability to change the base map you would view this as essential.
In contrast MapPoint uses very extensive integrated base maps that cannot be modified. These maps include political and administrative boundaries (e.g., census tracts, postal codes, counties, metropolitan areas, states, countries, etc.) and an extensive transportation network.
The North American 2002 edition includes over 6.4 million routable streets and roads. The European 2002 editions include over 4.8 million routable streets and roads. The road networks contain attribution for turn restrictions, one-wayness and five different speed classifications. The maps also include an extensive collection of populated places and points of interest (POI). The sources for these base maps include spatial data vendors Navigation Technologies, Geographic Data Technologies Inc., CompuSearch, Inc. and data collected and developed by Microsoft over the last ten years.
Extensive research shows an overwhelming majority of end-users want to use maps, not acquire, create and maintain them. Given the broad extend of coverage provided by the North American and European MapPoint editions there simply are no better maps available today so the problems related to "rolling" your own maps goes away.
By design one cannot replace the MapPoint maps with their own maps using the approach discussed in the article or with any other method, but doing so would negate one of the key benefits that MapPoint provides. You should also be aware that MapPoint 2002 is not designed to be a SHAPE, TAB or MIF viewer.
But what if you could take your GIS files and import them into MapPoint files? Would that provide a level of integration that provided real value?
Let's explore just how we can do this using Visual Basic to build a MapPoint 2002 COM Add-in and the extended MapPoint 2002 object model.
Importing GIS Datasets into MapPoint
The ability of MapPoint 2002 to work in harmony with spatial datasets created in MapInfo and ESRI formats is a feature that many enterprise customers have requested. The benefits this would provide include:
1. Integration of complex or finer granularity shapes into MapPoint created using high-end GIS algorithms or spatial datasets that are acquired or created in GIS systems.
2. Facilitate easier spatial queries and integration of Excel, Access, Outlook and SQL Server data.
3. Provide a way to combine datasets that were created separately in GIS and MapPoint environments.
4. Easy distribution of maps to your end-users that contain extensive data combined.
This extension can be created either as COM Add-in or with the creation of a Visual Basic application using the new MapPoint 2002 ActiveX control. It is not an out-of-the-box feature but an example of how MapPoint can grow into many additional areas of functionally.
We created a MapPoint COM Add-in sample in Visual Basic that uses the new extended MapPoint object model methods and takes the native source GIS point datasets and import them as MapPoint pushpin sets along with any native attribution associated with each point (e.g., name, address, latitude/longitude, etc.). The native GIS polygons, polylines, line rectangles and rounded rectangles can be imported to create a layer of MapPoint drawing objects that can be displayed within a MapPoint map. A copy of the sample code and "working" .dll COM Add-in can be found at http://msdn.microsoft.com/mappoint.
Through the MapPoint object model functions you can set the line color and size, shape fill color and even move the polygons and lines behind the MapPoint road network.
A large portion of the code in this sample has more to do with the reading of ESRI SHAPE files and MapInfo MIF files. Taking the information extracted from these files and placing it onto a MapPoint map is the easy part.
Once imported into MapPoint the polygons can be used for visualization and to do spatial queries (i.e., point-in-poly queries in VB code and Export to Excel using the MapPoint application user interface) of any MapPoint data layers contained in the MapPoint map. These can include queries of MapPoint pushpin sets or demographic or end-user data displayed in MapPoint shaded area, shaded circle, sized circle, multiple symbol, pie chart, sized pie chart, column chart and/or series column chart datasets. The queries can include multiple layers of information at once.
This sample and additional functionality accessible through the object model will satisfy many end-users but it will have natural limits that will not satisfy extreme situations.
Although this GIS import example demonstrates how to import GIS lines and polylines it is important to note that they cannot be added to the MapPoint transportation layer and will not be routable. As far as MapPoint is concerned they are just simple lines and polylines.
This sample code does not support the import of any shapes that contain holes. From time to time datasets in GIS systems will contain "donut" shaped objects.
This sample does not provide functionally for exporting back out from MapPoint the GIS layers that are imported. It should be possible to write such a feature but it would require more extensive Visual Basic coding.
Be aware that the MapPoint COM Add-in, Visual Basic Code and ESRI and MapInfo spatial files are only samples used to highlight the possibilities but you may find that the COM Add-in works well with our files without change. You can also take the sample code and extend and modify it as needed.
Importing ESRI SHAPE files and MapInfo files into a MapPoint 2002 map is just one example of how a developer can expand the functionally of MapPoint by using the new extended object model. This extension is created either as COM Add-in or with the creation of a Visual Basic application using the new MapPoint 2002 ActiveX control. It is not an out-of-the-box feature but an example of how MapPoint can grow into many additional areas of functionally
MapPoint 2002 is designed for everyday business mapping and we leave the very technical and complex GIS problems to the GIS applications. If you want to create and modify your own spatial datasets I would recommend using GIS applications such as those from ESRI and MapInfo. If you want to integrate the benefits of your spatial data sets with the power of MapPoint you will like this code sample.
Prior to his Technical Evangelist role, BJ served as a Product Planner
for MapPoint. When he first joined the team he served as the Lead
Program Manager in the Microsoft Map Building System. BJ is currently
emerged in Microsoft's .NET initiative and holds two patents in the area
of location awareness. He is a speaker at numerous conferences and
seminars, and is currently authoring a book on MapPoint 2002.
Before life at Microsoft, he was a project and design consultant and
worked for software companies on the East Coast and in Europe. In his
spare time he loves to travel the world (someone needs to check the
accuracy of the maps!). He has an incurable appetite for European
professional cycling and old printed maps. Even earlier in his history
BJ was an avid skydiver instructor, internationally rated skydiving
judge and underwater search and recovery diver.