判断sfmesh、meshgeom或box3d对象间的空间外包框关系。

语法

boolean ~(sfmesh A, sfmesh B);
boolean ~(meshgeom A, meshgeom B);
boolean ~(sfmesh A, box3d B);
boolean ~(box3d A, sfmesh B);

参数

参数名称描述
Asfmesh、meshgeom或box3d对象A。
Bsfmesh、meshgeom或box3d对象B。

描述

判断sfmesh、meshgeom或box3d对象3D外包框的空间关系,A包含B返回true,否则返回false。

示例

  • 示例一:
    -- ~(sfmesh, sfmesh)
    select count(*) from mesh_gist_test where '{"version" : 1, "root" : 0, "meshgeoms" : ["MESHGEOM(PATCH(INDEXSURFACE Z (VERTEX(307248.723802283 296449.440306073 6500.00004882812,307248.723802283 296449.440306073 100,307258.460240141 296449.440306073 6500.00004882812,307258.460240141 296449.440306073 100,307258.460240141 296474.440306263 6500.00004882812,307258.460240141 296474.440306263 100,307248.723802283 296474.440306263 6500.00004882812,307248.723802283 296474.440306263 100),INDEX((0,1,2),(3,2,1),(4,5,6),(7,6,5),(3,1,7),(7,5,3),(2,3,4),(5,4,3),(0,2,4),(4,6,0),(1,0,7),(6,7,0)))))"], "primitives" : [{"meshgeom" : 0}], "nodes" : [{"primitive" : 0}]}'::mesh ~ the_mesh;
    -------------------------------------
    1
  • 示例二:
    -- ~(meshgeom, meshgeom)
    select count(*) from meshgeom_gist_test where '{"version" : 1, "root" : 0, "meshgeoms" : ["MESHGEOM(PATCH(INDEXSURFACE Z (VERTEX(307248.723802283 296449.440306073 6500.00004882812,307248.723802283 296449.440306073 100,307258.460240141 296449.440306073 6500.00004882812,307258.460240141 296449.440306073 100,307258.460240141 296474.440306263 6500.00004882812,307258.460240141 296474.440306263 100,307248.723802283 296474.440306263 6500.00004882812,307248.723802283 296474.440306263 100),INDEX((0,1,2),(3,2,1),(4,5,6),(7,6,5),(3,1,7),(7,5,3),(2,3,4),(5,4,3),(0,2,4),(4,6,0),(1,0,7),(6,7,0)))))"], "primitives" : [{"meshgeom" : 0}], "nodes" : [{"primitive" : 0}]}'::mesh::meshgeom ~ the_meshgeom;
    -------------------------------------
    1
  • 示例三:
    -- ~(sfmesh, box3d)
    select count(*) from mesh_gist_test where the_mesh ~ st_3dmakebox('POINT(206126.22379756 290161.940316926 5249.99990997314)'::geometry,'POINT(226126.22379756 300161.940316926 7249.99990997314)'::geometry);
    -------------------------------------
    2
  • 示例四:
    -- ~(box3d, sfmesh)
    select count(*) from mesh_gist_test where st_3dmakebox('POINT(206126.22379756 290161.940316926 5249.99990997314)'::geometry,'POINT(226126.22379756 300161.940316926 7249.99990997314)'::geometry) ~ the_mesh;
    -------------------------------------
    0