PG_RETURN_NULL();
}
+ geom = PG_GETARG_GSERIALIZED_P_COPY(0);
+ input_srid = gserialized_get_srid(geom);
+
+ /* Moved this back down after input_srid set otherwise FreeBSD 11 (bessie goes nuts)
+ Refer to https://trac.osgeo.org/postgis/ticket/3940 */
/* Input SRID and output SRID are equal, noop */
if ( input_srid == output_srid )
PG_RETURN_POINTER(PG_GETARG_DATUM(0));
- geom = PG_GETARG_GSERIALIZED_P_COPY(0);
- input_srid = gserialized_get_srid(geom);
if ( input_srid == SRID_UNKNOWN )
{
PG_FREE_IF_COPY(geom, 0);
PG_RETURN_NULL();
}
+
+
if ( GetProjectionsUsingFCInfo(fcinfo, input_srid, output_srid, &input_pj, &output_pj) == LW_FAILURE )
{
PG_FREE_IF_COPY(geom, 0);