add some example fields

main
lub 4 months ago
parent 9f85e6401e
commit 4bc635fa35

@ -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
}

Loading…
Cancel
Save