[postgis-users] ST_Difference
Richard Heimann [C]
heimann at ait.nrl.navy.mil
Wed Oct 24 13:53:48 PDT 2007
Thanks Paul for the response. I hadnt thought of this logic, it didnt work
however. Strangely, it increased the number of features by eight times. Any
thoughts?
Vr
Rich
-----Original Message-----
From: Paul Ramsey [mailto:pramsey at refractions.net]
Sent: Wednesday, October 24, 2007 4:07 PM
To: Richard.Heimann at nrl.navy.mil; PostGIS Users Discussion
Subject: Re: [postgis-users] ST_Difference
select p.*
from pandatestdata p, world2_12nm w
where not st_contains(w.the_geom, p.the_geom);
On 24-Oct-07, at 11:45 AM, Richard Heimann [C] wrote:
> Thanks for your response W. I should have posted the sql query
> earlier.
> Anyway...its below.
>
> My goal is to drop all features (points) that fall within my
> polygon. In
> this case, I have ship track data and want to filter it with world
> country
> buffers.
>
> World2_12nm - my world country 12nm buffered polygon
> Pandatestdata - track data (point)
> Panda_diff2 - new table
>
>
> CREATE TABLE panda_diff2 AS
> SELECT AsText(Difference(world2_12nm.the_geom,
> pandatestdata.the_geom)) FROM
> world2_12nm, pandatestdata
>
> Also attached are the astext versions of my data as well as a csv
> of the
> output from the above sql. Please debunk the mystery...
>
> Thanks again
> Rich
>
> -----Original Message-----
> From: Webb Sprague [mailto:webb.sprague at gmail.com]
> Sent: Wednesday, October 24, 2007 12:00 PM
> To: Richard.Heimann at nrl.navy.mil; PostGIS Users Discussion
> Subject: Re: [postgis-users] ST_Difference
>
> You might get more useful help if you post an "astext()" version of
> your data, the query, the result, and a *desired* result.
>
> I know the difference functions can be tricky and are sometiimes
> defined in ways you might not expect.
>
> Thx
> W
>
> On 10/24/07, Richard Heimann [C] <heimann at ait.nrl.navy.mil> wrote:
>>
>>
>>
>>
>> All,
>>
>>
>>
>> I would appreciate help in constructing an SQL statement that
>> performs a
>> difference function on two datasets. My intersect function works but
> cannot
>> work out the kinks with st_difference. Thanks for your help.Im new to
>> Postgis.
>>
>>
>>
>> Rich
>>
>>
>>
>>
>> _______________________________________________
>> 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: panda_diff2.csv
Type: application/vnd.ms-excel
Size: 55597 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20071024/e3585eb8/attachment.xlb>
More information about the postgis-users
mailing list