[postgis-devel] code reorganization in pgsql2shp.c
strk
strk at keybit.net
Sat Nov 15 16:55:57 PST 2003
I've made a big re-organization of code in pgsql2shp.c
I hope this won't confuse anyone.
There is now a main loop fetching records from a cursor.
Each iteration will call a record handler function.
The very first iteration calls a shapefile initializer function.
The dumper runs slightly faster due to reduced string comparisions.
Records are fetched one by one, thus memory usage is greatly reduced.
Many bugs have been fixed and errors have been handled.
A lot of code has been cleaned up. I belive it is now more readable.
I did change creator functions signature to be the same for all type
of geometries thus allowing for an indirect call in the record handler
function. I did not look *inside* them. Their signature can probably
be reduced since most *global* variables have been moved to global scope.
They could also be faster using WKB, but that's probably not urgent.
Please give it a try.
--strk;
More information about the postgis-devel
mailing list