Tessellation throw 'ValueError: need at least one array to concatenate" #540
-
Describe the problemHi! I am tessellating using this script
and an error gets thrown. i had tried this on two different computers with the same error. Steps to reproduce
Versions of your packagespackages in environment at C:\Users\reube\anaconda3\envs\nbprocessor:Name Version Build Channelaffine 2.4.0 pyhd8ed1ab_0 conda-forge Your operating systemNo response Additional contextNo response |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments
-
Which CRS are your GeoDataFrames in? |
Beta Was this translation helpful? Give feedback.
-
Name: OSGB36 / British National Grid Axis Info [cartesian]: - E[east]: Easting (metre) - N[north]: Northing (metre) Area of Use: - name: United Kingdom (UK) - offshore to boundary of UKCS within 49°45'N to 61°N and 9°W to 2°E; onshore Great Britain (England, Wales and Scotland). Isle of Man onshore. - bounds: (-9.01, 49.75, 2.01, 61.01) Coordinate Operation: - name: British National Grid - method: Transverse Mercator Datum: Ordnance Survey of Great Britain 1936 - Ellipsoid: Airy 1830 - Prime Meridian: Greenwich |
Beta Was this translation helpful? Give feedback.
-
We'll need more information to troubleshoot properly, but from your code snippet above I have two initial Qs after Martin's limit = study_area
enclosures = momepy.enclosures(streets, limit=study_area.iloc[0]["geometry"], additional_barriers=[rail, rivers])
tessellation = momepy.Tessellation(buildings, unique_id='uID', enclosures=enclosures).tessellation
|
Beta Was this translation helpful? Give feedback.
-
it's uploading currently but here's the dataset: the study_area is the land polygon taken from openstreetmap subtracted by water polygons, the limit is just taking the first entry of the geodatframe with the study_area I think but am I using it wrong? |
Beta Was this translation helpful? Give feedback.
-
Your data needs some cleaning prior using it in morphometric analysis. See >>> buildings.area.sort_values().head(10)
1518630 0.00150
363559 0.00650
1744216 0.00750
1815046 0.01250
1532250 0.01300
3449993 0.01805
423824 0.01875
3820240 0.02000
3492165 0.02005
1143626 0.03125
dtype: float64 No real building is this small and these are what is causing the issue. I suggest dropping every polygon smaller than a certain threshold (10, 20 or 30sqm) or figuring out another way how to remove these. |
Beta Was this translation helpful? Give feedback.
Your data needs some cleaning prior using it in morphometric analysis. See
No real building is this small and these are what is causing the issue. I suggest dropping every polygon smaller than a certain threshold (10, 20 or 30sqm) or figuring out another way how to remove these.