pub fn to_polygon<P: ShapePoint>( geometry: &Geometry, dimension: Dimension, index: usize, ) -> Result<GenericPolygon<P>>