[postgis-users] problem with multilinestring
Dave Blasby
dblasby at refractions.net
Sun Feb 8 10:16:25 PST 2004
Quoting Vladimir Guzmán <vguzman at maintask.com>:
> But if I try the query: "SELECT id FROM arcos WHERE startpoint(the_geom)
> ~= geometryfromtext('POINT(-74.1835602497749 4.62941345152032)',1);"
> I get no results:
You can try this with just '=' or 'equals()'. Strk said it works with ~= on
his machine. This is the preferred method.
You can get this to work with the index if you add a '&&' clause.
>
> And the same problem if i try: "SELECT id FROM arcos WHERE
> x(startpoint(the_geom))::float = -74.1835602497749;"
Try this with a "::float8" instead of "::float". You're truncating the
geometry's x location to a float4 and postgresql is probably converting this
to a float8 to do the '='. The float4 and float8 version of the number will
be slightly different.
dave
More information about the postgis-users
mailing list