[postgis-users] Shapes to PG

Paul Ramsey pramsey at opengeo.org
Mon Jan 26 10:51:06 PST 2009


On Mon, Jan 26, 2009 at 10:45 AM, Neil.Young <Neil.Young at freenet.de> wrote:
>> select count(*) from my_table where the_geom is null;
> The first returns 0 of 5204 records.

So you have no null records.

>> select distinct st_isvalid(the_geom) from my_table; -- for OGC validity
>> etc.
> The output of the latter I don't understand (see screenshot)

Yeah, that's not the best way to test. Because you got back both 't'
and 'f', you have both valid and invalid geometries in your data. To
find out which ones are invalid, do

select gid from my_table where not st_isvalid(the_geom);

P.



More information about the postgis-users mailing list