Uploading and Publishing Entity Data to a Information Source

Y'all can upload, geocode, and publish entity data to a data source by using the Bing Maps Dev Center.

After the entity information is published to a data source, y'all can query the data source past using the Query API. Y'all can likewise edit published entity data as described in Editing a Data Source. Enterprise accounts can have up to 25 published data sources. For non-enterprise accounts, the limit is 5 published data sources. The complete data source procedure is shown in the following diagram and further caption for the geocoding and publishing steps is provided below.

Bing Maps Account Center Flow

Entity Data and Data Schema

To upload, geocode and publish entity data to a data source, yous must create a file that contains a data schema and a set of entity data. Supported data file formats include KML, ESRI Shapefiles (SHP), XML, comma-separated values (CSV), tab-delimited values and piping-delimited (|) values. The data file that you lot upload must use UTF-8 encoding.

Information sources that use Enterprise keys can contain up to 300 MB of uncompressed data or 200,000 entities. Compressed data files are accepted, merely your uncompressed data must be no more than 300 MB. Data sources that use Basic keys can accept a maximum of 50 entities.

The data schema defines the properties of an entity type including location properties (latitude, longitude and address information) and additional user-divers backdrop such as phone number and hours of functioning. The entity data values must match the information schema. Examples for each data format are provided below.

Location Properties

The location backdrop in the following table are used for geocoding and reverse-geocoding entity locations. The latitude and longitude properties must be included in your information schema. The remaining accost properties are optional for your input information. However, they are required for a data source, and then any address backdrop that you practise not include in your data schema are added when you upload your data.

Property Description
Latitude [Required in data schema]. A double value that represents degrees of latitude.

Valid range of latitude values: [-xc, +90]

Instance: 47.673099

Longitude [Required in information schema] A double value that represents degrees of breadth.

Valid range of longitude values: [-180, +180]

Example: -122.11871

AddressLine The official street line of an address relative to the area, equally specified by the Locality, or PostalCode, properties. Typical utilise of this element would be to provide a street address or any official address.

Instance: one Microsoft Fashion

Locality A string specifying the populated place for the accost. This typically refers to a city, but may refer to a suburb or a neighborhood in certain countries.

Example: Seattle

AdminDistrict A string specifying the subdivision name in the state or region for an address. This element is typically treated as the start gild administrative subdivision, simply in some cases it is the second, third, or 4th guild subdivision in a country, dependency, or region.

Example: WA

PostalCode A string specifying the mail service lawmaking, postal lawmaking, or ZIP Lawmaking of an address.

Case: 98178

CountryRegion A string specifying the country or region proper name of an address.

Example: Usa

If you provide complete address information and latitude and longitude values, your entity information is not inverse by the upload and geocode process. However, if you want to reverse geocode latitude and longitude values from address data, leave the breadth properties fields empty. Similarly, if you provide address data and do non provide latitude and longitude values, the address information is geocoded.

Entity Data Types

You lot can have a total of 350 properties in your schema. The breadth and longitude properties practise non count towards this maximum.

The post-obit table shows the supported data types for the data schema. These data types map to a set of OData types that are used by the information source. You must use the XML data types in an XML data schema. If you apply one of the delimited formats for your information and data schema (values separated past commas, tabs or pipe (|) characters), y'all must use the OData types in the information schema. Descriptions of OData types are found in the OData Protocol Overview.

XML Data Blazon OData Blazon
string Edm.String

The maximum string length is 2560 characters.

long Edm.Int64
Boolean Edm.Boolean
double Edm.Double
dateTime Edm.DateTime
anyType Edm.Geography

A Well-Known Text representation of the geographical shape.

The maximum number of points a single geography object can take is 100,000.

Belongings Proper name Requirements

Belongings names must run into the following requirements:

  • The property name can have up to 50 characters.

  • The holding name must contain alphanumeric characters and underscores (_) only.

  • The starting time character of the property proper noun must exist a letter or an underscore.

  • The property name cannot offset with a 2 underscores (__).

  • Property names are case-insensitive.

Data Source Name Requirements

A data source name can have upwards to 50 characters and can contain alphanumeric characters and any of the following special characters. Blank spaces are not allowed:

