Closed romankaravia closed 9 months ago
Hi! Here is one workaround for this problem (this is the usual way to reference a data property in an expression when the property name is not a valid JavaScript variable name):
mapshaper split-minimal-example.geojson -split d["ISO3166-1"] -o
Most of the time I'm sure that users want to use a single data field for splitting, rather than a more complex expression... so I just committed a change to make mapshaper accept commands like -split ISO3166-1
.
Thanks for the feedback :)
I am trying to use the -split command with an attribute with name
ISO3166-1
.This was working until mapshaper v0.4.161, but with the current version, the name is interpreted as an expression, and I run into the following error:
As far as I see, there is no way to escape the
-
, or disable expression parsing for -split, but of course I could be missing something.Content of
split-minimal-example.geojson
for the reproduction above: