移动端10 i iOS端缓冲区在有数据的情况下崩溃

0 投票
初始化数据 然后设置缓冲区参数 已知sourceRecordset有一条数据 运行之后会在

                bResult = [BufferAnalyst createBufferSourceRecordset:sourceRecordset ResultVector:recordDataSet BufferParam:bufferParam IsUnion:NO IsAttributeRetained:YES];

崩溃 代码如下

bufferParam = [[BufferAnalystParameter alloc]init];

                [bufferParam setLeftDistance:@"100"];

                [bufferParam setRightDistance:@"100"];

                [bufferParam setBufferRadiusUnit:Meter];

                [bufferParam setBufferEndType:FLAT];

                [bufferParam setSemicircleLineSegment:5];

                Datasets *dataset = [new_dataSoure datasets];

                DatasetVector *sourceDataSet = (DatasetVector*)[dataset getWithName:@"geo_important_area"];

                Recordset *sourceRecordset = [sourceDataSet queryWithFilter:@"name = '969-15'" Type:DYNAMIC];

                [m_mapControl.map.trackingLayer clear];

                if ([dataset contain:@"memeda"]) {

                    [dataset deleteName:@"memeda"];

                }

                DatasetVectorInfo *dataVectorInfo = [[DatasetVectorInfo alloc] init];

                [dataVectorInfo setDatasetType:REGION];

                [dataVectorInfo setName:@"memeda"];

                [dataVectorInfo setEncodeType:NONE];

                DatasetVector *recordDataSet = [dataset create:dataVectorInfo];

                BOOL bResult =  NO;

                bResult = [BufferAnalyst createBufferSourceRecordset:sourceRecordset ResultVector:recordDataSet BufferParam:bufferParam IsUnion:NO IsAttributeRetained:YES];

                if (bResult) {

                    NSLog(@"成功");

                }else{

                    NSLog(@"成功");

                }

运行项目sourceRecordset所得是1  依然崩溃
2月 24 分类:  46次浏览 | 用户: 随心iii 初出茅庐 (45 分)

2 个回答

0 投票
 
已采纳

Recordset *sourceRecordset = [sourceDataSet queryWithFilter:@"name = '969-15'" Type:DYNAMIC];这里的查询改为静态游标 Type:STATIC 试试看呢,另外你的数据集是什么坐标系的?

2月 24 用户: 周仕斌 名扬四海 (1,541 分)
采纳于 3月 4 用户:随心iii
ios移动端 空间分析 崩溃
0 投票
看了下代码和数据,使用的是面对象进行缓冲区分析,只能使用圆头缓冲类型,也就是需要设置[bufferParam setBufferEndType:ROUND];
3月 4 用户: 周仕斌 名扬四海 (1,541 分)
...