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

export topojson scale with datamaps #654

Open
HackerYunen opened this issue Aug 28, 2024 · 1 comment
Open

export topojson scale with datamaps #654

HackerYunen opened this issue Aug 28, 2024 · 1 comment

Comments

@HackerYunen
Copy link

Hi, I was editing the data of datamaps.world.js (https://github.com/markmarkoh/datamaps/blob/master/dist/datamaps.world.js) which is use topojson data. It was import normally, but when I finish editing work and export it. The data seems like scale larger than before:

first arcs (old one)

    "arcs": [
        [
            [6700, 7164],
            [28, -23],
            [21, 8],
            [6, 27],
            [22, 9],
            [15, 18],
            [6, 47],
            [23, 11],
            [5, 21],
            [13, -15],
            [8, -2]
        ],

after mapshaper edting:

"arcs": [
    [
      [12104, 14632],
      [50, -47],
      [38, 17],
      [11, 55],
      [40, 18],
      [27, 37],
      [11, 96],
      [41, 22],
      [9, 43],
      [24, -31],
      [14, -4]
    ],
@mbloch
Copy link
Owner

mbloch commented Aug 28, 2024

Mapshaper applies a default amount of "quantization" to TopoJSON output (that's directly related to the scale of the integer coordinates that you see in the "arcs" array). If you are editing a TopoJSON, you'd probably prefer that mapshaper apply the exact same scaling as the original file. That's not currently an option, although you can use the quantization option of the -o output command to manually set quantization. I'll think about how to better serve your use case -- and welcome your suggestions.

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

2 participants