Closed stevage closed 6 years ago
This issue must be upstream in the dependency tree somewhere not something I can fix.
It looks like it needs python < 3. On my Debian system I have python
and python3
executables, and it uses python
which is python 2.
As a workaround you could try to make python
point to python 2.
Bleh. I can't believe "hack your system-wide python
to solve a backward incompatibility problem" is still par-for-the-course Python usage in 2017. Any idea why Python is even a dependency here?
In https://github.com/andrewharvey/geojson-polygon-labels/commit/3dc96e4bdf26b79f67cbea28ad3e0961bb640a60 I added a dependency to stream GeoJSON features so this utility could be run on large GeoJSON files without consuming much RAM. It's quite a heavy dependency though as it has a lot of upstream native code dependencies which is where this issue likely originates.
Could you try to install https://github.com/mapbox/stream-features-from-file and see if you get the same error from that?
Yup, that fails too. Yeah, that seems like an unnecessarily heavy dependency - well, for my use case at least.
I think the better way to make processing GeoJSON light on RAM is to work with line-delimited GeoJSON, then it's really easy.
Oh look, I made just the tool to get you started: https://www.npmjs.com/package/geojson2ndjson :) (Haven't really checked to see how it goes on RAM.)
Exactly. Though I'd like to keep this tool as flexible as possible to work with normal GeoJSON as it reduces the steps people need to take.
Your geojson2ndjson looks good, but you're right I'd want to test this with say the SA1s as a GeoJSON and watch the memory usage.
I'll close this issue as it's an upstream issue, but hope it get's fixed soon!
It looks like on my system it failed to install because (of all things) my version of Python is too new?
Are there any workarounds?