我的github
posts - 3243,  comments - 42,  views - 158万

ArcGIS Server从入门到精通

生产环境的部署

测试环境的部署

开发环境的部署

ArcGIS Server类似于一个Tomcat服务器或者是Jetty服务器,它可以和它们同时运行 发布服务接口 如REST服务 Feature Service服务 WMS服务 Mapping服务。。矢量服务 栅格服务 等等。

如何获取Fields?:

MapService:https://developers.arcgis.com/rest/services-reference/map-service.htm

REST Domain查询&REST Fields查询

2.查询图层属性字段:/arcgis/rest/services/LightweightProduct/轻量级管网产品/MapServer/layers?f=pjson

 

 

 

https://developers.arcgis.com/rest/services-reference/all-layers-and-tables.htm

https://developers.arcgis.com/labs/rest/search-for-an-address/

Search for an address

Overview

You will learn: how to find addresses and places with the ArcGIS World Geocoding Service.

The ArcGIS World Geocoding Service can find addresses, places, convert addresses to coordinates, and perform batch geocoding. If you would like to create an application that can find the coordinates (latitude and longitude) for one or more addresses, you can use the ArcGIS REST API to call the findAddressCandidates operation. All you need to do is pass in an address e.g. "380 New York St., Redlands, CA" and the service will return a set of candidates. Once you have candidates, you can add them to a map, create a route, or integrate them further into your application. You can also geocode many addresses at once with the geocodeAddresses operation. To learn more about the capabilities of the geocoding service, please visit the documentation.

In this tutorial you will use the ArcGIS REST API to access the ArcGIS World Geocoding Service to find the coordinates for an address.

Before you begin

Install Postman to execute HTTP requests. Go to this tutorial if you need an access token.

Steps

Create a request to access the geocoding service

  1. Open Postman and click [+] in the tab bar to create a new request.

  2. In the new tab, set the following:

    • HTTP Method: GET
    • Request URL: https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates

Add parameters to define the address and data fields to return

  1. Click on Params next to the URL and the following:

     
    • fjson
    • singleLine4730 Crystal Springs Dr, Los Angeles, CA 90027
    • outFieldsMatch_addr,Addr_type

Execute the request to geocode the address and get the coordinate candidates

  1. Click Send to run the request.

  2. In the response window, click Pretty > JSON and it should look something like this:

    {
        "spatialReference": {
            "wkid": 4326,
            "latestWkid": 4326
        },
        "candidates": [
            {
                "address": "4730 Crystal Springs Dr, Los Angeles, California, 90027",
                "location": {
                    "x": -118.27393677823306,
                    "y": 34.123473000000004
                },
                "score": 100,
                "attributes": {
                    "Match_addr": "4730 Crystal Springs Dr, Los Angeles, California, 90027",
                    "Addr_type": "PointAddress"
                },
                "extent": {
                    "xmin": -118.27486,
                    "ymin": 34.122473000000006,
                    "xmax": -118.27285999999999,
                    "ymax": 34.124473000000002
                }
            },
            {
                "address": "4730 Crystal Springs Rd, Los Angeles, California, 90027",
                "location": {
                    "x": -118.29234632205821,
                    "y": 34.140621986664307
                },
                "score": 98.040000000000006,
                "attributes": {
                    "Match_addr": "4730 Crystal Springs Rd, Los Angeles, California, 90027",
                    "Addr_type": "StreetAddress"
                },
                "extent": {
                    "xmin": -118.29334632205821,
                    "ymin": 34.139621986664309,
                    "xmax": -118.2913463220582,
                    "ymax": 34.141621986664305
                }
            }
        ]
    }
    
  3. Go to the top of the response and find the spatialReference and candidates properties. The spatialReference is 4326 and tells you that the coordinates given in candidates will be latitude/longitude coordinates (y/x). This is the default spatial reference.

     
    {
        "spatialReference": {
            "wkid": 4326,
            "latestWkid": 4326
        },
    ...
    
  4. Find the candidates property. This is an array of possible matches for the address. Each match consists of:

     
    • address: The address of this match.
    • location: The x/y coordinates of this match. Note that x is longitude and y is latitude.
    • score: The confidence level of the geocoder in this match, on a scale of 1-100.
    • attributes: Any additional fields requested by the outFields parameter.
    • extent: a rectangular bounding box around the location given as a pair of x/y coordinates.
     "candidates": [
         {
             "address": "4730 Crystal Springs Dr, Los Angeles, California, 90027",
             "location": {
                 "x": -118.27393677823306,
                 "y": 34.123473000000004
             },
             "score": 100,
             "attributes": {
                 "Match_addr": "4730 Crystal Springs Dr, Los Angeles, California, 90027",
                 "Addr_type": "PointAddress"
             },
             "extent": {
                 "xmin": -118.27486,
                 "ymin": 34.122473000000006,
                 "xmax": -118.27285999999999,
                 "ymax": 34.124473000000002
             }
         },
       ...
    
  1. In Postman click Code below the Send button. Select a programming language and use Postman to generate sample code for your application to run this request.

Congratulations, you're done!

You have successfully found a set of candidates with coordinates for an address.

Challenge

Use geocoding suggestions

You can use the Esri World Geocoding Service to build an auto-completing, suggestion-based UX by adding a special parameter called magicKey to findAddressCandidates instead of an address. To obtain a value for magicKey, refer to the documentation for the suggest endpoint.

Try bulk geocoding

If you need to geocode many addresses in bulk, you can use the geocode addresses endpoint.

Find latitude/longitude of intersections

findAddressCandidates can also return the coordinates of intersections if the address is in the proper format. For more information, see searching for intersections and try changing the value of singleLine to "Grasswood Ave & Cliffside Dr, Malibu, CA, 90265, USA"

posted on   XiaoNiuFeiTian  阅读(871)  评论(0编辑  收藏  举报
编辑推荐:
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
阅读排行:
· 分享4款.NET开源、免费、实用的商城系统
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
· 上周热点回顾(2.24-3.2)
历史上的今天:
2019-10-12 基于OpenCV/TensorFlow的手写MNIST文字匹配
2019-10-12 随机游走 点云匹配
2018-10-12 一种基于图像特征的图像相似性评价
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示