首页 / 浏览问题 / WebGIS / 问题详情
表面分析region
43EXP 2021年09月06日
表面分析,如提取等值线,region可以设置为某个面数据集吗?比如地图面数据集,如何设置谢谢!

 function surfaceAnalystProcess() {
        region = L.polygon([
            [4010338, 0],
            [4010338, 1063524],
            [3150322, 1063524],
            [3150322, 0]
        ]);

1个回答

clipRegion是一个面对象,不能直接设置为数据集
1,000EXP 2021年09月06日
那有什么方法可以用面裁剪等值线吗

您将clipRegion设置为想要的面对象就可以了,https://iclient.supermap.io/web/apis/leaflet.html相应的api都有介绍,您可以参考一下

将clipDatasetName设置为面数据集后没反应呀
您是直接在SurfaceAnalystParametersSetting设置的,还是用的new SuperMap.ClipParameter(options)这个呢
function surfaceAnalystProcess() {

        surfaceAnalystParameters = new SuperMap.DatasetSurfaceAnalystParameters({

            extractParameter: new SuperMap.SurfaceAnalystParametersSetting({

                datumValue: 1,

                interval: 1,

                resampleTolerance: 0,

                smoothMethod: SuperMap.SmoothMethod.BSPLINE,

                smoothness: 2,

                clipDatasetName: "ChinaRegion@China",

            }),

直接设置的
SurfaceAnalystParametersSetting中没有clipDatasetName这个参数,只有clipRegion参数,需要设置面对象,不能直接写数据集
function surfaceAnalystProcess() {

        {

            var CR = new SuperMap.ClipParameter({

                  clipDatasetName:"ChinaRegion@China"

})

        }

        surfaceAnalystParameters = new SuperMap.DatasetSurfaceAnalystParameters({

            extractParameter: new SuperMap.SurfaceAnalystParametersSetting({

                datumValue: 1,

                interval: 1,

                resampleTolerance: 0,

                smoothMethod: SuperMap.SmoothMethod.BSPLINE,

                smoothness: 2,

                clipRegion:CR

            }),

您好,请问这样写对吗,没有报错,可是没有裁剪
...