Don't have answers. Do you still get segfault removing SHPClose(
hShp );
Other comment:
> writeln("Bounds = [" ~to!string(pad_min_bound) ~ ","
> ~ to!string(pad_max_bound) ~ "]");
writeln("Bounds = [", pad_min_bound, ",", pad_max_bound, "]");