New graphs, script to create slices centerpoints
|  | @ -662,10 +662,16 @@ function createMiscGraphs(allFeatures: ChangeSetData[], emptyCS: ChangeSetData[] | |||
|     }).render() | ||||
|     const geojson = { | ||||
|         type: "FeatureCollection", | ||||
|         features: Utils.NoNull(allFeatures.map(f => { | ||||
|         features: Utils.NoNull(allFeatures | ||||
|             .map(f => { | ||||
|                 try { | ||||
|                     const point = GeoOperations.centerpoint(f.geometry); | ||||
|                 point.properties = f.properties | ||||
|                     point.properties = {...f.properties, ...f.properties.metadata} | ||||
|                     delete point.properties.metadata | ||||
|                     for (const key in f.properties.metadata) { | ||||
|                         point.properties[key] = f.properties.metadata[key] | ||||
|                     } | ||||
|                      | ||||
|                     return point | ||||
|                 } catch (e) { | ||||
|                     console.error("Could not create center point: ", e, f) | ||||
|  |  | |||
							
								
								
									
										13
									
								
								Docs/Tools/cache_centerpoints.sh
									
										
									
									
									
										Executable file
									
								
							
							
						
						|  | @ -0,0 +1,13 @@ | |||
| #! /bin/bash | ||||
| 
 | ||||
| ts-node GenerateSeries.ts | ||||
| # Move to the root of the repo | ||||
| cd ../.. | ||||
| cd ../MapComplete-data | ||||
| git pull | ||||
| cd - | ||||
| ts-node scripts/slice.ts Docs/Tools/centerpoints.geojson 8 ../MapComplete-data/mapcomplete-changes/ | ||||
| cd - | ||||
| git add mapcomplete-changes/* | ||||
| git commit -am "New changeset data" | ||||
| git push | ||||
| Before Width: | Height: | Size: 232 KiB After Width: | Height: | Size: 372 KiB | 
| Before Width: | Height: | Size: 364 KiB After Width: | Height: | Size: 365 KiB | 
| Before Width: | Height: | Size: 154 KiB After Width: | Height: | Size: 142 KiB | 
| Before Width: | Height: | Size: 228 KiB After Width: | Height: | Size: 227 KiB | 
| Before Width: | Height: | Size: 123 KiB After Width: | Height: | Size: 140 KiB | 
| Before Width: | Height: | Size: 619 KiB After Width: | Height: | Size: 619 KiB | 
| Before Width: | Height: | Size: 115 KiB After Width: | Height: | Size: 116 KiB | 
| Before Width: | Height: | Size: 848 KiB After Width: | Height: | Size: 846 KiB | 
| Before Width: | Height: | Size: 102 KiB After Width: | Height: | Size: 103 KiB | 
| Before Width: | Height: | Size: 549 KiB After Width: | Height: | Size: 549 KiB | 
| Before Width: | Height: | Size: 104 KiB After Width: | Height: | Size: 117 KiB | 
| Before Width: | Height: | Size: 586 KiB After Width: | Height: | Size: 605 KiB | 
| Before Width: | Height: | Size: 114 KiB After Width: | Height: | Size: 122 KiB | 
| Before Width: | Height: | Size: 132 KiB After Width: | Height: | Size: 136 KiB | 
| Before Width: | Height: | Size: 124 KiB After Width: | Height: | Size: 128 KiB | 
| Before Width: | Height: | Size: 126 KiB After Width: | Height: | Size: 126 KiB | 
| Before Width: | Height: | Size: 82 KiB After Width: | Height: | Size: 109 KiB | 
| Before Width: | Height: | Size: 136 KiB After Width: | Height: | Size: 136 KiB | 
| Before Width: | Height: | Size: 101 KiB After Width: | Height: | Size: 101 KiB |