tidwall / tile38

Real-time Geospatial and Geofencing
https://tile38.com
MIT License
9.15k stars 570 forks source link

E2BIG #634

Open sign0 opened 2 years ago

sign0 commented 2 years ago

Is your feature request related to a problem? Please describe. Can't load some geometries (polygon) from command-line, because the string is too big (E2BIG).

Describe the solution you'd like Something like this :

Describe alternatives you've considered N/A.

Additional context N/A.

tidwall commented 2 years ago

Right now the redis-cli has the -x flag for the purpose of reading large values from command line. The -x flag reads the last argument from STDIN.

For example:

$ redis-cli -p 9851 -x SET cities tempe OBJECT </data/path/to/file.geojson
$ cat /data/path/to/file.geojson | redis-cli -p 9851 -x SET cities tempe OBJECT
$ curl http://example.com/file.geojson | redis-cli -p 9851 -x SET cities tempe OBJECT

Perhaps we can add the -x to the tile38-cli too.