traceUp


URI

<networkDataName_uri>/traceup[.<format>]

支持的方法

GETHEAD

父资源

networkDataName

介绍

traceUp 资源表示上游追踪分析,对 traceUp 执行 GET 请求,可查找给定弧段或节点的上游弧段和结点。

支持的方法:

支持的表述格式:RJSON、JSON、HTML、XML、FlatGeobuf。

资源层次

HTTP 请求方法

对如下 URI 执行 HTTP 请求,以 rjson 输出格式为例加以说明,其中,supermapiserver 是服务器名。

http://supermapiserver:8090/iserver/services/transportationAnalyst-facilityNet/rest/networkanalyst/WaterNet%40FacilityNet/traceup.rjson

GET 请求

查找给定弧段或节点的上游弧段、节点。

请求参数

对 traceUp 资源执行 GET 请求,需要在 URI 中包含一些参数,如下:

名称 类型 含义
edgeID int 【与nodeID必填一项】需查找上游设施的弧段 ID 。
nodeID int 【与edgeID必填一项】需查找上游设施的结点 ID 。
weightName String 权重字段,默认为 SMLENGTH。
isUncertainDirectionValid boolean 选择是,表示不确定流向有效,遇到不确定流向时分析继续进行;选择否,表示不确定流向无效,遇到不确定流向将停止在该方向上继续查找。
withIndex boolean 当使用 FlatGeobuf 表述时该参数可选。表示返回的表述为 FlatGeobuf 的结果是否包含空间索引,默认为true。
returnFeatures boolean 否返回结果要素的详细描述信息。若为 false,只返回结果要素的 ID 集合。

响应结构

执行上有追踪分析功能,返回的操作结果表述的结构如下:

字段 类型 说明
cost double 分析结果中的耗费。
edges int[] 分析结果弧段 ID 集合。
edgesFeatures Feature[] 分析结果弧段详细描述信息。
nodes int[] 分析结果中的结点 ID 集合。
nodesFeature Feature[] 分析结果中的结点要素的详细描述信息。

响应示例

对示范数据 WaterNet@FacilityNet 数据集执行上游追踪分析,即对如下 URI 执行 GET 请求:

http://supermapiserver:8090/iserver/services/transportationAnalyst-facilityNet/rest/networkanalyst/WaterNet@FacilityNet/traceup.rjson?nodeID=1&isUncertainDirectionValid=true&returnFeatures=true&weightName=SMLENGTH

分析结果如下:

