<div dir="ltr">Hello all,<div><br></div><div>I am pretty new to postgis development, and am trying to write some geometric manipulation functions as a c extension for a small performance boost. The problem is that the function I want to call from the C code directly is st_rotate (which is defined by st_affine, or LWGEOM_affine). This function takes in 13 arguments, so I created my own DirectFunctionCall13Coll that was implemented identically to 1-9, however when I run the function with a 0 degree rotation, the return value is a polygon, but the points are of the order of ~e-324, which is much smaller than I was expecting. I wasn't quite sure what I was doing wrong. </div><div><br></div><div>Here is the the input and output of the function. </div><div><br></div><div><br></div><div><div>NOTICE:  input of LWGEOM_affine</div><div>DETAIL:  hull WKT: POLYGON((1 1,1 7,4 8,8 5,1 1))</div><div><br></div><div>NOTICE:  Output of func pointer</div><div>DETAIL:  rot WKT: POLYGON((4.94065645841247e-324 4.94065645841247e-324,4.94065645841247e-324 3.45845952088873e-323,1.97626258336499e-323 3.95252516672997e-323,3.95252516672997e-323 2.47032822920623e-323,4.94065645841247e-324 4.94065645841247e-324))</div></div><div><br></div><div><br></div><div>And it is called with these arguments, with the macro for the DirectFunctionCall13Coll using the default collation valid. </div><div><br></div><div>DirectFunctionCall13(LWGEOM_affine, hull, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0);<br></div><div><br></div><div>Does anyone have any ideas why this is happening. We are using postgresql 9.2 and postgis 2.0.6.</div><div><br></div><div>Thanks,</div><div>Phil</div><div><br></div><div><br></div></div>