Click or drag to resize

SimpleRepository Class

Verizon Connect Logo
Print this page
Learn more about Verizon Connect GeoBase.
Get information about the latest release
A SimpleRepository is a local repository type that supports local GeoBase services (such as mapping and routing) by referencing a GeoBase (GBFS) data file.
Inheritance Hierarchy

Namespace:  Telogis.GeoBase.Repositories
Assembly:  geobase.net (in geobase.net.dll) Version: 4.99.0.0
Syntax
public class SimpleRepository : LocalRepository, 
	IDisposable

The SimpleRepository type exposes the following members.

Constructors
  NameDescription
Public methodCode exampleSimpleRepository
Get a new SimpleRepository created from a GBFS file. The GBFS file is specified by a file path.
Top
Properties
  NameDescription
Public propertyBoundingBoxData
Implemented by derived classes to retrieve the RepositoryBoundingBoxData objects that describe the bounding boxes of the repository content.
(Inherited from Repository.)
Public propertyBoundingBoxes
The BoundingBox objects that contain the repository content.
(Overrides RepositoryBoundingBoxes.)
Public propertyCopyrightString
Get the copyright string for this Dataset.
(Overrides RepositoryCopyrightString.)
Public propertyCountries
Gets an array of Countrys for which data in this SimpleRepository is available.
(Overrides RepositoryCountries.)
Public propertyCustomTables
The tables in this data file, if it's a custom data file.
Public propertyDatasetHashCode
Gets the hash code for this Repository's dataset. The hash code may be used to identify the dataset.
(Inherited from LocalRepository.)
Public propertyDatasetHashCodeString
Provides a consistent string representation of DatasetHashCode.
(Inherited from Repository.)
Public propertyFileInfo
Get a string containing information about the file, such as name, vendor and version.
Public propertyFileName
Get the filename of this dataset
Public propertyHasGlobalData
May be used to determine if global data is available in this Dataset (true) or not (false).
(Overrides RepositoryHasGlobalData.)
Public propertyIsDisposed
Gets whether the repository has been Disposed.
(Inherited from Repository.)
Public propertyName
Get the name of this Dataset.
Public propertyPostProcessingInfo
Get a string containing file information about this Dataset.
Public propertyRegions
Gets an array of regions for which data in this SimpleRepository is available.
(Overrides RepositoryRegions.)
Public propertyVendorName
Gets the vendor name for this dataset.
Public propertyVendorVersion
Gets the version number for this dataset.
(Overrides RepositoryVendorVersion.)
Public propertyVersion
Get version details for this Dataset.
Top
Methods
  NameDescription
Public methodStatic memberCode exampleCreateFailoverRepository
Get a new SimpleRepository created from several instances of a same GBFS file. In case one file instance is no longer available, the SimpleRepository fails over to the next one.
Public methodDispose
Disposes of this LocalRepository. See remarks.
(Inherited from Repository.)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodGetAddressConvention
Indicates the street number addressing convention in the specified country.
Public methodGetCountriesIn
Query the repository for all countries which fall underneath the given BoundingBox.
(Overrides LocalRepositoryGetCountriesIn(BoundingBox).)
Public methodGetCountryRegions
Gets a list of top country regions for which data in this SimpleRepository is available.
Public methodGetDrivingSide
Indicates which side of the road vehicles drive in the specified country.
(Overrides RepositoryGetDrivingSide(Country).)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetRepositoriesForCountry
Returns this simple repository if it supports the specified country.
(Overrides LocalRepositoryGetRepositoriesForCountry(Country).)
Public methodGetRoutingProfile
Gets the default RoutingProfile for a GBFS.
Public methodGetRoutingProfile(Country)
Gets the default RoutingProfile for a given GBFS file and country.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGetUnitSystem
Returns the unit system for a specified country.
Public methodHasCountry
Indicates whether this repository contains data for the given Country.
(Inherited from LocalRepository.)
Public methodSupports
Gets whether this Repository supports the specified feature.
Public methodToString
Returns a string representation of the simple repository.
(Overrides ObjectToString.)
Public methodValidate
Validate the integrity of a GBFS file by calculating and checking its MD5 checksum.
Top
Remarks
Examples
C#
// Create a Map
Telogis.GeoBase.Map myMap = new Telogis.GeoBase.Map();

// Create a SimpleRepository for a single map data file and apply to the Map object
myMap.MapRepository = new Telogis.GeoBase.Repositories.SimpleRepository(@"C\MY_MAP_DATA.gbfs");

// Alternatively, to use several map files (for multiple countries/regions), create several SimpleRepository objects...
Telogis.GeoBase.Repositories.SimpleRepository repository_a = new Telogis.GeoBase.Repositories.SimpleRepository(@"..\folder\country_a.gbfs");
Telogis.GeoBase.Repositories.SimpleRepository repository_b = new Telogis.GeoBase.Repositories.SimpleRepository(@"..\folder\country_b.gbfs");

// Then create a MultiRepository and add the SimpleRepository objects to it...
Telogis.GeoBase.Repositories.MultiRepository multi_map = new Telogis.GeoBase.Repositories.MultiRepository();
multi_map.Add(repository_a);
multi_map.Add(repository_b);

// The MultiRepository can be added directly to a map...
myMap.MapRepository = multi_map;

// Or applied to the current thread...
Telogis.GeoBase.Repositories.Repository.CurrentThreadRepository = multi_map;

// Or made the default for all new threads...
Telogis.GeoBase.Repositories.Repository.Default = multi_map;
See Also