microsoft / microsoft/GlobalMLBuildingFootprints

File optimization - coordinate decimal places

Open
#5 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
2k
Forks
277
PR merge metrics
No merged PRs in 30d

Description

A small optimization that I'm sure many would appreciate is to round all coordinates to 6 decimal places. That would be in the low centimeters in terms of accuracy. Currently there appears to be 15 decimal places in the coordinates which would be smaller than a proton.

As a test I ran a simple find and replace using this regular expression on the Maldives file:

Search: ([-0-9]+\.[0-9]{6})[0-9]+\s*,\s*([-0-9]+\.[0-9]{6})[0-9]+
Replace: $1,$2

And saw the following savings:

  • Original file size 3.7MB compressed (15MB uncompressed)
  • Modified file size: 1.38MB (10MB uncompressed)

By making the files smaller, it becomes easier and faster to work with, while also lowering costs. When multiplied by all those who use this, this would also reduce carbon footprint of data processing related to this data, and better align with Microsoft's sustainability initiatives.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Maldives file and the regular expression shown in the issue, then inspect how coordinate data is produced and distributed across the repository. Verify the precision change preserves usable footprint accuracy and measure compressed and uncompressed sizes; done means the relevant files use six decimal places without breaking consumers.

Written by the indexing model from the issue text.

Assessment

Domain
data, performance
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.