Title: Integrating%20Custom%20Data%20Formats
1Learning Video Series Extending Map Suite
Lesson 1 Integrating Custom Data Formats Learn
the basics of how to integrate your own custom
data formats into Map Suite. Duration 45 minutes
2Prerequisites
- Working knowledge of Object Oriented principles.
- Basic understanding of inheritance.
- Familiarity with GIS and Map Suite.
- Do your homework and understand the data format
you intend to integrate.
3Agenda
- Answer the following questions.
- Why integrate custom data formats?
- How does Map Suite make things easy?
- Why is a progressive API important?
- What are the important classes?
- What is required for a FeatureSource?
- What overloads are recommended?
- How do I integrate a FeatureSource with a Layer?
- Review the code of a working FeatureSource.
- Answer additional questions.
4Why Integrate Custom Data Formats?
- Support proprietary formats.
- Support existing legacy technologies.
- Support new closed open source formats.
- Dependency on an external data vendor.
- Enhance our existing implementation.
- Support distributed data scenarios such as Cloud
Computing.
5How Does Map Suite Make Things Easy?
- Excellent documentation
- We Eat our own dog food
- Rich intellisense.
- Professional discussion forums
- We provide a progressive API
6Why is a Progressive API Important?
- The coding effort rises in step with the
complexity. - Easy tasks can be accomplished easily.
- Moderately complex tasks only require a moderate
amount of effort. - The most difficult tasks are possible.
- Our API platform will not let you down in the
future.
7What are the Important Classes?
- Feature
- The basic unit of a geometric object.
- It has a unique ID.
- It can contain column data that describes it.
- FeatureSource
- Abstracts the underlying data source.
- Provides spatial query capability.
- Responsible for editing.
- FeatureLayer
- Wraps the FeatureSource
- Provides the rendering centric APIs
8What is Required for a FeatureSource?
- GetAllFeaturesCore()?
- Pass back all of the Features in your underlying
data source. - Optionally allows you to pass back column
information. - All other methods and properties can be deduced
from this. - Examples of deduced methods.
- GetCount()?
- Spatial Querying
- Important Caveats
- While this is the only required override you
will find for large data sets our default
implementation is inefficient.
9What Overloads are Recommended?
- GetAllFeaturesInsideBoundingBoxCore()?
- Provide a way to quickly find features inside of
a bounding box. - GetColumnsCore()?
- This provides a list of all the columns
available in your data source. - GetCountCore()?
- Provide a fast way count the Features in you
data source. - OpenCore()?
- Initialize and cache for your data source.
- CloseCore()?
- Close your data source and be prepared for
serialization.
10How Do I Integrate a FeatureSource with a Layer?
- Create a new class by inheriting from
FeatureLayer. - In the constructor create an instance of the new
FeatureSource and set it to this.FeatureSource - From there everything else is done for you. No
other code is required. - Add any additional custom properties or methods
you want to expose from the new FeatureSource.
11Sample Code Overview
- The sample is a OledbPointFeatureSource and
OledbPointFeatureLayer. - We have chosen Microsoft Access as the
underlying data source. - Any Oledb data provider should work as well.
- The data represents the world capitals and their
names. - We have overridden all of the recommended
methods we discussed earlier. - We have created a sample form to render the
cities on top of ShapeFile data of the world
countries.
12Let's Look at Some Code! You can find the code
we will review in a zip file accompanying this
video on ThinkGeo.com. To compile the code it
requires you have installed a full or evaluation
edition of any Map Suite 3.0 product. You will
need to add the MapSuiteCore.DLL as a reference
in the project.
13Thank You For Watching! For More Videos, Visit
http//gis.thinkgeo.com