<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
Hello <br><br>I am trying to update the_geom in my table i use the following sql statement i receive error<br><br>update vertix set the_geom = GeometryFromText('point(select x from vertix || select y from vertix || select z from vertix)')<br><br>below is my table schema<br><br><br>CREATE TABLE vertix<br>(<br>  the_geom geometry,<br>  id integer,<br>  x numeric,<br>  y numeric,<br>  z numeric,<br>  newpoint geometry<br>)<br>WITH (OIDS=FALSE);<br>ALTER TABLE vertix OWNER TO postgres;<br><br><br>Kind regards<br><br><br><br><img alt=""><img alt=""><img alt=""><br><br><br><br>> From: postgis-users-request@postgis.refractions.net<br>> Subject: postgis-users Digest, Vol 92, Issue 6<br>> To: postgis-users@postgis.refractions.net<br>> Date: Sat, 6 Feb 2010 12:00:01 -0800<br>> <br>> Send postgis-users mailing list submissions to<br>>  postgis-users@postgis.refractions.net<br>> <br>> To subscribe or unsubscribe via the World Wide Web, visit<br>>      http://postgis.refractions.net/mailman/listinfo/postgis-users<br>> or, via email, send a message with subject or body 'help' to<br>>  postgis-users-request@postgis.refractions.net<br>> <br>> You can reach the person managing the list at<br>>  postgis-users-owner@postgis.refractions.net<br>> <br>> When replying, please edit your Subject line so it is more specific<br>> than "Re: Contents of postgis-users digest..."<br>> <br>> <br>> Today's Topics:<br>> <br>>    1. Re: [postgis-devel] Has anyone seen this before?<br>>       (Paragon Corporation)<br>>    2. Re: [postgis-devel] Has anyone seen this before?<br>>       (Paragon Corporation)<br>>    3. Re: [postgis-devel] Has anyone seen this before?<br>>       (Paragon Corporation)<br>>    4. Re: Union a very big Multipolygon table with self<br>>       intersections (Simon Greener)<br>>    5. Query for shapes completely within a circle (Jordan, Thomas)<br>>    6. Re: Query for shapes completely within a circle (Nicklas Av?n)<br>> <br>> <br>> ----------------------------------------------------------------------<br>> <br>> Message: 1<br>> Date: Fri, 5 Feb 2010 17:08:36 -0500<br>> From: "Paragon Corporation" <lr@pcorp.us><br>> Subject: Re: [postgis-users] [postgis-devel] Has anyone seen this<br>>     before?<br>> To: "'PostGIS Development Discussion'"<br>>    <postgis-devel@postgis.refractions.net><br>> Cc: 'PostGIS Users Discussion' <postgis-users@postgis.refractions.net><br>> Message-ID: <B6AEBDD6349F4785B14D2461EAF63E89@b><br>> Content-Type: text/plain;   charset="us-ascii"<br>> <br>> Further note:<br>> <br>> Doing an ST_IsEmpty on one of these monsters shows its not empty.<br>> <br>> ST_GeometryType(..) returns ST_Geometry<br>> <br>> and when I try to do an ST_Mem_Size on one, I hmm get this<br>> <br>>  ERROR:  lwgeom_size called with unknown-typed serialized geometry<br>> <br>> <br>> When try ST_IsValid get this<br>> <br>> ERROR:  Unknown geometry type: 0<br>> <br>>  <br>> I'm going to try to repeat the process of copy from good table to see if the<br>> problem disappears.  I suppose it could be disk corruption of some sort.<br>> <br>> Thanks,<br>> Regina<br>> -----Original Message-----<br>> From: postgis-devel-bounces@postgis.refractions.net<br>> [mailto:postgis-devel-bounces@postgis.refractions.net] On Behalf Of Paragon<br>> Corporation<br>> Sent: Friday, February 05, 2010 4:55 PM<br>> To: 'PostGIS Development Discussion'<br>> Subject: [postgis-devel] Has anyone seen this before?<br>> <br>> What would result in an UNKNOWN geometry type.  One of our clients is<br>> getting this error when they try to vacuum analyze their table.<br>> <br>> > NOTICE:  compute_serialized_box3d called on unknown type 0NOTICE:  <br>> > compute_serialized_box3d called on unknown type 0 ...<br>> <br>> On closer inspection -- I see that there are UNKNOWNs and those UNKNOWNS are<br>> not NULL but the ST_AsText looks blank viewed via psql<br>> <br>> <br>> select count(*),  GeometryType(the_geom) from badtable group by<br>> GeometryType(the_geom);  count | geometrytype<br>> -------+--------------<br>>  98483 | MULTIPOLYGON<br>>   1517 | UNKNOWN<br>> <br>> <br>> This is running on<br>> <br>> <br>> ----------------------------------------------------------------------------<br>> ----<br>>  POSTGIS="1.3.6" GEOS="3.2.0-CAPI-1.6.0" PROJ="Rel. 4.6.0, 21 Dec 2007"<br>> USE_STATS<br>> <br>> PostgreSQL 8.4.1 on x86_64-redhat-linux-gnu, compiled by GCC gcc (GCC) 4.1.2<br>> 20<br>> 071124 (Red Hat 4.1.2-42), 64-bit<br>> <br>> <br>> They say the table was created by doing a<br>> <br>> create table badtable as select * from goodtable order by addr_num_tlid<br>> limit 100000;<br>> <br>> <br>> the goodtable doesn't exhibit this bizarre behavior.  Not sure if this is a<br>> PostgreSQL bug or PostGIS bug.<br>> <br>> Any thoughts?<br>> <br>> <br>> Thanks,<br>> Regina<br>> <br>> <br>> _______________________________________________<br>> postgis-devel mailing list<br>> postgis-devel@postgis.refractions.net<br>> http://postgis.refractions.net/mailman/listinfo/postgis-devel<br>> <br>> <br>> <br>> <br>> ------------------------------<br>> <br>> Message: 2<br>> Date: Fri, 5 Feb 2010 17:29:50 -0500<br>> From: "Paragon Corporation" <lr@pcorp.us><br>> Subject: Re: [postgis-users] [postgis-devel] Has anyone seen this<br>>       before?<br>> To: "'PostGIS Users Discussion'"<br>>  <postgis-users@postgis.refractions.net>,  "'PostGIS Development<br>>        Discussion'" <postgis-devel@postgis.refractions.net><br>> Message-ID: <B25A55E3B1914773BF6CA20E99D15F14@b><br>> Content-Type: text/plain;    charset="us-ascii"<br>> <br>> Okay just tried this and the problem is reproducible.<br>> <br>> The goodtable<br>> select count(*),  GeometryType(the_geom) from goodtable<br>> group by GeometryType(the_geom)<br>> <br>> count    Geometry Type<br>> 174007   MULTIPOLYGON <br>> <br>> <br>> Repeat process:<br>> create table badtable as select * from goodtable order by addr_num_tlid<br>> limit 100000;<br>> <br>> Same bizarre result.  <br>> <br>> Even more bizzarre  - I can do this<br>> <br>> select GeometryType(the_geom) from ca1.ca_toscrub_hits_st_union1<br>> WHERE GeometryType(the_geom) = 'UNKNOWN'<br>> limit 1;<br>> <br>> But If I try to do this<br>> <br>> SELECT addr_num_tlid, GeometryType(the_geom) from<br>> ca1.ca_toscrub_hits_st_union1<br>> WHERE GeometryType(the_geom) = 'UNKNOWN'<br>> limit 1<br>> <br>> or this<br>> SELECT addr_num_tlid from ca1.ca_toscrub_hits_st_union1<br>> WHERE GeometryType(the_geom) = 'UNKNOWN'<br>> limit 1<br>> <br>> I get this error:<br>> <br>> ERROR:  invalid memory alloc request size 18446744073709551613<br>> <br>> Very puzzled Regina<br>> <br>> -----Original Message-----<br>> From: postgis-users-bounces@postgis.refractions.net<br>> [mailto:postgis-users-bounces@postgis.refractions.net] On Behalf Of Paragon<br>> Corporation<br>> Sent: Friday, February 05, 2010 5:09 PM<br>> To: 'PostGIS Development Discussion'<br>> Cc: 'PostGIS Users Discussion'<br>> Subject: Re: [postgis-users] [postgis-devel] Has anyone seen this before?<br>> <br>> Further note:<br>> <br>> Doing an ST_IsEmpty on one of these monsters shows its not empty.<br>> <br>> ST_GeometryType(..) returns ST_Geometry<br>> <br>> and when I try to do an ST_Mem_Size on one, I hmm get this<br>> <br>>  ERROR:  lwgeom_size called with unknown-typed serialized geometry<br>> <br>> <br>> When try ST_IsValid get this<br>> <br>> ERROR:  Unknown geometry type: 0<br>> <br>>  <br>> I'm going to try to repeat the process of copy from good table to see if the<br>> problem disappears.  I suppose it could be disk corruption of some sort.<br>> <br>> Thanks,<br>> Regina<br>> -----Original Message-----<br>> From: postgis-devel-bounces@postgis.refractions.net<br>> [mailto:postgis-devel-bounces@postgis.refractions.net] On Behalf Of Paragon<br>> Corporation<br>> Sent: Friday, February 05, 2010 4:55 PM<br>> To: 'PostGIS Development Discussion'<br>> Subject: [postgis-devel] Has anyone seen this before?<br>> <br>> What would result in an UNKNOWN geometry type.  One of our clients is<br>> getting this error when they try to vacuum analyze their table.<br>> <br>> > NOTICE:  compute_serialized_box3d called on unknown type 0NOTICE:  <br>> > compute_serialized_box3d called on unknown type 0 ...<br>> <br>> On closer inspection -- I see that there are UNKNOWNs and those UNKNOWNS are<br>> not NULL but the ST_AsText looks blank viewed via psql<br>> <br>> <br>> select count(*),  GeometryType(the_geom) from badtable group by<br>> GeometryType(the_geom);  count | geometrytype<br>> -------+--------------<br>>  98483 | MULTIPOLYGON<br>>   1517 | UNKNOWN<br>> <br>> <br>> This is running on<br>> <br>> <br>> ----------------------------------------------------------------------------<br>> ----<br>>  POSTGIS="1.3.6" GEOS="3.2.0-CAPI-1.6.0" PROJ="Rel. 4.6.0, 21 Dec 2007"<br>> USE_STATS<br>> <br>> PostgreSQL 8.4.1 on x86_64-redhat-linux-gnu, compiled by GCC gcc (GCC) 4.1.2<br>> 20<br>> 071124 (Red Hat 4.1.2-42), 64-bit<br>> <br>> <br>> They say the table was created by doing a<br>> <br>> create table badtable as select * from goodtable order by addr_num_tlid<br>> limit 100000;<br>> <br>> <br>> the goodtable doesn't exhibit this bizarre behavior.  Not sure if this is a<br>> PostgreSQL bug or PostGIS bug.<br>> <br>> Any thoughts?<br>> <br>> <br>> Thanks,<br>> Regina<br>> <br>> <br>> _______________________________________________<br>> postgis-devel mailing list<br>> postgis-devel@postgis.refractions.net<br>> http://postgis.refractions.net/mailman/listinfo/postgis-devel<br>> <br>> <br>> _______________________________________________<br>> postgis-users mailing list<br>> postgis-users@postgis.refractions.net<br>> http://postgis.refractions.net/mailman/listinfo/postgis-users<br>> <br>> <br>> <br>> <br>> ------------------------------<br>> <br>> Message: 3<br>> Date: Fri, 5 Feb 2010 17:37:22 -0500<br>> From: "Paragon Corporation" <lr@pcorp.us><br>> Subject: Re: [postgis-users] [postgis-devel] Has anyone seen this<br>>   before?<br>> To: "'PostGIS Users Discussion'"<br>>  <postgis-users@postgis.refractions.net>,  "'PostGIS Development<br>>        Discussion'" <postgis-devel@postgis.refractions.net><br>> Message-ID: <A078449A8E8B47CEBF2A65C1966B6485@b><br>> Content-Type: text/plain;    charset="us-ascii"<br>> <br>> It should be noted that for this table<br>> <br>> the_geom is the first field in the table and addr_num_tlid comes right after<br>> and is a varchar<br>> <br>> I can select any integer or bigint field fine, but selecting any text or<br>> varchar field results in the <br>> <br>> ERROR:  invalid memory alloc request size 18446744073709551613<br>>  <br>> <br>> -----Original Message-----<br>> From: postgis-users-bounces@postgis.refractions.net<br>> [mailto:postgis-users-bounces@postgis.refractions.net] On Behalf Of Paragon<br>> Corporation<br>> Sent: Friday, February 05, 2010 5:30 PM<br>> To: 'PostGIS Users Discussion'; 'PostGIS Development Discussion'<br>> Subject: Re: [postgis-users] [postgis-devel] Has anyone seen this before?<br>> <br>> Okay just tried this and the problem is reproducible.<br>> <br>> The goodtable<br>> select count(*),  GeometryType(the_geom) from goodtable group by<br>> GeometryType(the_geom)<br>> <br>> count    Geometry Type<br>> 174007   MULTIPOLYGON <br>> <br>> <br>> Repeat process:<br>> create table badtable as select * from goodtable order by addr_num_tlid<br>> limit 100000;<br>> <br>> Same bizarre result.  <br>> <br>> Even more bizzarre  - I can do this<br>> <br>> select GeometryType(the_geom) from ca1.ca_toscrub_hits_st_union1 WHERE<br>> GeometryType(the_geom) = 'UNKNOWN'<br>> limit 1;<br>> <br>> But If I try to do this<br>> <br>> SELECT addr_num_tlid, GeometryType(the_geom) from<br>> ca1.ca_toscrub_hits_st_union1<br>> WHERE GeometryType(the_geom) = 'UNKNOWN'<br>> limit 1<br>> <br>> or this<br>> SELECT addr_num_tlid from ca1.ca_toscrub_hits_st_union1 WHERE<br>> GeometryType(the_geom) = 'UNKNOWN'<br>> limit 1<br>> <br>> I get this error:<br>> <br>> ERROR:  invalid memory alloc request size 18446744073709551613<br>> <br>> Very puzzled Regina<br>> <br>> -----Original Message-----<br>> From: postgis-users-bounces@postgis.refractions.net<br>> [mailto:postgis-users-bounces@postgis.refractions.net] On Behalf Of Paragon<br>> Corporation<br>> Sent: Friday, February 05, 2010 5:09 PM<br>> To: 'PostGIS Development Discussion'<br>> Cc: 'PostGIS Users Discussion'<br>> Subject: Re: [postgis-users] [postgis-devel] Has anyone seen this before?<br>> <br>> Further note:<br>> <br>> Doing an ST_IsEmpty on one of these monsters shows its not empty.<br>> <br>> ST_GeometryType(..) returns ST_Geometry<br>> <br>> and when I try to do an ST_Mem_Size on one, I hmm get this<br>> <br>>  ERROR:  lwgeom_size called with unknown-typed serialized geometry<br>> <br>> <br>> When try ST_IsValid get this<br>> <br>> ERROR:  Unknown geometry type: 0<br>> <br>>  <br>> I'm going to try to repeat the process of copy from good table to see if the<br>> problem disappears.  I suppose it could be disk corruption of some sort.<br>> <br>> Thanks,<br>> Regina<br>> -----Original Message-----<br>> From: postgis-devel-bounces@postgis.refractions.net<br>> [mailto:postgis-devel-bounces@postgis.refractions.net] On Behalf Of Paragon<br>> Corporation<br>> Sent: Friday, February 05, 2010 4:55 PM<br>> To: 'PostGIS Development Discussion'<br>> Subject: [postgis-devel] Has anyone seen this before?<br>> <br>> What would result in an UNKNOWN geometry type.  One of our clients is<br>> getting this error when they try to vacuum analyze their table.<br>> <br>> > NOTICE:  compute_serialized_box3d called on unknown type 0NOTICE:  <br>> > compute_serialized_box3d called on unknown type 0 ...<br>> <br>> On closer inspection -- I see that there are UNKNOWNs and those UNKNOWNS are<br>> not NULL but the ST_AsText looks blank viewed via psql<br>> <br>> <br>> select count(*),  GeometryType(the_geom) from badtable group by<br>> GeometryType(the_geom);  count | geometrytype<br>> -------+--------------<br>>  98483 | MULTIPOLYGON<br>>   1517 | UNKNOWN<br>> <br>> <br>> This is running on<br>> <br>> <br>> ----------------------------------------------------------------------------<br>> ----<br>>  POSTGIS="1.3.6" GEOS="3.2.0-CAPI-1.6.0" PROJ="Rel. 4.6.0, 21 Dec 2007"<br>> USE_STATS<br>> <br>> PostgreSQL 8.4.1 on x86_64-redhat-linux-gnu, compiled by GCC gcc (GCC) 4.1.2<br>> 20<br>> 071124 (Red Hat 4.1.2-42), 64-bit<br>> <br>> <br>> They say the table was created by doing a<br>> <br>> create table badtable as select * from goodtable order by addr_num_tlid<br>> limit 100000;<br>> <br>> <br>> the goodtable doesn't exhibit this bizarre behavior.  Not sure if this is a<br>> PostgreSQL bug or PostGIS bug.<br>> <br>> Any thoughts?<br>> <br>> <br>> Thanks,<br>> Regina<br>> <br>> <br>> _______________________________________________<br>> postgis-devel mailing list<br>> postgis-devel@postgis.refractions.net<br>> http://postgis.refractions.net/mailman/listinfo/postgis-devel<br>> <br>> <br>> _______________________________________________<br>> postgis-users mailing list<br>> postgis-users@postgis.refractions.net<br>> http://postgis.refractions.net/mailman/listinfo/postgis-users<br>> <br>> <br>> _______________________________________________<br>> postgis-users mailing list<br>> postgis-users@postgis.refractions.net<br>> http://postgis.refractions.net/mailman/listinfo/postgis-users<br>> <br>> <br>> <br>> <br>> ------------------------------<br>> <br>> Message: 4<br>> Date: Sat, 06 Feb 2010 13:17:11 +1100<br>> From: "Simon Greener" <simon@spatialdbadvisor.com><br>> Subject: Re: [postgis-users] Union a very big Multipolygon table with<br>>  self intersections<br>> To: "PostGIS Users Discussion" <postgis-users@postgis.refractions.net><br>> Message-ID: <op.u7oomxuizbn0g9@spdba><br>> Content-Type: text/plain; charset=iso-8859-1; format=flowed; delsp=yes<br>> <br>> How about something like this:<br>> <br>> select id, ST_Union(ST_Accum(case when ST_IsValid(a.the_geom) = 't' then a.the_geom else st_buffer(a.the_geom,0) end) as the_geom<br>>    from (select id, the_geom<br>>            from <<table>><br>>            where the_geom is not null<br>>              and geometrytype(the_geom) != 'GEOMETRYCOLLECTION'<br>>          union all<br>>          SELECT gid, (ST_Dump(the_geom)).geom as the_geom<br>>            from <<table>><br>>            where the_geom is not null<br>>              and geometrytype(the_geom) = 'GEOMETRYCOLLECTION'<br>>          ) as a;<br>> <br>> The split based on GEOMETRYCOLLECTION is that when I first tested the STR indexed ST_Union I found that<br>> performance was affectedif the union set includes an mpoly.<br>> <br>> regards<br>> SImon<br>> On Fri, 05 Feb 2010 19:44:51 +1100, ibrahim saricicek <ibrahimsaricicek@gmail.com> wrote:<br>> <br>> > Hi;<br>> ><br>> > create a new geometry column<br>> ><br>> > use update table set new_column=st_buffer(the_geom,0). IsValid will return<br>> > true. Then try the union operation..<br>> ><br>> > IBO..<br>> ><br>> > On Fri, Feb 5, 2010 at 12:46 AM, Javier de la Torre<br>> > <jatorre@vizzuality.com>wrote:<br>> ><br>> >> Hi all,<br>> >><br>> >> I have a table with a MULTIPOLYGON field with around 100k records. Some of<br>> >> these records, 2K have self intersections and other problems that make<br>> >> ST_IsValid return false. The polygons overlap a lot and I wanted to generate<br>> >> another table that will be the union of all polygons.<br>> >><br>> >> The table looks like<br>> >> id, the_geom<br>> >><br>> >> What would be the best way to union all of the geometries into a new table<br>> >> where there is only POLYGONS that do not overlap?<br>> >><br>> >> Thanks in advance.<br>> >><br>> >> Javier.<br>> >><br>> >><br>> >> _______________________________________________<br>> >> postgis-users mailing list<br>> >> postgis-users@postgis.refractions.net<br>> >> http://postgis.refractions.net/mailman/listinfo/postgis-users<br>> >><br>> ><br>> <br>> <br>> -- <br>> SpatialDB Advice and Design, Solutions Architecture and Programming,<br>> Oracle Database 10g Administrator Certified Associate; Oracle Database 10g SQL Certified Professional<br>> Oracle Spatial, SQL Server, PostGIS, MySQL, ArcSDE, Manifold GIS, FME, Radius Topology and Studio Specialist.<br>> 39 Cliff View Drive, Allens Rivulet, 7150, Tasmania, Australia.<br>> Website: www.spatialdbadvisor.com<br>>    Email: simon@spatialdbadvisor.com<br>>    Voice: +61 362 396397<br>> Mobile: +61 418 396391<br>> Skype: sggreener<br>> Longitude: 147.20515 (147? 12' 18" E)<br>> Latitude: -43.01530 (43? 00' 55" S)<br>> GeoHash: r22em9r98wg<br>> NAC:W80CK 7SWP3<br>> <br>> <br>> ------------------------------<br>> <br>> Message: 5<br>> Date: Sat, 6 Feb 2010 12:12:58 -0500<br>> From: "Jordan, Thomas" <tjorda01@harris.com><br>> Subject: [postgis-users] Query for shapes completely within a circle<br>> To: <postgis-users@postgis.refractions.net><br>> Cc: "Jordan, Thomas" <tjorda01@harris.com><br>> Message-ID:<br>>         <5972B09E3EECF748AFF4BBE2B705812EB56DD1@mlbe2k11.cs.myharris.net><br>> Content-Type: text/plain; charset="us-ascii"<br>> <br>> Using ST_DWithin(geom, geomPt, radius) returns all geom that<br>> 'intersects' any part of the circle's area (acts like ST_Intersects). <br>> <br>> What I would like, however, is only those geom 'completely within the<br>> circle'. <br>> For instance, if the point is Orlando, FL and the radius is 2 miles, the<br>> ST_Dwithin would return a shapes like the state Florida and the whole<br>> US; where I only want the buildings in Orlando.<br>> <br>> This is the closest approximation I have so far:<br>> <br>> SELECT id, geom<br>> FROM geospatial<br>> WHERE ST_WITHIN(geom, ST_Expand(geometryFromText(geomPt, 4326), radius)<br>> )<br>> <br>> This is much better, but it still returns some geom that are outside of<br>> the circle; specifically all geom completely within the superscribing<br>> box returned by ST_EXPAND.<br>> <br>> Thanks for your help<br>> Tom<br>> <br>> -------------- next part --------------<br>> An HTML attachment was scrubbed...<br>> URL: <http://postgis.refractions.net/pipermail/postgis-users/attachments/20100206/75bb77cf/attachment-0001.html><br>> <br>> ------------------------------<br>> <br>> Message: 6<br>> Date: Sat, 6 Feb 2010 19:52:10 +0100<br>> From: Nicklas Av?n <nicklas.aven@jordogskog.no><br>> Subject: Re: [postgis-users] Query for shapes completely within a<br>>        circle<br>> To: PostGIS Users Discussion <postgis-users@postgis.refractions.net><br>> Message-ID: <201002061852.o16IqApW012227@mail-core.space2u.com><br>> Content-Type: text/plain; charset="iso-8859-1"<br>> <br>> Hallo You have at least two options here. 1.instead of expand use st_buffer to make a circle and then use st_within the way you have done, something like:SELECT id, geom <br>> FROM geospatial <br>> WHERE ST_Within(geom, ST_Buffer(geomPt,radius) ) <br>> This is also an approximation since st_buffer defults to build the circle from 32 segments, but that can be modified to a higher number if nessecary.http://postgis.org/documentation/manual-1.5/ST_Buffer.html 2.The other approach needs the latest postgis released a few days ago. I fyou have that installed you can try the new function ST_DFullywithin.http://postgis.org/documentation/manual-1.5/ST_DFullyWithin.html In your case it would be something like:SELECT id, geom <br>> FROM geospatial <br>> WHERE ST_DFullyWithin(geom, geomPt, radius)  Hope that helps/Nicklas<br>> 2010-02-06 Jordan Thomas wrote:<br>> <br>> <br>> Using ST_DWithin(geom, geomPt, radius) returns all geom that 'intersects' any part of the circle's area (acts like ST_Intersects). <br>> What I would like, however, is only those geom 'completely within the circle'. <br>> >For instance, if the point is Orlando, FL and the radius is 2 miles, the ST_Dwithin would return a shapes like the state Florida and the whole US; where I only want the buildings in Orlando.<br>> This is the closest approximation I have so far: <br>> SELECT id, geom <br>> >FROM geospatial <br>> >WHERE ST_WITHIN(geom, ST_Expand(geometryFromText(geomPt, 4326), radius) ) <br>> This is much better, but it still returns some geom that are outside of the circle; specifically all geom completely within the superscribing box returned by ST_EXPAND.<br>> Thanks for your help <br>> >Tom <br>> -------------- next part --------------<br>> An HTML attachment was scrubbed...<br>> URL: <http://postgis.refractions.net/pipermail/postgis-users/attachments/20100206/3f8c4018/attachment-0001.html><br>> <br>> ------------------------------<br>> <br>> _______________________________________________<br>> postgis-users mailing list<br>> postgis-users@postgis.refractions.net<br>> http://postgis.refractions.net/mailman/listinfo/postgis-users<br>> <br>> <br>> End of postgis-users Digest, Vol 92, Issue 6<br>> ********************************************<br>                                      <br /><hr />Hotmail: Trusted email with Microsoft’s powerful SPAM protection. <a href='https://signup.live.com/signup.aspx?id=60969' target='_new'>Sign up now.</a></body>
</html>