Beruflich Dokumente
Kultur Dokumente
Welcome to the MapInfo Envinsa Location Platform Web Services. This guide provides descriptions and
examples for the developer who is writing applications that access the Location Utility Service.
In this section:
Gazetteer Functionality
Geocoding Functionality
Geocoding turns ordinary data records containing address information into geographic objects that display on a
map by finding the geographic coordinates of the address. This helps visualize data relationships. For example,
once address records are geocoded, they can be used by the Route Service to display them as driving directions
between two addresses (locations). Once data has geographic references, spatial searches can be performed to
answer questions such as "Find all customers within 10 miles of this location." All geocode requests can:
Indicate the number of exact or close matches in the response for a particular address supplied
in the geocoding request.
Determining Service Capabilities - The Location Utility Service is able to describe its
capabilities. It indicates what feature types it can service and what operations are supported on
each feature type. The service can return what feature types (contents) are available based on
the feature type alias.
Geocoding a Postal Code Centroid - Postal code centroids represent the centre of a postal
code region. Being able to locate these centroids on a map lets you perform demographic
analysis to find market regions to target for advertising or direct mail.
Geocoding a Point of Interest from a Place Code - Geocode a point of interest in order to
display it on a map or perform searches and queries. For example, locate a specific restaurant
and then find all of the nearest automated banking machines (ATM). The result would be
displayed on a subscriber's mobile device.
Given a Position, the service is able to return one or more locations, such as addresses with
associated Point geometries, and optionally, the address ranges of these locations from the
given position as it is defined in the Position ADT (Abstract Data Type - a point location in a
well-known coordinate system).
The form of the returned addresses is based upon the preference as stated in the request. You
can specify a preference of street address, street intersection, or PositionOfInterest (Postal
Code, City, and State name). If not specified, the service defaults to street address.
The service is capable of returning all location information of a preferred type within an area
(Circle, Ellipse, Polygon, and Point).
The service is able to indicate the number of matches in the response (including zero) for a
given request. The service also can limit the number of responses returned. For example, you
can set the service to return only the 5 closest matches.
Finding the Street Address from a Position - Determine an address of a given longitude/latitude
for both real-time, such as call center, situation and for an after-the-fact situation, such as
comparing the surroundings of a location to determine if an individual was near an off-limits
area.
Getting a PositionOfInterest from a Position - Provide a mobile subscriber with a list of the
nearest postal code, city, and state, given their current location.
Multi-Language Support - Provide reverse geocoding results in multiple languages for those
countries that have more than one official language.
Gazetteer Functionality
As part of the Location Utility Service, the Gazetteer service performs a world, country, or city geocode operation
that can find the position of a partial address containing only the city, state, or a place name, such as a landmark
or airport. The following operations are supported by the Gazetteer Service:
Search, based on country, country subdivision, city, city subdivision, landmark, or airport to
return the position.
The pattern search capability supports a wildcard character (*) as a search value in one or more
fields to return all available values for that particular field.
Specifying Types of Gazetteer Searches - Specify the type of search to perform, such as
searching all cities, towns, and airports within a specific country, to return a list of match results
to choose from.
Performing a Gazetteer Request - Search a database of places around the world in order to
quickly display a map centered on a specific place in a country such as Lake Como, Italy.
Email: docs@mapinfo.com
Input
Require
d
Description
Capability
Type
No
Specify Geocode or Reverse Geocode. This returns the list of supported countries,
supported levels of geocoding, and the preferences for the Location Utility Service.
Geocode
Type
No
Country
No
By specifying an ISO2 or ISO3 country code (for example, CA or USA), the service
returns a response that includes whether the specified country is supported and all the
capabilities specific to that country.
Custom
Content
No
This value is used for GetCapabilities requests specific to Reverse Geocode. This value
of Custom Content is sent so that the reverse geocode queries some other content
Outputs
Depending on the type of GetCapabilities request that is sent, the service returns an appropriate response. Each
response includes the general preferences and their default values, all the geocode types available for the
specified country, as well as the geocode engine version, data version, license information, any additional fields
defined, local geocode preferences, any address and user dictionaries defined, and the order that these
dictionaries are searched.
XML Sample
The following example returns all of the geocode capabilities and preferences for the Canadian service and all of
the Reverse Geocode capabilities for the US service.
<_RequestParameters xsi:type="ns3:GetCapabilitiesRequestType"
xmlns:ns3="http://www.mapinfo.com/locationutility">
<ns3:Geocode>
<ns3:Country>CAN</ns3:Country>
</ns3:Geocode>
<ns3:ReverseGeocode>
<ns3:Country>USA</ns3:Country>
</ns3:ReverseGeocode>
</_RequestParameters>
Email: docs@mapinfo.com
Address Types
There are two main types of addresses that can be geocoded by the Location Utility Service.
10 Wall St., NY
Address with street address and postal code:
Formatted Address
The Formatted Address is defined using a unique element for each of the segments that make up the address.
The Formatted Address can be either a StreetAddress or StreetIntersection.
A description of the format for a StreetAddress and StreetIntersection can be found in the schema or SDK. For
both a StreetAddress or StreetIntersection you can specify the country subdivision, country secondary
subdivision, municipality, and municipality subdivision elements
Both of these two formatted address may also have a Postal Code. If there is no country subdivision or
municipality specified in the Formatted Address, the Postal Code is required. If the address contains only the
Postal Code, a Postal Code centroid geocoding is performed.
Required Description
Address
Yes
and/or PostalCode.
Geocode
Preferences
Yes
Geocode Preferences determine the level of accuracy and whether close matches
are to be returned. For a more detailed description on preferences refer to Location
Utility Preferences and Geocode Preferences.
Output
A response contains a list of geocoded address positions that match the specified address (based on the geocode
preferences). The list of geocoded addresses contains four key pieces of information:
Output
Description
Number Of
Addresses
The number of matching address positions found for the specified address in the request. The
number of addresses found is the number of GeocodeAddress elements returned.
Position
The geocoded position of the street address. This position consists of the geocoded point and
the spatial reference system name.
Address
The address specified in the request is returned with all available information. For example, if the
postal code was not specified in the request, and postal data is available for this street address,
this information is returned.
Geocode
MatchCode
Determines whether the position for the address is a close match. An accuracy of 0.0 indicates
that the position is a close match based on the specified preferences in the configuration. The
matchType determines what information has been matched for this address. For information
about matchTypes, seeAccuracy for Close Matches.
XML Sample
The following sample geocodes a free form address (10 Wall St., New York, NY).
<_RequestParameters xsi:type="ns2:GeocodeRequestType">
<Address countryCode="USA" xsi:type="ns2:AddressType">
<StreetAddress xsi:type="ns2:StreetAddressType">
<Street xsi:type="ns2:StreetNameType">43 West 83rd.
Street</
Street>
</StreetAddress>
<Place type="CountrySubdivision"
xsi:type="ns2:NamedPlaceType">NY</
Place>
<Place type="Municipality" xsi:type="ns2:NamedPlaceType">New
York</
Place>
</Address>
</_RequestParameters>
Email: docs@mapinfo.com
If you have a point user dictionary, such as ParcelPrecision, then Envinsa can use these known addresses to
further refine geocode results. This process is called Address Point Interpolation. Continuing the previous
example, suppose we use Address Point Interpolation and the geocoder finds the position of 180 Main St. in the
ParcelPrecision user dictionary, which is about two-thirds of the way down the street. Now, the geocoder can
estimate the position of our target address based on 100 and 180 Main St. In this case, the geocoder estimates
the location of the address slightly away from the center of the segment.
If you do not have a point user dictionary, then there is no benefit to using address point interpolation. The
standard Envinsa geocode data does not include enough address points to support this feature.
By default, address point interpolation is disabled for geocode requests. The following examples demonstrate how
you can enable this feature.
Email: docs@mapinfo.com
Email: docs@mapinfo.com
Email: docs@mapinfo.com
Required Description
Address
Yes
The Address specifies the location of the street intersection. To determine the position
of the street intersection the address requires the Country Subdivision and
Municipality where the two streets are located.
Street
Yes
Intersecting
Street
Yes
Output
The response for a street intersection geocode request contains a list of geocoded street intersection positions.
The list of geocoded addresses contains three key pieces of information:
Output
Description
Number of
Addresses
The number of matching street intersection positions found for the specified addresses in the
request. The number of intersections found is the number of Geocode Address objects returned.
Position
The geocoded position of the street intersection. This position consists of the geocoded point
and the spatial reference system name.
Address
The address specified in the request is returned with all available information for the street
intersection. The number for each street at the intersection is returned, as well as the postal
code for the two street addresses.
return request;
}
addr.IntersectingStreetAddress =
Address[] addrs = {addr} ;
gr.Address = addrs;
return gr;
saddrs;
XML Sample
The following example finds the geocoded position for the intersection of "Wall St." and "William St." in New York
City. The first street is defined using Street element, while the intersecting street is defined using
IntersectingStreet element.
<_RequestParameters xsi:type="ns2:GeocodeRequestType">
<Address countryCode="USA" xsi:type="ns2:AddressType">
<StreetAddress xsi:type="ns2:StreetAddressType">
<Street xsi:type="ns2:StreetNameType">Wall
St.</Street>
<Street xsi:type="ns2:StreetNameType">William
St.</Street>
</StreetAddress>
<Place type="CountrySubdivision"
xsi:type="ns2:NamedPlaceType">NY</
Place>
<Place type="Municipality" xsi:type="ns2:NamedPlaceType">New
York</
Place>
</Address>
</_RequestParameters>
2007 MapInfo Corporation. All rights reserved.
Email: docs@mapinfo.com
Required Description
Address Yes
The Address specifies the postal code being geocoded. To determine the position of a
postal code centroid the address requires the Country code be specified.
XML Sample
The following example finds the geocoded centroid for the US postal code "10005".
<_RequestParameters xsi:type="ns2:GeocodeRequestType">
<Address addressee="US Addressee" countryCode="US">
<PostalCode>10005</PostalCode>
</Address>
</_RequestParameters>
2007 MapInfo Corporation. All rights reserved.
Email: docs@mapinfo.com
Required Description
Country
Code
Yes
Specifying the country directs the query to the correct geocoding engine
Name of the
POI
Yes
Place Code
Yes
The place code of the point of interest. Place codes are also referred to as miCodes
and more information can be found in the Data Guide found
at http://www.envinsa.com.
Some examples of commonly used miCodes are as follows:
Airports
Educational / Schools
Hospital / Polyclinic
Park
Shopping Malls / Shopping Center
Sports Center / Stadium
10310000
10210000
10230100
10130201
10010900
10120100
Country
Subdivision
No
Municipality
No
Output
The response for a point of interest from a place code request contains:
Output
Description
SRS
Name of the spatial reference system used for the location point.
Location
Country Code
Place Code
Country Subdivision
Municipality
XML Sample
The following example finds the school called Lowell School in Teaneck, New Jersey.
<_RequestParameters xsi:type="ns2:GeocodeRequestType">
<Address countryCode="USA" xsi:type="ns3:AddressTypeEx"
xmlns:ns3="http://www.mapinfo.com/xls">
<Place type="CountrySubdivision"
xsi:type="ns2:NamedPlaceType">New
Jersey</Place>
<Place type="Municipality"
xsi:type="ns2:NamedPlaceType">Teaneck</
Place>
<ns3:PlaceCode type="FCode">10210000</ns3:PlaceCode>
<ns3:PlaceName>Lowell School</ns3:PlaceName>
</Address>
</_RequestParameters>
2007 MapInfo Corporation. All rights reserved.
Email: docs@mapinfo.com
Email: docs@mapinfo.com