You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reviewing the support request it looks like we export default of 15 coordinate precision now when 7 is plenty. This will result in smaller file sizes, a win for everyone – and the original OSM data is accurate to 7 decimal places so we're not loosing precision.
The 15 precision is coming from OGR's GeoJSON driver defaulting to 15. But it's possible to set that to 7 two different ways:
COORDINATE_PRECISION = int_number: (OGR >= 1.9.0) Maximum number of figures after decimal separator to write in coordinates. Default to 15 for GeoJSON 2008, and 7 for RFC 7946. "Smart" truncation will occur to remove trailing zeros.
SIGNIFICANT_FIGURES = int_number: (OGR >= 2.1) Maximum number of significant figures when writing floating-point numbers. Default to 17. If explicitly specified, and > COORDINATE_PRECISION is not, this will also apply to coordinates.
RFC7946=YES/NO. (OGR >= 2.2) Whether to use RFC 7946 standard. Otherwise GeoJSON 2008 initial version will be used. Default is NO (thus GeoJSON 2008)
If we're using a newer OGR >= 2.2 then we should just say RFC7946=YES. If not then set one of the other flags (I think COORDINATE_PRECISION=7 but verify).
The code would need to be changed here for OSM2PGSQL:
From a Twitter support request we're currently exporting too much precision in our GeoJSON files for Metro Extracts.
Reviewing the support request it looks like we export default of 15 coordinate precision now when 7 is plenty. This will result in smaller file sizes, a win for everyone – and the original OSM data is accurate to 7 decimal places so we're not loosing precision.
The 15 precision is coming from OGR's GeoJSON driver defaulting to 15. But it's possible to set that to 7 two different ways:
If we're using a newer OGR >= 2.2 then we should just say
RFC7946=YES
. If not then set one of the other flags (I thinkCOORDINATE_PRECISION=7
but verify).The code would need to be changed here for OSM2PGSQL:
chef-mapzen_odes/templates/default/shapes.sh.erb
Lines 28 to 36 in 7d6643b
And here for IMPOSM:
chef-mapzen_odes/templates/default/shapes.sh.erb
Lines 72 to 77 in 7d6643b
The text was updated successfully, but these errors were encountered: