mbloch / mapshaper

Tools for editing Shapefile, GeoJSON, TopoJSON and CSV files
http://mapshaper.org
Other
3.78k stars 535 forks source link

CLI unable to parse largest-overlap flag #515

Closed chrispahm closed 2 years ago

chrispahm commented 2 years ago

Hey @mbloch,

first of all, thanks for this amazing piece of software that is Mapshaper ❤️

Unfortunately, I'm having difficulties using the join commands largest-overlap flag. When running the following command in the CLI

mapshaper-xl input.json -join other-input.json fields=code prefix=c2020_ largest-overlap

I'm receiving the following error output:

Allocating 8 GB of heap memory
[join] Error: File not found (largest-overlap)
Run mapshaper -h to view help

However, when I import both files in the browser GUI (luckily possible in Firefox), and subsequently run the following line in the console:

join other_input fields=code prefix=c2020_ largest-overlap

The join operation works just as expected. Any advice what I'm doing wrong using the CLI?

Thanks, and all the best Christoph

mbloch commented 2 years ago

Hi! First make sure that your CLI is up-to-date by running mapshaper -v. The current version is 0.5.72 and largest-overlap was added in 0.5.59.

chrispahm commented 2 years ago

Awesome! That worked straight away 🙈 I checked the version before, and as it said 0.5.8 (? coming from the future) I didn't think of it being an issue... Thanks again!