[postgis-users] overlaps and intersections strange behavior
Paul Ramsey
pramsey at cleverelephant.ca
Mon May 28 12:21:36 PDT 2018
Does knowing that an overlaps test is only true if the interiors of
both objects interact, but there is no full containment relationship
help you understand a little?
On Mon, May 28, 2018 at 8:03 AM, franco base <frenk.calza at gmail.com> wrote:
> Hi all,
>
>
> question 1)
> why ST_Overlaps doesn't work with geometry a and b?
> The first 2 point of the 2 line (bold) are the same.
> ST_Intersection works
>
> question 2)
> if I extend line b it becomes c
> (sorry i write text geometry because I have a lot of point coord),
> ST_Overlaps return false and also
> ST_Intersection return a point (length =0)
>
> What's happen?
>
> "POSTGIS="2.2.1 r14555" GEOS="3.5.0-CAPI-1.9.0 r4084" PROJ="Rel. 4.9.2, 08
> September 2015" GDAL="GDAL 1.11.3, released 2015/09/16" LIBXML="2.9.3"
> LIBJSON="0.11.99" TOPOLOGY RASTER"
>
>
> WITH geom AS
> (
> SELECT
> st_setsrid(st_makeline(
> st_makepoint(9.18284350788197,45.4441804010334),
> st_makepoint(9.18334214253396,45.4443310195606)
> ),4326) a,
>
> st_setsrid(st_makeline(ARRAY[
> st_makepoint(9.18334214253396,45.4443310195606),
> st_makepoint(9.18284350788197,45.4441804010334),
> st_makepoint(9.18274220788201,45.4441483010334),
> st_makepoint(9.18274220788201,45.4441483010334),
> st_makepoint(9.18271080788202,45.4441388010335),
> st_makepoint(9.18271080788202,45.4441388010335) ]),4326) b,
>
> '0102000020E610000027000000E8527405DF5D224039CEBED6DFB846402A470DAA9D5D22403CFB43E7DAB8464073E7FC62905D22409DC1FDD9D9B8464073E7FC62905D22409DC1FDD9D9B8464040F560458C5D224065A94C8AD9B8464040F560458C5D224065A94C8AD9B84640577DD232875D224085179BAFDCB84640577DD232875D224085179BAFDCB84640C43B5CAF795D2240BB5EA7A0DBB84640BB366DB9795D2240D5A0759CDBB84640CB05C9E4095D2240CC685208D3B84640CB05C9E4095D2240CC685208D3B8464088EC7DE7A75C224074794263CBB8464088EC7DE7A75C224074794263CBB84640280A729E8B5C224050769668C9B84640280A729E8B5C224050769668C9B8464031A63554665C224097E12591C7B8464031A63554665C224097E12591C7B846409A92E968405C22406A63C10CC6B846409A92E968405C22406A63C10CC6B84640164A8CEC245C22402356E826C5B84640164A8CEC245C22402356E826C5B84640D4962A44065C22406FC51DC8C4B84640D4962A44065C22406FC51DC8C4B84640A5F78473E75B2240380991C0C4B84640A5F78473E75B2240380991C0C4B84640B08F6F2CB85B2240449DA518C5B84640B08F6F2CB85B2240449DA518C5B84640087D054BAA5B224050D0A632C5B84640087D054BAA5B224050D0A632C5B84640213C1ECBA65B2240F2CC5C39C5B84640213C1ECBA65B2240F2CC5C39C5B846406BDBF78AA35B2240F0C76D43C5B846406BDBF78AA35B2240F0C76D43C5B84640D731EDD8985B2240C676D265C5B84640D731EDD8985B2240C676D265C5B84640EFDF4074875B224027DB2F9DC5B846404443B89A605B2240369D5619C6B84640B521C808865B22404765B9A1C5B84640'::geometry
> as c
> )
>
>
> SELECT
> ---- question 1
> st_overlaps(a,b),
> st_length(st_intersection(a,b)::geography)::int,
> ---- question 2
> st_overlaps(a,c),
> st_length(st_intersection(a,c)::geography)::int
>
> FROM geom
>
>
> return
>
> f;42;f;0
>
>
>
> thanks
> ft
>
>
>
>
>
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-users
More information about the postgis-users
mailing list