|
@@ -55,11 +55,25 @@
|
|
|
DROP TABLE IF EXISTS "${temporaryTable}";
|
|
|
</insert>
|
|
|
|
|
|
- <insert id="differenceTableWkt">
|
|
|
- CREATE TABLE "${newTableName}" AS
|
|
|
+<!-- <insert id="differenceTableWkt">-->
|
|
|
+<!-- CREATE TABLE "${newTableName}" AS-->
|
|
|
+<!-- SELECT id, public.ST_Difference(inTbale.geom, public.st_geomfromewkt(#{ewkt})) AS geom-->
|
|
|
+<!-- FROM "${tableName}" inTbale-->
|
|
|
+<!-- WHERE NOT public.ST_IsEmpty(public.ST_Difference(inTbale.geom, public.st_geomfromewkt(#{ewkt})))-->
|
|
|
+<!-- <if test="tableIds != null and tableIds.size() > 0">-->
|
|
|
+<!-- AND inTbale.id::VARCHAR IN-->
|
|
|
+<!-- <foreach collection="tableIds" item="tableId" open="(" close=")" separator=",">-->
|
|
|
+<!-- #{tableId}-->
|
|
|
+<!-- </foreach>-->
|
|
|
+<!-- </if>-->
|
|
|
+<!-- ;-->
|
|
|
+<!-- </insert>-->
|
|
|
+
|
|
|
+ <insert id="differenceTableWkt" timeout="60">
|
|
|
+ CREATE TABLE vector."${newTableName}" AS
|
|
|
SELECT id, public.ST_Difference(inTbale.geom, public.st_geomfromewkt(#{ewkt})) AS geom
|
|
|
- FROM "${tableName}" inTbale
|
|
|
- WHERE NOT public.ST_IsEmpty(public.ST_Difference(inTbale.geom, public.st_geomfromewkt(#{ewkt})))
|
|
|
+ FROM vector."${tableName}" inTbale
|
|
|
+ WHERE 1=1
|
|
|
<if test="tableIds != null and tableIds.size() > 0">
|
|
|
AND inTbale.id::VARCHAR IN
|
|
|
<foreach collection="tableIds" item="tableId" open="(" close=")" separator=",">
|
|
@@ -67,6 +81,8 @@
|
|
|
</foreach>
|
|
|
</if>
|
|
|
;
|
|
|
+ DELETE FROM vector."${newTableName}"
|
|
|
+ WHERE public.ST_IsEmpty(geom);
|
|
|
</insert>
|
|
|
|
|
|
<insert id="intersectionTableWkt">
|