| | |
| | | package com.se.simu.controller; |
| | | |
| | | import cn.hutool.json.JSONArray; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.se.simu.domain.dto.GeDb; |
| | | import com.se.simu.domain.dto.GeLayer; |
| | | import com.se.simu.domain.po.DataPo; |
| | | import com.se.simu.domain.po.SimuPo; |
| | | import com.se.simu.domain.vo.CreateSimuVo; |
| | |
| | | return fail(ex, null); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 使用空间范围查询 管点,管线,建筑物 3个图层,且每个图层的数量大于0,返回 true。 |
| | | */ |
| | | @ApiOperation(value = "降水范围校验") |
| | | @GetMapping("/rangeVerif") |
| | | public R<Object> rangeVerif(@RequestParam @ApiParam("最小X") Double minx, |
| | | @RequestParam @ApiParam("最小y") Double miny, |
| | | @RequestParam @ApiParam("最大X") Double maxx, |
| | | @RequestParam @ApiParam("最大y") Double maxy) { |
| | | try { |
| | | DataPo data = new DataPo(); |
| | | data.setMinx(minx); |
| | | data.setMiny(miny); |
| | | data.setMaxx(maxx); |
| | | data.setMaxy(maxy); |
| | | data.setEpsg(4326); |
| | | String token = gedbService.getToken(); |
| | | GeDb db = gedbService.connectGedb(token, data); |
| | | List<GeLayer> layers = gedbService.getLayers(token, db); |
| | | return success(gedbService.queryBboxCount(token,db, layers)); |
| | | } catch (Exception ex) { |
| | | return fail(ex, null); |
| | | } |
| | | } |
| | | } |