[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgis-users
Subject:    [postgis-users] ST_Line_Substring,
From:       Julian Perelli <jperelli () gmail ! com>
Date:       2011-04-22 16:36:57
Message-ID: BANLkTikXDkVMxoX-SFChDUYf+oLu_wCtCg () mail ! gmail ! com
[Download RAW message or body]

Hello postgis list!

I have a large query, it was going good, but I wanted to add a
restriction to a path, this my WHERE clause:
		WHERE
			ST_Distance_Sphere(ST_GeomFromText('POINT($lat1 $lng1)'),
ST_Line_Substring(re.path, 0, 0.5)) < $rad1
			and
			ST_Distance_Sphere(ST_GeomFromText('POINT($lat2 $lng2)'),
ST_Line_Substring(re.path, 0, 0.5)) < $rad2
			and
					ST_Line_Locate_Point(ST_Line_Substring(re.path, 0, 0.5),
'POINT($lat1 $lng1)')
					<
					ST_Line_Locate_Point(ST_Line_Substring(re.path, 0, 0.5),
'POINT($lat2 $lng2)')

the $vars get replaced with good values.
When I don't use the ST_Line_Substring, I don't get an error, but when
I use it, I get "ERROR: 2nd arg must be smaller then 3rd arg". I
assume that someway in someplace something is not understanding that 0
is smaller than 0.5, but I really don't see the error in anyway.

Has anyone an indea of what is going on?

Thanks!! :D
_______________________________________________
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic