[postgis-devel] [PostGIS] #977: ValidateTopology: don't skip the Universal Face
PostGIS
trac at osgeo.org
Sun May 22 13:23:28 PDT 2011
#977: ValidateTopology: don't skip the Universal Face
-----------------------+----------------------------------------------------
Reporter: aperi2007 | Owner: strk
Type: defect | Status: new
Priority: medium | Milestone: PostGIS 2.0.0
Component: topology | Version: trunk
Keywords: |
-----------------------+----------------------------------------------------
Hi,
testing the ValidateTopology I see it don't skip the UniverseFace.
The bug is in this code:
{{{
-- Now create a temporary table to construct all face geometries
-- for checking their consistency
EXECUTE 'CREATE TEMP TABLE face_check ON COMMIT DROP AS '
|| 'SELECT face_id, topology.ST_GetFaceGeometry('
|| quote_literal(toponame) || ', face_id) as geom, mbr FROM '
|| quote_ident(toponame) || '.face';
}}}
It don't skip the UniverseFace (face_id=0) in the face table. The
UniverseFace has geom=NULL so the GetFaceGeometry give an ISO sql/mm error
.
I guess the code can be patched with this :
{{{
-- Now create a temporary table to construct all face geometries
-- for checking their consistency
EXECUTE 'CREATE TEMP TABLE face_check ON COMMIT DROP AS '
|| 'SELECT face_id, topology.ST_GetFaceGeometry('
|| quote_literal(toponame) || ', face_id) as geom, mbr FROM '
|| quote_ident(toponame) || '.face'
|| ' WHERE face_id<>0;';
}}}
A attach the patch to this ticket.
Also I change the Validate Regress Test filling the
MBR geom field of the Face table that I notice was empty.
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/977>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-devel
mailing list