gushoubang 11 сар өмнө
parent
commit
83a7b92458

+ 2 - 2
onemap-modules/onemap-analyse/src/main/java/com/onemap/analyse/controller/analyse/RasterController.java

@@ -18,13 +18,13 @@ public class RasterController {
     @GetMapping("/dsm")
     @Slave
     public RequestResult getDsm(@RequestParam(value = "geom") String geom, @RequestParam(value = "type") String type) {
-        return RequestResult.success(iRasterService.getValue("vector.\"RASTER_DSM\"", geom, type));
+        return RequestResult.success(iRasterService.getValue("vector.\"RASTER_DEM_BP\"", geom, type));
     }
 
     @GetMapping("/slope")
     @Slave
     public RequestResult getSlope(@RequestParam(value = "geom") String geom, @RequestParam(value = "type") String type) {
-        return RequestResult.success(iRasterService.getValue("vector.\"RASTER_SLOPE\"", geom, type));
+        return RequestResult.success(iRasterService.getValue("vector.\"RASTER_SLOP_BP\"", geom, type));
     }
 
     @PostMapping("/cutFill")

+ 4 - 4
onemap-modules/onemap-analyse/src/main/resources/mapper/oracle/raster/RasterMapper.xml

@@ -3,7 +3,7 @@
 
 <mapper namespace="com.onemap.analyse.mapper.raster.RasterMapper">
     <select id="getAveValue" resultType="Double">
-        WITH poly AS (SELECT public.ST_GeomFromEWKT(#{geomWkt}) AS geom)
+        WITH poly AS (SELECT PUBLIC.st_transform(public.ST_GeomFromEWKT(#{geomWkt}),3857) AS geom)
         SELECT AVG((gv).val) AS avg_dsm
         FROM (SELECT public.st_clip(rast, 1, geom, false) AS clipped_rast
               FROM ${tableName},
@@ -13,7 +13,7 @@
         WHERE (gv).val IS NOT NULL;
     </select>
     <select id="getMaxValue" resultType="Double">
-        WITH poly AS (SELECT public.ST_GeomFromEWKT(#{geomWkt}) AS geom)
+        WITH poly AS (SELECT PUBLIC.st_transform(public.ST_GeomFromEWKT(#{geomWkt}),3857) AS geom)
         SELECT MAX((gv).val) AS max_dsm
         FROM (SELECT public.st_clip(rast, 1, geom, false) AS clipped_rast
               FROM ${tableName},
@@ -23,7 +23,7 @@
         WHERE (gv).val IS NOT NULL;
     </select>
     <select id="getMinValue" resultType="Double">
-        WITH poly AS (SELECT public.ST_GeomFromEWKT(#{geomWkt}) AS geom)
+        WITH poly AS (SELECT PUBLIC.st_transform(public.ST_GeomFromEWKT(#{geomWkt}),3857) AS geom)
         SELECT MIN((gv).val) AS min_dsm
         FROM (SELECT public.st_clip(rast, 1, geom, false) AS clipped_rast
               FROM ${tableName},
@@ -34,7 +34,7 @@
     </select>
 
     <select id="getAllValue" resultType="map">
-        WITH poly AS (SELECT public.ST_GeomFromEWKT(#{geomWkt}) AS geom)
+        WITH poly AS (SELECT PUBLIC.st_transform(public.ST_GeomFromEWKT(#{geomWkt}),3857) AS geom)
         SELECT MIN((gv).val) AS min, MAX((gv).val) AS max, AVG((gv).val) AS avg
         FROM (SELECT public.st_clip(rast, 1, geom, false) AS clipped_rast
               FROM ${tableName},