Hi all: I have a Perl script that runs against a shapefile to project a geometry centroid from UTM to Lat/Lon. Code looks something like this:
my $proj_26915 = new mapscript::projectionObj('epsg:26915'); my $proj_4326 = new mapscript::projectionObj('epsg:4326'); while (my $shape = $layer->nextShape()) { my $point = $shape->getCentroid(); $point->project($proj_26915, $proj_4326); # do something with $point } I get the following representative timings with ~250 polygon geometries in the shapefile. MapServer 7.4 + Proj 6.2.1 = 0m0.180s MapServer 7.6 + Proj 6.2.1 = 0m7.000s MapServer 8.0 (main) + Proj 7.2.1 = 0m4.300s Huge difference and things kinda become unusable. Things improve a bit with newer versions but the performance hit is substantial. I thought at first that it was the projection initialization that was taking all the time but it's actually the "$point->project($proj_26915, $proj_4326);" statement. Perhaps I'm doing something wrong? --Steve
_______________________________________________ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users