[Expand]General Information
[Collapse]WinForms Controls
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Property Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Chart Control
  [Collapse]Map Control
   [Expand]Getting Started
   [Collapse]Coordinate Systems
     Map Coordinate Systems
     Geographical Projections
     Provide Cartesian Data to a Geographical Map
   [Expand]Map Image Data
   [Expand]GIS Data
   [Expand]Vector Data
   [Expand]Visual Elements
   [Expand]End-User Features
   [Expand]Product Information
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]PDF Viewer
  [Expand]TreeMap Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Provide Cartesian Data to a Geographical Map

This document describes how to load Cartesian coordinate data onto a geographical map. The document consists of the following sections.

Expanded Overview

The CoordinateSystemDataAdapterBase class descendants allow you to provide both Cartesian and geographical map data. To specify which kind of data the adapter should provide, customize the CoordinateSystemDataAdapterBase.SourceCoordinateSystem property.

By default, this property is set to GeoSourceCoordinateSystem and to load Cartesian data, assign an CartesianSourceCoordinateSystem object to this property.

Expanded Load Coordinate System from the *.PRJ File

If your data contains the *.PRJ file and this file is located in the same directory and has the same name as a shapefile, the coordinate system will be loaded automatically. Otherwise, if the paths or the names are different, call the ShapefileDataAdapter.LoadPrjFilemethod to load coordinate system metadata.

The following code demonstrates how to load the projection information using the LoadPrjFile method.

Show Me

A complete sample project is available in the DevExpress Code Examples database at http://www.devexpress.com/example=T208696.

The following image demonstrates the result.

Expanded Specify Coordinate Converter Manually

If your data does not contain a *.PRJ file, it is possible to customize a Cartesian coordinate system manually. To do this, create a CartesianSourceCoordinateSystem object, and specify its CartesianSourceCoordinateSystem.MeasureUnit and SourceCoordinateSystem.CoordinateConverter properties. Then, assign the object to the CoordinateSystemDataAdapterBase.SourceCoordinateSystem property.

The following code demonstrates this customization.

Show Me

A complete sample project is available in the DevExpress Code Examples database at http://www.devexpress.com/example=T208235.

The following image demonstrates the result.

Expanded See Also

Is this topic helpful?​​​​​​​