Skip to content

get geojson

get geojson #20

Workflow file for this run

name: get geojson
on:
workflow_call:
workflow_dispatch:
jobs:
genRank:
environment:
name: ${{ github.ref_name }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get BTC MAP Rank1
id: getRank
run: npm install -g mapshaper && curl "https://nominatim.openstreetmap.org/lookup?osm_ids=R${{ vars.OSM_ID }}&format=json&polygon_geojson=" | jq '.[0].geojson' > input.json && mapshaper input.json -simplify 10% -o output.json && cat output.json | jq '.geometries[0]' -c > geo.json && jq length '.coordinates' geo.json && GEOJSON=$(cat geo.json) && curl -X POST https://pastebin.com/api/api_post.php -d "api_dev_key=${{ secrets.PASTE_BIN_API_KEY }}" -d 'api_option=paste' -d "api_paste_code=$GEOJSON"