From 4bc635fa35b58e65596bee3e5f72a5bd6b30c85a Mon Sep 17 00:00:00 2001 From: lub Date: Sat, 13 Jan 2024 12:09:01 +0100 Subject: [PATCH] add some example fields --- asef.ps1 | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/asef.ps1 b/asef.ps1 index 307c714..1cd63ea 100644 --- a/asef.ps1 +++ b/asef.ps1 @@ -2,17 +2,24 @@ $searchResults = Get-Content ./input | Sort-Object {Get-Random} | ForEach-Object (Invoke-RestMethod ('https://nominatim.openstreetmap.org/search?format=jsonv2&limit=1&q='+$_))[0] } -$coordinateList = $searchResults | ForEach-Object { +$coordinateList = $searchResults +| ForEach-Object { ,@([Decimal]$_.lon,[Decimal]$_.lat) } +| Sort-Object {$_[0][0]} -$output = [pscustomobject]@{ +$output = [PSCustomObject]@{ type = 'FeatureCollection' features = @( - [pscustomobject]@{ + [PSCustomObject]@{ type = 'Feature' - properties = [pscustomobject]@{} - geometry = [pscustomobject]@{ + properties = [PSCustomObject]@{ + _umap_options = [PSCustomObject]@{ + color = 'LimeGreen' + } + name = 'turnhalle' + } + geometry = [PSCustomObject]@{ type = 'Polygon' coordinates = ,$coordinateList }