pgRouting/pgrouting-contrib — Issue #3: Missing second argument in geometryfromtext results in SRID "-1"
Author: dkastl
Created: 2011-12-03 02:52:17+00:00
State: open

I have found what appears to be a problem in one of the routing_core_smart functions.

In the function locate_point_as_geometry there are two lines which call the function geometryfromtext.

These functions are called when line_substring returns a point.

In the geometryfromtext function calls, there is no second argument for the srid. This produces a geometry with a “-1” for the srid.

When I use shootingstar_smart in my script, MapServer fails on trying to work with two geometries with different srids.

Adding the second argument to the geometryfromtext function fixed this problem. The only geometry with the “-1” srid was the one created by these function calls.

Reference: http://lists.osgeo.org/pipermail/pgrouting-users/2011-December/000879.html