[TinyOWS-users] Speed of GetFeature Request with 4 millions point

Marc-André Trottier marcandre_trottier at hotmail.com
Thu Aug 18 10:22:02 EST 2011


i replaced all the function fe_bbox_layer() in fe_spatial_ops.c by this :

   /*c*/ srid = ows_srs_get_srid_from_layer(o, typename);
   /*c*/ buffer_add_str(sql, " (SELECT ST_Transform(");
   /*c*/ buffer_copy(sql, envelope);
   /*c*/ buffer_add_str(sql,", ");
   /*c*/ buffer_add_int(sql,srid);
   /*c*/ buffer_add_str(sql, ") as ");
   /*c*/ buffer_add(sql,'"');
   /*c*/ buffer_add_str(sql,"the_geom");
   /*c*/ buffer_add(sql,'"');
   /*c*/ buffer_add_str(sql, ") as B ON ST_Intersects(A.");
   /*c*/ buffer_add(sql, '"');
   /*c*/ buffer_copy(sql, propertyname);
   /*c*/ buffer_add(sql, '"');
   /*c*/ buffer_add_str(sql,", B.the_geom)");

and switch where for INNER JOIN in wfs_get_feature.c, function
wfs_retrieve_sql_request_list() :

line 598     /* buffer_add_str(where, " WHERE ");*/
line 599      /*c*/buffer_add_str(where, " as A INNER JOIN ");

it's working for my request in my application but it is working for all
requests, i can't say
i did not done many type of request

i think my variable 'srid' don't get the good srid.
you need the srid of the table and i understand
ows_srs_get_srid_from_layer() return the layer's srid.
there's a way to get the table's srid in fe_bbox_layer() ?

Marc-André Trottier
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/tinyows-users/attachments/20110818/b5397e60/attachment.htm 


More information about the TinyOWS-users mailing list