<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.16481" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=893093811-07082007>The only guaranteed way is to add the records in
geometry_columns manually. With a command something
like</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=893093811-07082007></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=893093811-07082007>INSERT INTO
geometry_columns(<BR>
f_table_catalog, f_table_schema, f_table_name, f_geometry_column,
<BR>
coord_dimension, srid, "type")<BR> VALUES ('', 'public',
'sometable',
'somegeomfield', <BR>
2, 4326, 'MULTIPOLYGON');</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=893093811-07082007></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=893093811-07082007>(where replace sometable, somegeomfield, 4326,
MULTIPOLYGON with your relevant case)</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=893093811-07082007></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=893093811-07082007>I was going to suggest using </SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=893093811-07082007></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=893093811-07082007>SELECT probe_geometry_columns();</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=893093811-07082007></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=893093811-07082007>But that only works I think if you have constraints on
those fields. It probably wouldn't hurt to add constraints on your
geometry fields at anyrate - of the form</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=893093811-07082007></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=893093811-07082007>ALTER TABLE sometable<BR> ADD CONSTRAINT
enforce_geotype_somegeomfield CHECK (geometrytype(somegeomfield) =
'MULTIPOLYGON'::text OR somegeomfield IS NULL);</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=893093811-07082007></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=893093811-07082007><SPAN class=893093811-07082007>ALTER
TABLE sometable ADD CONSTRAINT enforce_srid_somegeomfield CHECK
(srid(somegeomfield) = 4326);</SPAN></SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=893093811-07082007><SPAN
class=893093811-07082007></SPAN></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=893093811-07082007>where you replace sometable and somegeomfield and
the MULTIPOLYGON and 4326 with that relevant type and SRID, tablename
and geometry column name for your table.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=893093811-07082007></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=893093811-07082007>Then running </SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=893093811-07082007>SELECT probe_geometry_columns();</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=893093811-07082007></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=893093811-07082007>Would pick it up and add it.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=893093811-07082007></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=893093811-07082007>Hope that helps,</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=893093811-07082007>Regina</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=893093811-07082007></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=893093811-07082007></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=893093811-07082007></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=893093811-07082007></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=893093811-07082007></SPAN></FONT> </DIV><FONT face=Arial
color=#0000ff size=2></FONT><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B>
postgis-users-bounces@postgis.refractions.net
[mailto:postgis-users-bounces@postgis.refractions.net] <B>On Behalf Of
</B>Horacio Samaniego<BR><B>Sent:</B> Monday, August 06, 2007 7:17
PM<BR><B>To:</B> postgis-users@postgis.refractions.net<BR><B>Subject:</B>
[postgis-users] howto register an existing column
intogeometry_columns<BR></FONT><BR></DIV>
<DIV></DIV>I have been trying to understand exactly how this works...<BR><BR>How
to register an existing geometry column into geometry_columns so that its
accessible for geoprocessing.<BR><BR>I've unsuccessfully INSERTed the
corresponding info by hand into the geometry_columns. <BR><BR>The problem is the
following:<BR>I have successfully loaded two tables that I have also
successfully INTERSECTed using the && operator. Now thise has left me
with a new table where I have 2 geometry columns. The question is how do I
register these columns to the geometry_columns table so that I can see it
through some other app like QGis? I believe that some function similar to
addgeometrycolumns() should do this... but this does not update the
geometry_column... !? <BR><BR><BR><BR>here's an exerpt of by *new* table which I
am unable to access with
qgis<BR><BR><BR>
Table "public.roads_in_urban_or"<BR>
Column
|
Type | Modifiers
<BR>--------------------+-----------------------+-----------<BR> intersect_geometry
|
geometry
|
<BR> ogc_fid
|
integer
| <BR> wkb_geometry |
geometry
| <BR>....<BR clear=all><BR><BR>I apologize beforehand if this is a naive
question, but it wont hurt to document this in more depth as this is probably a
very common issue...<BR><BR>thank, <BR><BR>Horacio
Samaniego<BR><BR></BODY></HTML>
<HTML><BODY><P><hr size=1></P>
<P><STRONG>
The substance of this message, including any attachments, may be confidential, legally privileged and/or exempt from disclosure pursuant to Massachusetts law. It is intended solely for the addressee. If you received this in error, please contact the sender and delete the material from any computer.
</STRONG></P></BODY></HTML>