move the shapelib dependent code to legacy and start new