Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert does not run properly on windows #77

Open
ozo360 opened this issue Dec 8, 2021 · 3 comments
Open

Convert does not run properly on windows #77

ozo360 opened this issue Dec 8, 2021 · 3 comments

Comments

@ozo360
Copy link

ozo360 commented Dec 8, 2021

Describe the bug
If you run convert in a Windows environment, you will get unwanted single quotes in the layers section.
This will cause the build to fail.

To Reproduce
Steps to reproduce the behavior:

  1. curl https://gsi-cyberjapan.github.io/gsivectortile-mapbox-gl-js/std.json | charites convert - style.yml
  2. charites build style.yml style.json
  3. See error

Expected behavior
Make the output the same as when you convert in a Linux environment.
Remove the single quotes and it works fine.

Screenshots

convert style.yml

version: 8
glyphs: https://maps.gsi.go.jp/xyz/noto-jp/{fontstack}/{range}.pbf
sources:
  gsibv-vectortile-source-1-4-16:
    type: vector
    tiles:
      - https://cyberjapandata.gsi.go.jp/xyz/experimental_bvmap/{z}/{x}/{y}.pbf
    minzoom: 4
    maxzoom: 16
    attribution: >-
      <a href="https://maps.gsi.go.jp/vector/"
      target="_blank">地理院地図Vector(仮称)</a>
layers:
  - '!!inc/file layers\gsibv-vectortile-layer-761.yml'
  - '!!inc/file layers\gsibv-vectortile-layer-762.yml'
  - '!!inc/file layers\gsibv-vectortile-layer-763.yml'
  - '!!inc/file layers\gsibv-vectortile-layer-764.yml'
  - '!!inc/file layers\gsibv-vectortile-layer-765.yml'
  - '!!inc/file layers\gsibv-vectortile-layer-766.yml'
  - '!!inc/file layers\gsibv-vectortile-layer-767.yml'
  - '!!inc/file layers\gsibv-vectortile-layer-768.yml'

Charites Version:

  • Charites version: 0.1.2

Desktop (please complete the following information):

  • OS: Windows 10
@naogify
Copy link
Contributor

naogify commented Dec 8, 2021

@ozo360
Thank you for a great ticket! 👍
I'll investigate in a few days.

@ubukawa
Copy link
Contributor

ubukawa commented Feb 8, 2022

Hello! I have a similar error.
Let me share my experience. Thank you!

Describe the bug

When I convert a style.json into yaml files, some layers have ">-" and line change (attached image) in the list.
I could not see any differences among layers ' expression in the source file.

To reproduce

start charites in docker, then run

charites convert test.json test/style.yml
{"version":8,"sprite":"../sprites/sprite_S","glyphs":"../fonts/{fontstack}/{range}.pbf","sources":{"esri":{"type":"vector","url":"../../"}},
"layers": [{
    "id": "background",
    "type": "background",
    "paint": {
      "background-color": {
        "stops": [[7, "#FFFCF7"], [10, "#FAF9F6"]]
      }
    }
  }, {
    "id": "Landuse(slash)LND_Natural_M(slash)Farmland(slash)fill",
    "type": "fill",
    "source": "esri",
    "source-layer": "LND_Natural_M",
    "filter": ["==", "_symbol", 2],
    "minzoom": 8,
    "layout": {},
    "paint": {
      "fill-opacity": {
        "stops": [[8, 0], [9, 1]]
      },
      "fill-color": "#F2F2DC"
    }
  }, {
    "id": "Landuse(slash)LND_Natural_M(slash)Farmland(slash)pattern",
    "type": "fill",
    "source": "esri",
    "source-layer": "LND_Natural_M",
    "filter": ["==", "_symbol", 2],
    "minzoom": 12,
    "layout": {},
    "paint": {
      "fill-pattern": "LND_Farmland"
    }
  }, {
    "id": "Hydrography(slash)HYD_Waterways_L(slash)Stream(slash)halo",
    "type": "line",
    "source": "esri",
    "source-layer": "HYD_Waterways_L",
    "filter": ["==", "_symbol", 1],
    "minzoom": 11,
    "layout": {
      "line-cap": "round",
      "line-join": "round"
    },
    "paint": {
      "line-color": "rgba(250,249,246,0.5)",
      "line-blur": 1,
      "line-width": {
        "stops": [[11.53, 3], [18.17, 6]]
      }
    }
  }],
  "_ssl": true
}
version: 8
sprite: ../sprites/sprite_S
glyphs: ../fonts/{fontstack}/{range}.pbf
sources:
  esri:
    type: vector
    url: ../../
layers:
  - !!inc/file layers/background.yml
  - !!inc/file layers/Landuse(slash)LND_Natural_M(slash)Farmland(slash)fill.yml
  - >-
    !!inc/file
    layers/Landuse(slash)LND_Natural_M(slash)Farmland(slash)pattern.yml
  - >-
    !!inc/file
    layers/Hydrography(slash)HYD_Waterways_L(slash)Stream(slash)halo.yml
_ssl: true

Expected behaviour

layer list does not have two lines.

OS

Windows 10. Docker Desktop (for windows)
Charites run on unvt/nanban

some screen shot

charites-error3

@ubukawa
Copy link
Contributor

ubukawa commented Feb 9, 2022

This page may help us to understand what happens during the conversion. Thank you!

https://qiita.com/T-ubu/items/6e31a6bc5a458b91d4cd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants