Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

should quantization be more aggressive? #32

Open
jrus opened this issue Apr 24, 2021 · 0 comments
Open

should quantization be more aggressive? #32

jrus opened this issue Apr 24, 2021 · 0 comments

Comments

@jrus
Copy link

jrus commented Apr 24, 2021

The current quantization for the 1:50m scale data is to 400 meter precision (max quantization error 200m) in the longitude direction at the equator, and 200 meter precision (max quantization error 100m) in the latitude direction.

This corresponds to a max diagonal error of <225 meters, which at 1:50m scale corresponds to a length of 4.5 μm = 0.0045 mm. This seems like it might be overkill, especially since the data points are (with a few rare exceptions) substantially further apart than that.

I wonder if it would be worth picking a coarser target for quantization error. For example if we say we will have ~1500 meter precision (max quantization error 750m) in both longitude and latitude directions, then the max diagonal quantization error will be about 1.06 kilometers, which at map scale is 21 μm = 0.02 mm. If we use this choice of scale, then after delta-encoding and gzip, the arcs portion of the land50 gets compressed by >25% compared to the current file. The largest number involved would no longer be 99999, but that seems like an artificial choice.

In general, I would recommend picking the same scale for latitude and longitude, unless there is some obvious reason why latitude needs to be more granular. Even just coarsening the latitude quantization to match longitude on the land50 data will be a savings of about 6% of the gzipped size of the arcs portion of the file, compared to the current version.

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

No branches or pull requests

1 participant