|
@@ -1,11 +1,13 @@
|
|
|
package com.onemap.analyse.service.impl;
|
|
|
|
|
|
+import com.fasterxml.jackson.core.JsonProcessingException;
|
|
|
import com.onemap.analyse.domain.vo.RawTableLengthVo;
|
|
|
import com.onemap.analyse.domain.vo.RawTableVo;
|
|
|
import com.onemap.analyse.domain.vo.TableNameIdsVo;
|
|
|
import com.onemap.analyse.domain.vo.TargetTableVo;
|
|
|
import com.onemap.analyse.mapper.vector.TableDataMapper;
|
|
|
import com.onemap.analyse.service.ITableDateService;
|
|
|
+import com.onemap.analyse.utils.JsonUtils;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
@@ -59,8 +61,7 @@ public class TableDateServiceImpl implements ITableDateService {
|
|
|
|
|
|
@Override
|
|
|
public void delInIds(String tableName, List<String> ids) {
|
|
|
- if (ids.size() != 0)
|
|
|
- tableDataMapper.delInIds(tableName, ids);
|
|
|
+ if (ids.size() != 0) tableDataMapper.delInIds(tableName, ids);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -92,11 +93,22 @@ public class TableDateServiceImpl implements ITableDateService {
|
|
|
* @param tableName
|
|
|
* @param minArea 小于该面积的地块将被删除
|
|
|
* @param elongationRatio 面积 (A) 和周长 (P) 之间的比率 (T = 4π(A/P²)) T小于该值的地块将被删除
|
|
|
- * https://pro.arcgis.com/zh-cn/pro-app/2.9/help/data/validating-data/polygon-sliver.htm
|
|
|
+ * https://pro.arcgis.com/zh-cn/pro-app/2.9/help/data/validating-data/polygon-sliver.htm
|
|
|
*/
|
|
|
@Override
|
|
|
public void delElongatedPolygon(String tableName, float minArea, float elongationRatio) {
|
|
|
- tableDataMapper.delElongatedPolygon(tableName, minArea, elongationRatio);
|
|
|
+ tableDataMapper.delElongatedPolygon(tableName, minArea, elongationRatio);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 删除多边形中的小角度
|
|
|
+ *
|
|
|
+ * @param map {"功能": "去除多边形尾巴","输入表": "vector.\"smallAngle\"", "输出表": "vector.\"result\"","容差": 0.01,"去除平直线上的顶点": "否" }
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public void delSmallAnglePolygon(Map<String, Object> map) throws JsonProcessingException {
|
|
|
+ String jsonArg = JsonUtils.toJson(map);
|
|
|
+ tableDataMapper.delSmallAnglePolygon(jsonArg);
|
|
|
}
|
|
|
|
|
|
@Override
|