¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.moon.server.controller.data; |
| | | |
| | | import com.moon.server.annotation.SysLog; |
| | | import com.moon.server.controller.all.BaseController; |
| | | import com.moon.server.entity.all.ResponseMsg; |
| | | import com.moon.server.helper.WebHelper; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * æ
æ ¼åæ |
| | | * @author WWW |
| | | * @date 2023-08-23 |
| | | */ |
| | | @Api(tags = "æ°æ®ç®¡ç\\æ
æ ¼åæ") |
| | | @RestController |
| | | @RequestMapping("/rasterAnalysis") |
| | | public class RasterAnalysisController extends BaseController { |
| | | @SysLog() |
| | | @ApiOperation(value = "æ¥è¯¢ç¹åæ") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "wkt", value = "ç¹WKT", dataType = "String", example = "") |
| | | }) |
| | | @GetMapping(value = "/selectByPoint") |
| | | public ResponseMsg<Object> selectByPoint(String wkt) { |
| | | try { |
| | | Map<String, Double> map = new HashMap<>(5); |
| | | map.put("å¾å±å", 0.0); |
| | | |
| | | return success(map); |
| | | } catch (Exception ex) { |
| | | return fail(ex, null); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ¥è¯¢çº¿åæ") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "wkt", value = "线WKT", dataType = "String", example = "") |
| | | }) |
| | | @GetMapping(value = "/selectByPolyline") |
| | | public ResponseMsg<Object> selectByPolyline(String wkt) { |
| | | try { |
| | | Map<String, List<Double>> map = new HashMap<>(5); |
| | | List<Double> list = new ArrayList<>(); |
| | | list.add(0.0); |
| | | map.put("å¾å±å", list); |
| | | |
| | | return success(map); |
| | | } catch (Exception ex) { |
| | | return fail(ex, null); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "æ¥è¯¢é¢åæ") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "wkt", value = "é¢WKT", dataType = "String", example = "") |
| | | }) |
| | | @GetMapping(value = "/selectByPolygon") |
| | | public ResponseMsg<Object> selectByPolygon(String wkt) { |
| | | try { |
| | | Map<String, Double> map = new HashMap<>(5); |
| | | map.put("å¾å±å", 0.0); |
| | | |
| | | return success(map); |
| | | } catch (Exception ex) { |
| | | return fail(ex, null); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "ä¸è½½ç¹åæ") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "wkt", value = "ç¹WKT", dataType = "String", example = "") |
| | | }) |
| | | @RequestMapping(value = "/downloadByPoint") |
| | | public void downloadByPoint(String wkt, HttpServletRequest req, HttpServletResponse res) { |
| | | try { |
| | | // ... |
| | | |
| | | String filePath = "çææä»¶çè·¯å¾"; |
| | | WebHelper.download(filePath, "æä»¶å", res); |
| | | } catch (Exception ex) { |
| | | log.error(ex.getMessage(), ex); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "ä¸è½½çº¿åæ") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "wkt", value = "线WKT", dataType = "String", example = "") |
| | | }) |
| | | @RequestMapping(value = "/downloadByPolyline") |
| | | public void downloadByPolyline(String wkt, HttpServletRequest req, HttpServletResponse res) { |
| | | try { |
| | | // ... |
| | | |
| | | String filePath = "çææä»¶çè·¯å¾"; |
| | | WebHelper.download(filePath, "æä»¶å", res); |
| | | } catch (Exception ex) { |
| | | log.error(ex.getMessage(), ex); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "ä¸è½½é¢åæ") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "wkt", value = "é¢WKT", dataType = "String", example = "") |
| | | }) |
| | | @RequestMapping(value = "/downloadByPolygon") |
| | | public void downloadByPolygon(String wkt, HttpServletRequest req, HttpServletResponse res) { |
| | | try { |
| | | // ... |
| | | |
| | | String filePath = "çææä»¶çè·¯å¾"; |
| | | WebHelper.download(filePath, "æä»¶å", res); |
| | | } catch (Exception ex) { |
| | | log.error(ex.getMessage(), ex); |
| | | } |
| | | } |
| | | } |