[postgis-users] identifying blank geometry fields
Stephen Woodbridge
woodbri at swoodbridge.com
Mon Nov 23 11:30:13 PST 2009
Did you try:
select count(*) from yourtable where the_geom is null;
delete from yourtable where the_geom is null:
-Steve
Bob Hume wrote:
>
> I loaded a shapefile into my Postgresql/Postgis table. I'm
> trying to put data in some records that appear to have no data and
> eventually delete records with no geometry data. One problem is that I
> can't seem to identify records with no geometry data. If I review the
> the_geom field for all records, there are several records that seem to
> be blank. Nothing is shown in the field when I do a listing of all
> fields and all records. However, using ST_Npoints shows, for example,
> 438 points for the “blank” record and St_IsValidReason says that it is a
> Valid Geometry. St_GeometryType says it is ST_MultiString. However,
> St_AsEWKT for the record is blank. It doesn't show any coordinates like
> the other records that do have data in the the_geom field. St_IsEmpty
> shows "f" for all records, including the ones that are apparently empty.
>
> So, it seems that the geometry data is missing, but it isn't.
>
> How can identify the records with apparently missing geometry
> data? Thanks for the advice.
>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
More information about the postgis-users
mailing list