BuildMap

Land Desktop Map 3D Samples

 
BuildMap
 
 
 

When you enter the BuildMap command on the Map command-line, you cause an instance of the Implementation class to be created and its BuildMap method to be executed. The BuildMap method loads three files into the Resource Service repository: a raster file (Data\Raster\Redding.JPG) containing a jpeg map of Redding, California, and two SDF files, (Data\SDF\Zoning.sdf containing polygons representing zoning in Redding and Data\SDF\Signals.sdf containing points representing traffic lights within Redding.

The steps for loading the SDF files are described in ConnectToSdfFile.

The steps for loading the raster file are the same except for the additional step of storing raster configuration data in the repository using the same MgResourceIdentifier object used to identify the FeatureSourceType object for the raster file.. The raster configuration data is contained in Data\Raster\Redding.xml. The contents of the xml file are read, serialized, converted into an array of bytes and then stored in the Resource Service repository.

This configuration file contains feature schema and coordinate system definitions for the raster file. You do not need to add this additional configuration information for the sdf files since it is already contained in them.

BuildMap creates layer definitions for the features in each SDF file and for the raster in the jpeg file and adds them to the current map. This is described in the topic AddAllToMap.

NoteEach of the SDF files has only one feature schema and each schema has only one class, and each class has one geometry property.

The following graphics are the three layers from the three files.

Redding.JPG

Zoning.sdf

Signals.sdf