Common API Reference

May 26, 2017 ยท View on GitHub

Namespace: BingMapsSDSToolkit

The following classes and enumerators are used through out the Bing Maps Spatial Data Services toolkit.

BasicDataSourceInfo Class

Basic information about a data source

Properties

NameTypeDescription
AccessIdStringThe access ID for the data source.
DataSourceNameStringName fo the Data Source.
DescriptionStringA description of the data source data.
EntityTypeNameStringName of the Entity type of the data source.
MasterKeyStringThe master Bing Maps key for editting a data source.
QueryKeyStringThe query Bing Maps key for querying a data source.
QueryUrlStringThe query URL for accessing the data source.

BingDataSources Class

A static class that contains data source information for all the built-in Bing data sources in the Bing Spatial Data Services.

Static Properties

NameTypeDescription
FourthCoffeeSampleBasicDataSourceInfoA sample data source of coffee shops.
NavteqPOIs_EUBasicDataSourceInfoA data source of points of interest for Europe.
NavteqPOIs_NABasicDataSourceInfoA data source of points of interest for North America.
TrafficIncidentsBasicDataSourceInfoA data source of real time traffic incidents (accidents, road closures, ...).
USCensus2010_111CDBasicDataSourceInfoA data source that contains a subset of 2010 US Census data broken up by 111th Congressional Districts.
USCensus2010_CountiesBasicDataSourceInfoA data source that contains a subset of 2010 US Census data broken up by counties.
USCensus2010_StatesBasicDataSourceInfoA data source that contains a subset of 2010 US Census data broken up by states.
USCensus2010_ZCTA5BasicDataSourceInfoA data source that contains a subset of 2010 US Census data broken up by Zip Code Tabulation areas (ZCTA5).

DistanceUnitType Enumerator

Units of measurements for distances.

NameDescription
FeetDistances in Feet
KMDistances in Kilometers.
MetersDistances in Meters.
MilesDistances in Miles
YardsDistances in Yards

FileExtensionUtilities Class

Useful utilities for working with file extensions.

Static Methods

NameReturn TypeDescription
GetFileExtensions(DataSourceFormat format, out String defaultExt, out String filters)voidGive a data source format, this method provides a default and file extension filter string.
GetFileExtensions(BatchFileFormat format, out String defaultExt, out String filters)voidGive a batch geocoding file format, this method provides a default and file extension filter string.

GeodataLocation Class

An object that stores the coordinate information.

Constructor

GeodataLocation()

GeodataLocation(Double latitude, Double longitude)

Properties

NameTypeDescription
LatitudeDoubleLatitude coordinate.
LongitudeDoubleLongitude coordinate.

Geography Class

An object used to represent a geography column type.

Properties

NameTypeDescription
WellKnownTextStringThe well known text that describes the geography object.

Methods

NameReturn TypeDescription
NumPoints()Int32Calculates the number of coordinate pairs in the geography.

SpatialTools Class

A set of useful spatial calculation tools.

EarthRadius Property

The approximate spherical radius of the Earth

Constants

NameDescription
FeetEarth Radius in Feet
KMEarth Radius in Kilometers
MetersEarth Radius in Meters
MilesEarth Radius in Miles

Static Methods

NameReturn TypeDescription
ConvertDistance(Double distance, DistanceUnitType fromUnits, DistanceUnitType toUnits)DoubleConverts distances from one unit to another.
GetEarthRadius(DistanceUnitType units)DoubleRetrieves the radius of the earth in a specific distance unit for WGS84. Defaults unit is in Meters.
HaversineDistance(GeodataLocation origin, GeodataLocation destination, DistanceUnitType units)DoubleCalculate the distance between two coordinates on the surface of a sphere (Earth).
HaversineDistance(Double origLat, Double origLon, Double destLat, Double destLon, DistanceUnitType units)DoubleCalculate the distance between two coordinates on the surface of a sphere (Earth).
ToDegrees(Double angle)DoubleConverts an angle that is in radians to degress. Angle * (180 / PI)
ToRadians(Double angle)DoubleConverts an angle that is in degrees to radians. Angle * (PI / 180)