12.07.2015 Views

PostGIS 1.5.8 Manual - Fedora Project Packages GIT repositories

PostGIS 1.5.8 Manual - Fedora Project Packages GIT repositories

PostGIS 1.5.8 Manual - Fedora Project Packages GIT repositories

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>PostGIS</strong> <strong>1.5.8</strong> <strong>Manual</strong>63 / 310DescriptionEnsures geometry columns have appropriate spatial constraints and exist in the geometry_columns table. In particular, thismeans that every geometry column belonging to a table has at least three constraints:• enforce_dims_the_geom - ensures every geometry has the same dimension (see ST_NDims)• enforce_geotype_the_geom - ensures every geometry is of the same type (see GeometryType)• enforce_srid_the_geom - ensures every geometry is in the same projection (see ST_SRID)If a table oid is provided, this function tries to determine the srid, dimension, and geometry type of all geometry columns in thetable, adding contraints as necessary. If successful, an appropriate row is inserted into the geometry_columns table, otherwise,the exception is caught and an error notice is raised describing the problem.If the oid of a view is provided, as with a table oid, this function tries to determine the srid, dimension, and type of allthe geometries in the view, inserting appropriate entries into the geometry_columns table, but nothing is done to enforcecontraints.The parameterless variant is a simple wrapper for the parameterized variant that first truncates and repopulates the geometry_columnstable for every spatial table and view in the database, adding spatial contraints to tables where appropriate. It returnsa summary of the number of geometry columns detected in the database and the number that were inserted into the geometry_columnstable. The parameterized version simply returns the number of rows inserted into the geometry_columnstable.Availability: 1.4.0ExamplesSELECT Populate_Geometry_Columns(’public.myspatial_table’::regclass);See AlsoProbe_Geometry_Columns7.2.16 Probe_Geometry_ColumnsProbe_Geometry_Columns — Scans all tables with <strong>PostGIS</strong> geometry constraints and adds them to the geometry_columnstable if they are not there.Synopsistext Probe_Geometry_Columns();DescriptionScans all tables with <strong>PostGIS</strong> geometry constraints and adds them to the geometry_columns table if they are not there. Alsogive stats on number of inserts and already present or possibly obsolete.NoteThis will usually only pick up records added by AddGeometryColumn() function. It will not scan views so views will needto be manually added to geometry_columns table.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!