{

    "cost": 407511.4039991555,

    "edges": [

        2,

        2

    ],

    "edgesFeatures": [

        {

            "ID": 2,

            "fieldNames": [

                "SMID",

                "SMSDRIW",

                "SMSDRIN",

                "SMSDRIE",

                "SMSDRIS",

                "SMUSERID",

                "SMRESISTANCEA",

                "SMRESISTANCEB",

                "SMLENGTH",

                "SMTOPOERROR",

                "SMFNODE",

                "SMTNODE",

                "SMEDGEID",

                "SMGEOMETRYSIZE",

                "DIRECTION"

            ],

            "fieldValues": [

                "2",

                "-1130331.0",

                "3830856.5",

                "-947728.25",

                "3791757.5",

                "3331",

                "1.0",

                "1.0",

                "203755.70199957775",

                "1",

                "1",

                "7",

                "2",

                "1128",

                "2"

            ],

            "geometry": {

                "center": {

                    "x": -1032342.2904773944,

                    "y": 3830365.2858050363

                },

                "id": 2,

                "partTopo": null,

                "parts": [70],

                "points": [

                    {

                        "x": -1130330.9808985773,

                        "y": 3829150.748031182

                    },

                    {

                        "x": -1128234.7904652364,

                        "y": 3828104.009454467

                    },

                    {

                        "x": -1126255.1325870433,

                        "y": 3827191.2146250424

                    },

                    {

                        "x": -1122147.7608089868,

                        "y": 3826389.2424355363

                    },

                    {

                        "x": -1118996.4354008625,

                        "y": 3826349.818749717

                    },

                    {

                        "x": -1116633.011077165,

                        "y": 3825863.564885844

                    },

                    {

                        "x": -1112647.1905697775,

                        "y": 3823530.7633450227

                    },

                    {

                        "x": -1109404.8613276782,

                        "y": 3823699.9458534885

                    },

                    {

                        "x": -1104963.4434357388,

                        "y": 3824236.9347074623

                    },

                    {

                        "x": -1103095.9252104952,

                        "y": 3823521.1464944556

                    },

                    {

                        "x": -1101196.1951914872,

                        "y": 3822197.7651115553

                    },

                    {

                        "x": -1098288.6053171528,

                        "y": 3821027.851704959

                    },

                    {

                        "x": -1095832.1990014191,

                        "y": 3822578.9350222354

                    },

                    {

                        "x": -1093939.1641607706,

                        "y": 3823288.186820875

                    },

                    {

                        "x": -1089976.8523173246,

                        "y": 3823290.9789834903

                    },

                    {

                        "x": -1086937.4282131107,

                        "y": 3823449.774688991

                    },

                    {

                        "x": -1083262.9294079782,

                        "y": 3823133.4122251435

                    },

                    {

                        "x": -1080308.5822595612,

                        "y": 3822982.831215473

                    },

                    {

                        "x": -1078235.039456045,

                        "y": 3824107.3188307434

                    },

                    {

                        "x": -1074918.6602512866,

                        "y": 3824788.8615466543

                    },

                    {

                        "x": -1070455.5874198638,

                        "y": 3824919.863382298

                    },

                    {

                        "x": -1067245.7101189618,

                        "y": 3825697.427543476

                    },

                    {

                        "x": -1064819.9154555884,

                        "y": 3825925.5840080306

                    },

                    {

                        "x": -1062809.7304527196,

                        "y": 3826335.4115854916

                    },

                    {

                        "x": -1060473.8727126697,

                        "y": 3826355.6158234435

                    },

                    {

                        "x": -1058230.3011492807,

                        "y": 3828099.3509229296

                    },

                    {

                        "x": -1054952.5848149788,

                        "y": 3829489.731349712

                    },

                    {

                        "x": -1051625.6774255729,

                        "y": 3829968.265531121

                    },

                    {

                        "x": -1047545.0995276025,

                        "y": 3829673.290573323

                    },

                    {

                        "x": -1044249.4125167541,

                        "y": 3828829.0674762647

                    },

                    {

                        "x": -1042493.8496550785,

                        "y": 3828310.5953339576

                    },

                    {

                        "x": -1041165.826380332,

                        "y": 3828176.832533287

                    },

                    {

                        "x": -1039155.6566114768,

                        "y": 3828586.9595481395

                    },

                    {

                        "x": -1035916.0248894612,

                        "y": 3830686.606986321

                    },

                    {

                        "x": -1034604.3518378383,

                        "y": 3830856.5284370193

                    },

                    {

                        "x": -1032342.2904773944,

                        "y": 3830365.2858050363

                    },

                    {

                        "x": -1028336.6603973655,

                        "y": 3829557.9055637843

                    },

                    {

                        "x": -1022852.5477079265,

                        "y": 3827709.800223688

                    },

                    {

                        "x": -1018665.7468791755,

                        "y": 3827318.389545431

                    },

                    {

                        "x": -1016111.2374263101,

                        "y": 3827045.36609677

                    },

                    {

                        "x": -1014350.740225432,

                        "y": 3826425.973536659

                    },

                    {

                        "x": -1013228.427009851,

                        "y": 3824451.650495656

                    },

                    {

                        "x": -1009849.8947843194,

                        "y": 3822087.1597893927

                    },

                    {

                        "x": -1006175.5904245786,

                        "y": 3821770.687496191

                    },

                    {

                        "x": -1003343.990563439,

                        "y": 3822019.717379139

                    },

                    {

                        "x": -998459.1918259463,

                        "y": 3821868.487222808

                    },

                    {

                        "x": -996184.2784175407,

                        "y": 3819243.2520305067

                    },

                    {

                        "x": -993627.724074437,

                        "y": 3817038.830280837

                    },

                    {

                        "x": -991616.0285358524,

                        "y": 3815517.9332023095

                    },

                    {

                        "x": -989677.3802649409,

                        "y": 3813484.626188326

                    },

                    {

                        "x": -987073.9536520431,

                        "y": 3812299.242406637

                    },

                    {

                        "x": -985356.8102337797,

                        "y": 3812490.72093764

                    },

                    {

                        "x": -982632.4309204014,

                        "y": 3812836.136456593

                    },

                    {

                        "x": -981320.3740559996,

                        "y": 3813006.377378464

                    },

                    {

                        "x": -978793.3263470794,

                        "y": 3813239.7172276108

                    },

                    {

                        "x": -975107.3118963279,

                        "y": 3812720.595938644

                    },

                    {

                        "x": -971150.6936600255,

                        "y": 3812825.47120951

                    },

                    {

                        "x": -968125.6205907371,

                        "y": 3811357.451177546

                    },

                    {

                        "x": -966017.596189799,

                        "y": 3809942.458276486

                    },

                    {

                        "x": -963306.8848134733,

                        "y": 3808661.392554484

                    },

                    {

                        "x": -961428.3700631196,

                        "y": 3807743.219723986

                    },

                    {

                        "x": -960120.220576681,

                        "y": 3806083.3319280534

                    },

                    {

                        "x": -959135.954318631,

                        "y": 3802882.7570908335

                    },

                    {

                        "x": -956872.1270410249,

                        "y": 3800459.701882651

                    },

                    {

                        "x": -953579.0758960873,

                        "y": 3797785.9142398983

                    },

                    {

                        "x": -952010.252238556,

                        "y": 3796953.061588975

                    },

                    {

                        "x": -951309.5905573696,

                        "y": 3795261.474610711

                    },

                    {

                        "x": -950335.7374882551,

                        "y": 3792263.6138790464

                    },

                    {

                        "x": -948180.5669224514,

                        "y": 3791868.173033622

                    },

                    {

                        "x": -947728.2672767679,

                        "y": 3791757.5905491877

                    }

                ],

                "prjCoordSys": null,

                "style": null,

                "type": "LINE"

            }

        },

        null

    ],

    "nodes": [

        1,

        7

    ],

    "nodesFeatures": [

        {

            "ID": 1,

            "fieldNames": [

                "SMID",

                "SMX",

                "SMY",

                "SMLIBTILEID",

                "SMNODEID",

                "SMUSERID",

                "SMGEOMETRYSIZE",

                "NODETYPE",

                "FILTER"

            ],

            "fieldValues": [

                "1",

                "-1130330.9808985773",

                "3829150.748031182",

                "1",

                "1",

                "0",

                "16",

                "0",

                "true"

            ],

            "geometry": {

                "center": {

                    "x": -1130330.9808985773,

                    "y": 3829150.748031182

                },

                "id": 1,

                "partTopo": null,

                "parts": [1],

                "points": [{

                    "x": -1130330.9808985773,

                    "y": 3829150.748031182

                }],

                "prjCoordSys": null,

                "style": null,

                "type": "POINT"

            }

        },

        {

            "ID": 7,

            "fieldNames": [

                "SMID",

                "SMX",

                "SMY",

                "SMLIBTILEID",

                "SMNODEID",

                "SMUSERID",

                "SMGEOMETRYSIZE",

                "NODETYPE",

                "FILTER"

            ],

            "fieldValues": [

                "7",

                "-947728.2672767679",

                "3791757.5905491877",

                "1",

                "7",

                "0",

                "16",

                "0",

                "true"

            ],

            "geometry": {

                "center": {

                    "x": -947728.2672767679,

                    "y": 3791757.5905491877

                },

                "id": 7,

                "partTopo": null,

                "parts": [1],

                "points": [{

                    "x": -947728.2672767679,

                    "y": 3791757.5905491877

                }],

                "prjCoordSys": null,

                "style": null,

                "type": "POINT"

            }

        }

    ]

}

HEAD 请求

返回跟 GET 请求一样的 HTTP 响应头,但是没有响应实体。可以在不必传输整个响应内容的情况下,获取包含在响应消息头中的元数据信息。元数据信息包括媒体类型,字符编码,压缩编码,实体内容长度等。

HEAD 请求可以用来判断 traceUp 资源是否存在,或者客户端是否有权限访问 traceUp 资源。通过对加.<format>的 URI 执行 HEAD 请求,还可以快速判断 traceUp 资源是否支持<format>格式的表述。

请参见