Thanks you for your answers. I can understand your objections but how can I make this process better ?
Also, my tests gave me some strange results. For the first set, I did the process explain before without a gis index (gist). And for the seconde one I built a gis index. I was expected better result for the second set, but it hasn't been the case. Even sometimes it took me more times than without an index. Do you know what could explain this behaviour ? Best regards Arnaud PS : In attached file you will find the results of the test On Thu, Nov 25, 2010 at 8:01 PM, Paul Ramsey <[email protected]> wrote: > Oh, no, the results will still be biased by the particular polygon > data. You'll have a "how postgis performs doing p-i-p against a world > countries file" result. Which isn't a generic "how postgis performs > doing p-i-p" result by any stretch of the imagination. > > P. > > On Thu, Nov 25, 2010 at 10:30 AM, George Silva <[email protected]> > wrote: >> To eliminate the problemas presented by Paul, create a regular grid of 1x1 >> degrees and populate it randomly with points. Then make your test. All >> square polygons will have 4 vertexes and the test is "less biased". >> >> George >> >> On Thu, Nov 25, 2010 at 3:22 PM, Paul Ramsey <[email protected]> wrote: >>> >>> Depends on who you think the results will be valid for. The >>> countries-of-the-world is a somewhat non-standard GIS collection given >>> the wide variation in polygon sizes, the large numbers of vertices in >>> the larger polygons, and the extreme coverage of the overall area that >>> the bounding boxes of the larger polygons command. In many ways your >>> test of "against the whole world" will be largely a test of "against >>> Russia, Canada, Brazil, and the USA" >>> >>> Data matters, >>> >>> P >>> >>> >>> On Thu, Nov 25, 2010 at 9:16 AM, Arnaud Vandecasteele >>> <[email protected]> wrote: >>> Hi all, >>> > >>> > I've to do a quick benchmark of postgis. The case is to check if a >>> > point is inside (or not) a polygon. >>> > To do so, I've uploaded in my database a big shapefile which contains >>> > all the world's countries. >>> > After that I've made a simple stored function [1]. This one, take two >>> > arguments : >>> > 1 - The number of points to check >>> > 2 - The number of polygon to check >>> > >>> > Then I run the query and i change the number of iterations or the >>> > number of feature. >>> > >>> > Do you think it's a good way to have some pertinents results ? >>> > >>> > >>> > Best regards >>> > >>> > Arnaud >>> > >>> > >>> > [1] >>> > -- Function: random_poi(integer, integer) >>> > >>> > -- DROP FUNCTION random_poi(integer, integer); >>> > >>> > CREATE OR REPLACE FUNCTION random_poi(integer, integer) >>> > RETURNS void AS >>> > $BODY$ >>> > DECLARE >>> > iteration alias for $1; >>> > nb_feat alias for $2; >>> > pt_x numeric; >>> > pt_y numeric; >>> > geom_poi geometry; >>> > i int := 0; >>> > BEGIN >>> > WHILE i < iteration LOOP >>> > i := i + 1; >>> > -- CREATE RANDOM POSITION >>> > pt_x := random()*100; >>> > pt_y := random()*100; >>> > -- CREATE RANDOM GEOM POI >>> > geom_poi := ST_GeometryFromText(text 'POINT('||pt_x||' >>> > '||pt_y||')'); >>> > PERFORM ST_CONTAINS(geom_poi, the_geom) FROM world_poly >>> > LIMIT nb_feat; >>> > END LOOP; >>> > return; >>> > END; >>> > $BODY$ >>> > LANGUAGE 'plpgsql' IMMUTABLE STRICT >>> > COST 100; >>> > ALTER FUNCTION random_poi(integer, integer) OWNER TO postgres; >>> > _______________________________________________ >>> > postgis-users mailing list >>> > [email protected] >>> > http://postgis.refractions.net/mailman/listinfo/postgis-users >>> > >>> _______________________________________________ >>> postgis-users mailing list >>> [email protected] >>> http://postgis.refractions.net/mailman/listinfo/postgis-users >> >> >> >> -- >> George R. C. Silva >> >> Desenvolvimento em GIS >> http://blog.geoprocessamento.net >> >> _______________________________________________ >> postgis-users mailing list >> [email protected] >> http://postgis.refractions.net/mailman/listinfo/postgis-users >> >> > _______________________________________________ > postgis-users mailing list > [email protected] > http://postgis.refractions.net/mailman/listinfo/postgis-users > -- -------------------------------------------------------------------- Van De Casteele Arnaud Mines Paris Tech - CRC Sophia-Antipolis 0698 24 25 29 SIG - WebMapping - SOLAP - BI - GeoCollaboration Web Site http://geotribu.net/ http://www.sismaris.org/
result_postgis.pdf
Description: Adobe PDF document
_______________________________________________ postgis-users mailing list [email protected] http://postgis.refractions.net/mailman/listinfo/postgis-users
