Skip to content

Export integer coordinates instead of floats, and float metrics not in scientific notation #8

@mszell

Description

@mszell

At least in the geosjons it is a problem, not sure if also gpkg.
This:

{ "type": "Feature", "properties": { "betweenness_centrality": "9.499382540134892e-07", "source": "46191307.0", "target": "1939597774.0", "ordering_betweenness_centrality": "2140", "length": 46, "length_cumulative": 2312906 }, "geometry": { "type": "MultiLineString", "coordinates": [ [ [ 545415.0, 6860329.0 ], [ 545415.0, 6860333.0 ] ], [ [ 545415.0, 6860333.0 ], [ 545412.0, 6860375.0 ] ] ] } }
]
}

should turn into this:

{ "type": "Feature", "properties": { "betweenness_centrality": "0.00000094993", "source": "46191307", "target": "1939597774", "ordering_betweenness_centrality": "2140", "length": 46, "length_cumulative": 2312906 }, "geometry": { "type": "MultiLineString", "coordinates": [ [ [ 545415, 6860329 ], [ 545415, 6860333 ] ], [ [ 545415, 6860333 ], [ 545412, 6860375 ] ] ] } }
]
}

The ".0" issue could be solved in a hacky way via sed -i '' -e 's/0.//g' *.geojson

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No fields configured for Task.

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions