[postgis-users] compute "difference" between two roads

c. m. cesare__m at hotmail.com
Fri Sep 8 06:38:09 PDT 2006


hi all,
thanks a lot again. i'have attached the two source table's and the result 
table (diff). i have restricted the test data set to a street I know that 
leads partially into a forest.

here the query again:

select s.*, difference(s.wkb_geometry, f.intersection_geom) as diff_geom 
into test_diff
from test_sidestreets as s, test_foreststreets as f
where s.feature_id = f.feature_id



>From: Stephen Woodbridge <woodbri at swoodbridge.com>
>Reply-To: PostGIS Users Discussion <postgis-users at postgis.refractions.net>
>To: PostGIS Users Discussion <postgis-users at postgis.refractions.net>
>Subject: Re: [postgis-users] compute "difference" between two roads
>Date: Fri, 08 Sep 2006 08:48:12 -0400
>
>cesare,
>
>I think it would be helpful if you could post the geomerty for a reference 
>line, a line you would expect in the difference set and a line that you 
>would expect to get filtered out (likely the same as the reference line).
>
>Then it will be easier to see what data you are dealing with and how to 
>construct an appropriate query. So a dump of a table(s) with with a few 
>lines that meet these requirements would be helpful.
>
>-Steve
>
>c. m. wrote:
>>hi michael,
>>thanks a lot that you're trying to help me. i'm quite new to the whole 
>>thing. do you mean small db table's e.g. concerning one street?
>>
>>cesare
>>
>>
>>>From: Michael Fuhr <mike at fuhr.org>
>>>Reply-To: PostGIS Users Discussion 
>>><postgis-users at postgis.refractions.net>
>>>To: PostGIS Users Discussion <postgis-users at postgis.refractions.net>
>>>Subject: Re: [postgis-users] compute "difference" between two roads
>>>Date: Fri, 8 Sep 2006 05:30:49 -0600
>>>
>>>On Fri, Sep 08, 2006 at 09:38:23AM +0200, c. m. wrote:
>>> > i'm using the navteq data set, postgis/postgres and the uml
>>> > mapserver. Actually I have created a table with forest streets and
>>> > one with side streets. forest streets are a subset of side streets,
>>> > i.e. a forest street is also a side street. now I want to
>>> > geometrically compute the difference of the two (side - forest
>>> > streets) to get an adjacent side streets table (layer)  to be able
>>> > to display them properly and independently on the mapserver. as a
>>> > result I always get the entire side street and not the difference
>>> > between the two areas/lines...unfortunately it doesn't work and I
>>> > can't understand why.
>>>
>>>Could you post a couple of geometries along with the difference
>>>you get?
>>>
>>>--
>>>Michael Fuhr
>>>_______________________________________________
>>>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
>>
>
>_______________________________________________
>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: test_sidestreets.tar.bz2
Type: application/octet-stream
Size: 3693 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20060908/e6309e26/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_foreststreets.tar.bz2
Type: application/octet-stream
Size: 3281 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20060908/e6309e26/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_diff.tar.bz2
Type: application/octet-stream
Size: 4893 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20060908/e6309e26/attachment-0002.obj>


More information about the postgis-users mailing list