URL
http:GeocodeServer
上属资源
描述
地理编码是分配位置的过程,通过地址对位置描述的要素建立坐标点与地址的一致性。描述地址有许多形式,从通用的门牌号码、街道名称的地址格式,到其它可行的位置描述信息,如邮政区划代码或人口普查编号。地址包括任意可区别地方位置的信息。
REST API的地理编码服务资源是一个地理编码(定位)服务。资源提供与地理编码相关的基本信息,如服务描述、地址字段、空间参考和位置属性。
地理编码服务资源支持2种操作:
查找候选地址 - 返回基于地址和位置的候选地址列表。
反相地理编码 - 返回的的所有地址字段涉及反相地理编码地址以及它的确切位置信息。
资源层次结构
参数表
参数
详细信息
f
描述: 返回格式。默认返回格式是htm
值: html | json
用户示例
示例1: 在sampleserver1上"ESRI_Geocode_USA"地理编码服务的URL。
http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Locators/ESRI_Geocode_USA/GeocodeServer
JSON响应语法
{
"serviceDescription" : "",
"addressFields": [
{"name" : "", "alias" : "", "required" : , "type" : ""},
{"name" : "", "alias" : "", "required" : , "type" : ""}
],
"candidateFields": [
{"name" : "", "alias" : "", "type" : ""},
{"name" : "", "alias" : "", "type" : ""}
],
"intersectionCandidateFields": [
{"name" : "", "alias" : "", "type" : ""},
{"name" : "", "alias" : "", "type" : ""}
],
"spatialReference" : {},
"locatorProperties": {
"" : "",
"" : ""
}
}
JSON响应示例
{
"serviceDescription" : "Test Geocode Service Description",
"addressFields": [
{"name" : "Street", "alias" : "Street or Intersection", "required" : true, "type" : "esriFieldTypeString"},
{"name" : "Zone", "alias" : "Zip Code", "required" : false, "type" : "esriFieldTypeString"}
],
"candidateFields": [
{"name" : "Score", "alias" : "", "type" : "esriFieldTypeSmallInteger"},
{"name" : "StreetName", "alias" : "", "type" : "esriFieldTypeString"}
],
"intersectionCandidateFields": [
{"name" : "Score", "alias" : "", "type" : "esriFieldTypeSmallInteger"},
{"name" : "StreetName1", "alias" : "", "type" : "esriFieldTypeString"}
],
"spatialReference" : {"wkid" : 4326},
"locatorProperties": {
"MinimumCandidateScore" : "10",
"SideOffsetUnits" : "ReferenceDataUnits",
"SpellingSensitivity" : "80",
"MinimumMatchScore" : "60",
"IntersectionConnectors" : "& | @"
}
}