Bladeren bron

添加求交集的精度

gushoubang 11 maanden geleden
bovenliggende
commit
d6cafdc027

+ 2 - 1
onemap-modules/onemap-analyse/src/main/resources/mapper/oracle/vector/CreateUtilsDBMapper.xml

@@ -71,8 +71,9 @@
 
     <insert id="intersectionTableWkt">
         CREATE TABLE "${newTableName}" AS
-        SELECT id, public.ST_Intersection(inTbale.geom, public.st_geomfromewkt(#{ewkt})) AS geom
+        SELECT id, public.ST_Intersection(inTbale.geom, public.st_geomfromewkt(#{ewkt}),0.00001) AS geom
         FROM "${tableName}" inTbale
+        AND NOT public.ST_IsEmpty(public.ST_Intersection(inTbale.geom, public.st_geomfromewkt(#{ewkt}),0.00001))
         WHERE public.ST_Intersects(inTbale.geom, public.st_geomfromewkt(#{ewkt}))
         <if test="tableIds != null and tableIds.size() > 0">
             AND inTbale.id::VARCHAR IN