~ ` ! $ ^ _ = { }

Case: XML Schema and Entity Information

The post-obit is an XML data schema and input data example. The information schema specifies a ready of location properties, an entity ID holding and two other entity properties for phone and manager information.

Notation that the input data does non incorporate values for all of the location properties. For instance, one set of entity data contains address information while the other set contains merely latitude and longitude coordinates. When this information is uploaded to the Bing Maps Dev Center, the geocode process tin can geocode (become latitude and longitude values for) the address data, and can reverse-geocode (get accost data for) the latitude and longitude values. Geocoding or reverse-geocoding only occurs when address information is missing (reverse-geocoding) or when breadth and longitude values are missing (geocoding). If address information and latitude and longitude values are both provided for an entity, no changes are made to the data. You also have the option to upload and directly publish the information to the information source with no changes.

In addition to other characters, such a comma or a hyphen (-), y'all tin apply the piping (|) character in XML entity values. The entity type name (FourthCoffeeShops in the case) supports hyphens (-) and underscores (_).

For additional information virtually creating a data schema and input values including available types and limits, come across Load Information Source Data Schema and Sample Input.

              <?xml version="1.0" standalone="yes"?>   <FourthCoffeeSample>     <xs:schema id="FourthCoffeeSample" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">       <xs:element name="FourthCoffeeSample" msdata:IsDataSet="true" msdata:UseCurrentLocale="true">         <xs:complexType>           <xs:choice minOccurs="0" maxOccurs="unbounded">             <xs:element proper name="FourthCoffeeShops">               <xs:complexType>                 <xs:sequence>                   <xs:element proper name="AddressLine" type="xs:cord" minOccurs="0" />                   <xs:element name="Locality" type="xs:string" minOccurs="0" />                   <xs:element name="AdminDistrict" type="xs:string" minOccurs="0" />                   <xs:element name="PostalCode" blazon="xs:string" minOccurs="0" />                   <xs:chemical element proper name="CountryRegion" type="xs:string" minOccurs="0" />                   <xs:element name="Phone" type="xs:string" minOccurs="0" />                   <xs:element name="Managing director" type="xs:string" minOccurs="0" />                   <xs:element name="EntityID" type="xs:string" />                   <xs:chemical element name="Longitude" type="xs:double" minOccurs="0" />                   <xs:element name="Latitude" type="xs:double" minOccurs="0" />                 </xs:sequence>               </xs:complexType>             </xs:element>           </xs:option>         </xs:complexType>         <xs:unique name="Constraint1" msdata:PrimaryKey="true">           <xs:selector xpath=".//FourthCoffeeShops" />           <xs:field xpath="EntityID" />         </xs:unique>       </xs:chemical element>     </xs:schema>     <FourthCoffeeShops>       <EntityID>m</EntityID>       <AddressLine>1 Microsoft Manner</AddressLine>       <Locality>Redmond</Locality>       <AdminDistrict>WA</AdminDistrict>       <PostalCode>98052</PostalCode>       <Telephone>303-555-0188</Phone>       <Manager>Alan Steiner | Pannarat Pattanapitakkul</Manager>    </FourthCoffeeShops>     <FourthCoffeeShops>       <EntityID>1001</EntityID>       <Latitude>47.64054</Latitude>       <Longitude>-122.12934</Longitude>       <Phone>425-555-0111</Telephone>       <Manager>Phil Spencer</Manager>     </FourthCoffeeShops>   </FourthCoffeeSample>                          

Example: CSV Data Schema and Entity Information

The following is an example of a comma-separated value (CSV) information schema and input data. The header is required and specifies the data schema version. For more information about this format including bachelor types and limits, see Load Data Source Data Schema and Sample Input. Salve your CSV file with a .txt file name extension for upload.

              Bing Spatial Data Services, 1.0, FourthCoffeeShops   EntityID(Edm.String,primaryKey),AddressLine(Edm.String),Locality(Edm.Cord),AdminDistrict(Edm.String),PostalCode(Edm.Cord),CountryRegion(Edm.String),Telephone(Edm.String),Manager(Edm.String),Latitude(Edm.Double),Longitude(Edm.Double)   yard,1 Microsoft Fashion,Redmond,WA,98052,,303-555-0188,Alan Steiner,,   1001,,,,,,425-555-0111,Phil Spencer,47.639767,-122.129959                          

Case: TAB Information Schema and Entity Data

The following is an example of tab-delimited value data schema and input information. Tabs are represented in this instance past "->" for illustration purposes only. Do not use "->" in your input file. Insert tabs every bit separators instead. The header is required and specifies the data schema version. For more information about this format including available types and limits, encounter Load Data Source Data Schema and Sample Input. Salvage your tab-delimited file with a .txt file name extension for upload.

              Bing Spatial Information Services,1.0,FourthCoffeeShops   EntityID(Edm.String,primaryKey)->AddressLine(Edm.String)->Locality(Edm.String)->AdminDistrict(Edm.String)->PostalCode(Edm.String)->CountryRegion(Edm.String)->Telephone(Edm.String)->Director(Edm.Cord)->Latitude(Edm.Double)->Longitude(Edm.Double)   yard->1 Microsoft Way->Redmond->WA->98052->->303-555-0188->Alan Steiner->->   1001->->->->->->425-555-0111->Phil Spencer->47.639767->-122.129959                          

Sample Pipage Information Schema and Input Information

The following is an example of pipe-delimited value information schema and input information. The header is required and specifies the data schema version. For more data about this format including available types and limits, see Load Information Source Information Schema and Sample Input.

              Bing Spatial Data Services,1.0,FourthCoffeeShops   EntityID(Edm.Cord,primaryKey)|AddressLine(Edm.Cord)|Locality(Edm.Cord)|AdminDistrict(Edm.String)|PostalCode(Edm.Cord)|CountryRegion(Edm.Cord)|Phone(Edm.String)|Manager(Edm.String)|Latitude(Edm.Double)|Longitude(Edm.Double)   grand|1 Microsoft Way|Redmond|WA|98052||303-555-0188|Alan Steiner||   1001||||||425-555-0111|Phil Spencer|47.639767|-122.129959                          

Upload and Geocode Entity Information

Note

If you want to upload and publish your entity information to a data source without geocoding the data, select Publish without geocoding when you lot upload the data. When yous choose this option, the data is published to the data source in i step.

When you upload entity data to the Bing Maps Dev Center, the location information is geocoded or reverse-geocoded depending on the location information you provide. You can determine if an entity is geocode by what fields you specify. For each entity, if you lot:

  • Desire to geocode (compute latitude and longitude values from) the address data, then provide complete address information and exercise non provide breadth and longitude values. During the upload process, the accost properties (AddressLine, Locality, AdminDistrict, PostalCode, CountryRegion) are used to compute the breadth and longitude values. The address information is not changed.

  • Want to contrary-geocode (compute address values from) latitude and longitude values, then do not include whatsoever accost property values or leave them blank, and the upload process will reverse-geocode the latitude and longitude values and save the results in the address properties.

  • Do not desire to geocode or opposite-geocode the entity data, then make certain you provide latitude and longitude values as well every bit one or more accost values and the upload process will not brand any changes to the entity data.

If you do non include address fields in your data schema, these fields are created when y'all upload your entity information.

To upload the file that contains your data schema and entity data, follow these steps.

  1. Sign in to the Bing Maps Dev Center with your Bing Maps account. If you practise non take a Bing Maps account, come across Creating a Bing Maps Business relationship.

  2. In the Bing Maps Dev Eye, select the Upload data to a data source under Data Sources.

  3. Provide the post-obit information

    • Information source name: The proper noun of the data source where you lot want to publish the data. If a data source with this name does not be, it will exist created when you publish the data. For data source proper name requirements, see the preceding Data Source Name Requirements department.

    • Chief key: Select the Bing Maps Key to use for the data source.

      • If you are creating a new information source, select the Bing Maps Primal that yous want to use to manage the data source.

      • If you are updating a data source with new data, you must utilize the master cardinal that yous specified when y'all created the information source. To view a listing of master and query keys for data sources, click the View data source information link under Data Sources on the Bing Maps Dev Middle.

    • Query central [new data sources only]: If you are creating a new data source, you can select a Bing Maps Fundamental to use to query the data source. The query primal must exist a dissimilar Bing Maps Fundamental than the master key.

    • Data format: Select the blazon of input file yous desire to upload.

    • Information file : Browse to the file that contains the data (schema and entity data) that yous want to publish. You tin format your data past using XML, CSV (comma-separated value), TAB (tab-delimited) or PIPE (pipage-delimited) formats. The file extensions expected for each file type are:

      • .xml :XML

      • .csv :comma-separated value

      • .txt :piping-delimited

      • .txt :tab-delimited

    • Publish without geocoding: Select this option if y'all want to upload and publish your information to a data source in one step without geocoding the entity location data.

    • Set information source access to public or private: When you choose to publish without geocoding, you have the choice to make the data source public or private. A public information source tin exist queried by anyone with a Bing Maps Central and the query URL. If you are updating an existing URL, brand sure you choose the correct access setting because it overrides the existing setting.

      After a data source is published, you can alter the data source admission at whatever time from the Manage my information sources page.

  4. Click Submit to start the upload.

Download Geocoded Entity Data [optional]

After you take submitted your entity data for the upload and geocode process, go to Manage my data sources nether Information Sources to run across the status of your upload. Click Refresh on the Geocoded Information Sources tab until you see i or more links appear in the Download cavalcade. A Geocoded link downloads all entities that were geocoded successfully. If a Failed link appears, i or more entities could not be geocoded and the link will download the entities that failed to geocode. Both Geocoded and Failed downloads are provided in XML format.

Notation that geocoded data downloads are non available later on y'all publish the entity data to a data source. If y'all do not publish your geocoded data, it will be bachelor for 14 days.

Publish Entity Data to a Data Source [optional]

When you lot are ready to publish entities that geocoded successfully, click Publish. When yous publish your data, the published data source appears on the Published Data Sources tab and the Geocoded and Failed download files are no longer available. To query the data source, yous will demand a using the inQuery API. You can find this URL on the View Data Source Data folio nether Information Sources. You can as well edit the entity information and the information scheme of the published data source. For more information about editing the entity data of a published data source, run into Editing a Data Source.

Transaction Bookkeeping

Transactions are counted when you use the Bing Maps Dev Center to create and manage data sources. For more information most these transactions, encounter Understanding Bing Maps Transactions.

See Too

Getting Data Source Information
Editing a Data Source
Downloading a Data Source
Deleting a Data Source