add geometries num to selection
handle invalid geometries