i replaced all the function fe_bbox_layer() in fe_spatial_ops.c by this :<br><br> /*c*/ srid = ows_srs_get_srid_from_layer(o, typename);<br> /*c*/ buffer_add_str(sql, " (SELECT ST_Transform(");<br> /*c*/ buffer_copy(sql, envelope);<br>
/*c*/ buffer_add_str(sql,", ");<br> /*c*/ buffer_add_int(sql,srid);<br> /*c*/ buffer_add_str(sql, ") as ");<br> /*c*/ buffer_add(sql,'"');<br> /*c*/ buffer_add_str(sql,"the_geom");<br>
/*c*/ buffer_add(sql,'"');<br> /*c*/ buffer_add_str(sql, ") as B ON ST_Intersects(A.");<br> /*c*/ buffer_add(sql, '"');<br> /*c*/ buffer_copy(sql, propertyname);<br> /*c*/ buffer_add(sql, '"');<br>
/*c*/ buffer_add_str(sql,", B.the_geom)");<br><br>and switch where for INNER JOIN in wfs_get_feature.c, function wfs_retrieve_sql_request_list() : <br><br>line 598 /* buffer_add_str(where, " WHERE ");*/<br>
line 599 /*c*/buffer_add_str(where, " as A INNER JOIN ");<br><br>it's working for my request in my application but it is working for all requests, i can't say <br>i did not done many type of request<br>
<br>i think my variable 'srid' don't get the good srid. <br>you need the srid of the table and i understand ows_srs_get_srid_from_layer() return the layer's srid. <br>there's a way to get the table's srid in fe_bbox_layer() ?<br>
<br>Marc-André Trottier<br>