[postgis-users] Repost: Intersection not working properly

Obe, Regina robe.dnd at cityofboston.gov
Mon Oct 22 04:28:10 PDT 2007


Craig,
Yes as Webb said - that would help a lot to see some of your problematic
geometries.

Looking at your query it looks perfectly fine.  The only reason I can
think why you would be missing polygons is your condition of

a.buf_dist = 1  (I am assuming you are not expecting to see any
bio.bnd_bufs where the buf_dist <> 1)?

And a far out reason - you really have Polylines (line strings) and not
Polygons.  On screen they would look more or less the same unless you
have them shaded in.

Hope that helps,
Regina



-----Original Message-----
From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Webb
Sprague
Sent: Sunday, October 21, 2007 10:49 PM
To: PostGIS Users Discussion
Subject: Re: [postgis-users] Repost: Intersection not working properly

Can you post astext() version of your geometries and srids so the list
members can try to reproduce?  (Disregard if you already did in your
last email).

-W

On 10/21/07, Craig Feuerherdt <craigfeuerherdt at gmail.com> wrote:
> This is a re-post of a message from last week. I still have not
resolved the
> issue.
>
> I am trying to clip one table using the features in another. My query
is as
> follows;
>
> drop table bio.bnd_evc;
> create table bio.bnd_evc as
> select a.buf_dist, b.bio_no, b.bio_code, b.evc, b.constcde, b.consstat
,
> b.density, intersection(a.the_geom, b.the_geom) as the_geom
> from bio.bnd_buf as a, bio.evc as b
> where a.the_geom && b.the_geom
> and a.buf_dist = 1
> and intersects(a.the_geom, b.the_geom)
>
> Both tables have a GIST index. The query returns a table, however
there are
> several polygons from the evc table, within the bnd_buf table, that
are
> missing. I thought those missing polygons may have had invalid
geometries
> (which is not the case as isvalid(evc.the_geom) returns TRUE for all
> geometries) and buffered the evc layer by 0, however this made no
> difference. One of the missing polygons is completely contained by the
> selected feature in bnd_buf, but other features that are also
completely
>  contained have been selected. The resultant table also shows (in
QGIS)
> polygons where there were no evc polygons.
>
> I am at a loss to explain what is going on nor how to correct it.
>
> Thanks in advance,
>
>  Craig Feuerhedt
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>
_______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users

-----------------------------------------
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.




More information about the postgis-users mailing list