[geos-devel] Relate now working in Postgis
Norman Vine
nhv at cape.com
Tue Nov 12 18:43:35 EST 2002
David Blasby writes:
> I have a relate(geometry, geometry) function in PostGIS now.
> It passes the 555 tests I previously sent out.
Neat !
> Its a bit slow because of the PostGIS Geometry -> WKT -> WKT Reader -> GEOS geometry.
Being 'correct' is the important thing at this stage.
I predict we will see an order of magnitude speed improvement
after a little restructuring :-)
FYI - here is the 'top 10' as reported by gprof for a 1,000,000 point run
of TestSweepLineSpeed on my system
% cumulative self self total
time seconds seconds calls s/call s/call name
61.18 17.84 17.84 254555476 0.00 0.00 Coordinate::Coordinate(Coordinate const&)
10.29 20.84 3.00 78696778 0.00 0.00 CoordinateList::get()
7.82 23.12 2.28 78696778 0.00 0.00 CoordinateList::moveTo(int)
6.96 25.15 2.03 78696778 0.00 0.00 CoordinateList::getAt(int)
2.26 25.81 0.66 20465462 0.00 0.00 Envelope::init(double, double, double, double)
1.75 26.32 0.51 13643640 0.00 0.00 Envelope::init(Coordinate, Coordinate)
1.68 26.81 0.49 5176115 0.00 0.00 SegmentIntersector::addIntersections(Edge*, int, Edge*, int)
1.51 27.25 0.44 17704454 0.00 0.00 RobustCGAlgorithms::orientationIndex(Coordinate, Coordinate, Coordinate)
0.86 27.50 0.25 6821821 0.00 0.00 Envelope::overlaps(Envelope)
0.72 27.71 0.21 6821820 0.00 0.00 Envelope::Envelope(Envelope const&)
Can't see why there are 254 times more calls to Coordinate() then there are points yet
Maybe my profiler is feeding me bad info
Norman
More information about the geos-devel
mailing list