[postgis-devel] probe_geometry_columns()
strk
strk at keybit.net
Fri Jun 4 05:32:35 PDT 2004
On Fri, Jun 04, 2004 at 12:54:46AM +0000, Carl Anderson wrote:
> On 06/03/2004 12:27:18 PM, Paul Ramsey wrote:
> >You'll have to hand-enter the appropriate geometry_columns entry for
> >your newly transferred table. Failing that, pgsql2shp, shp2pgsql will
> >also work, though potentially with some mangling due to the
> >limitations of shape format.
> >
>
> Paul,
> That REALLY scares me, users directly editing geometry_columns.
>
> how about a function
> register_geometry_column (schema,table,column)
>
> That does the insert (detecting the existing SRID and dimension and
> geometry type from teh existing table) followed by a call to
> update_geometry_stats(schema,table,column).
I've added a probe_geometry_columns() in current CVS.
It is able to probe all values but 3d flag, which defaults to '2'.
It will INSERT INTO geometry_columns skipping probes that would
conflict with already existing records (due to primary key constraint).
If you 'suspect' your records to be bogus, you'd better backup
your geometry_columns, delete from it and probe...
It will report the number of records 'appended'.
Please let me know about any issues you see with this.
--strk;
More information about the postgis-devel
mailing list