{{-- SEARCH PANEL --}}

{{ $meetup->name }}

@if (!$model?->simplified_geojson || !$selectedItemOSMPolygons)
Search
@else
Back

{{ $selectedItemOSMPolygons['display_name'] }}

{{ $selectedItemOSMPolygons['type'] }}
OSM ID: {{ $selectedItemOSMPolygons['osm_id'] }}

X, Y, Z are parameters for the following PostGIS equation. The default values are chosen according to the size of the original geometry to give a slighty bigger geometry, without too many nodes.

Note that:

X > 0 will give a polygon bigger than the original geometry, and guaranteed to contain it.

X = 0 will give a polygon similar to the original geometry.

X < 0 will give a polygon smaller than the original geometry, and guaranteed to be smaller.

@endif
@if (!$model?->simplified_geojson && $search) Now select the appropriate place so that a GeoJSON can be built. @endif
@if ($search)

Search: {{ $search }}

@endif
    @foreach ($osmSearchResults as $item) @php $currentClass = $item['osm_id'] === $osm_id ? 'bg-amber-400 dark:bg-amber-900' : ''; @endphp
  • {{ $item['display_name'] }}

    {{ count($item['geojson']['coordinates'], COUNT_RECURSIVE) }} points

    {{ $item['type'] }}
  • @endforeach
{{-- Wikipedia Links --}} {{-- GeoJSON simplification --}} @if ($model && $selectedItemOSMPolygons)

Mapshaper simplification of OSM GeoJSON [{{ count($selectedItemOSMPolygons['geojson']['coordinates'], COUNT_RECURSIVE) }} points] to {{ count($model->simplified_geojson['coordinates'] ?? [], COUNT_RECURSIVE) }} points

(smaller percentage means fewer points - aim for no more than 150)

@endif {{-- GeoJSON data --}}
@if ($model?->simplified_geojson && $selectedItemOSMPolygons)
@php $jsonEncodedSelectedItem = json_encode($selectedItemOSMPolygons['geojson'], JSON_THROW_ON_ERROR); @endphp

OSM GeoJSON [{{ count($selectedItemOSMPolygons['geojson']['coordinates'] ?? [], COUNT_RECURSIVE) }} points]

{{ $jsonEncodedSelectedItem }}
Copy to clipboard
@php $jsonEncodedSimplifiedGeoJson = json_encode($model->simplified_geojson, JSON_THROW_ON_ERROR); @endphp

Simplified GeoJSON [{{ count($model->simplified_geojson['coordinates'] ?? [], COUNT_RECURSIVE) }} points]

{{ $jsonEncodedSimplifiedGeoJson }}
Save on model
@if ($selectedItemOSMBoundaries)
@php $jsonEncodedGeoJsonWater = json_encode($selectedItemOSMBoundaries, JSON_THROW_ON_ERROR); @endphp

https://osm-boundaries.com water GeoJSON [{{ count($selectedItemOSMBoundaries['coordinates'], COUNT_RECURSIVE) }} points]

{{ $jsonEncodedGeoJsonWater }}
Copy to clipboard
@endif @if ($selectedItemPolygonsOSMfr)
@php $jsonEncodedGeoJsonOSMFr = json_encode($selectedItemPolygonsOSMfr, JSON_THROW_ON_ERROR); @endphp

https://polygons.openstreetmap.fr GeoJSON @if ($selectedItemPolygonsOSMfr['type'] !== 'GeometryCollection') [{{ count($selectedItemPolygonsOSMfr['coordinates'] ?? [], COUNT_RECURSIVE) }} points] @endif

{{ $jsonEncodedGeoJsonOSMFr }}
Copy to clipboard
@endif

GeoJSON preview

@endif

GeoJSON helper is maintained by HolgerHatGarKeineNode [npub1pt0kw36ue3w2g4haxq3wgm6a2fhtptmzsjlc2j2vphtcgle72qesgpjyc6]. This software is open-sourced software licensed under the MIT license.