Automatically calculate minimum and maximum locations when creating
portals