Sharpmap Depth Analysis: Map data Provider

Source: Internet
Author: User

Provider or provider patterns are not unfamiliar to many people, and the provider model is applied extensively in DNN and ASP.net 2.0. The current mainstream of GIS platform data delivery should be basically based on provider such a pattern, we are more familiar with the SUPERMAP proposed by the concept of multi-source spatial data engine.

In Sharpmap, the data provider is used in this way:

String connstr = 

"server=127.0.0.1;" port=5432; Userid=postgres; Password=password;database=mygisdb; ";

Mylayer.datasource = new SharpMap.Providers.PostGIS (connstr, "myTable", "The_geom", 

32632);

In fact, in the layer class, DataSource is defined as:

Public SharpMap.Data.Providers.IProvider DataSource

{

...

}

That is, the provider here is for the Iprovider interface, so that for different layers, you can specify different data sources (using different data provider and supporting different data formats). The following is a class diagram of the provider interface that defines the properties and operations of the interface:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.