Opened 13 years ago

Closed 13 years ago

#977 closed defect (fixed)

ValidateTopology: don't skip the Universal Face

Reported by: aperi2007 Owned by: strk
Priority: medium Milestone: PostGIS 2.0.0
Component: topology Version: master
Keywords: Cc:

Description

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.

Attachments (1)

patch_validate.zip (833 bytes ) - added by aperi2007 13 years ago.
Patch for ValidateTopology function and LoadTopology Regress Test

Download all attachments as: .zip

Change History (3)

by aperi2007, 13 years ago

Attachment: patch_validate.zip added

Patch for ValidateTopology function and LoadTopology Regress Test

comment:1 by strk, 13 years ago

Status: newassigned

comment:2 by strk, 13 years ago

Resolution: fixed
Status: assignedclosed

Fixed in r7233

Note: See TracTickets for help on using tickets.