[postgis-users] ST_Line_Substring, 2nd arg must be smaller then 3rd arg

Julian Perelli jperelli at gmail.com
Fri Apr 22 09:36:57 PDT 2011

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:
			ST_Distance_Sphere(ST_GeomFromText('POINT($lat1 $lng1)'),
ST_Line_Substring(re.path, 0, 0.5)) < $rad1
			ST_Distance_Sphere(ST_GeomFromText('POINT($lat2 $lng2)'),
ST_Line_Substring(re.path, 0, 0.5)) < $rad2
					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

More information about the postgis-users mailing list