Closed YonatanKra closed 8 years ago
Instead of
var wkbBuffer = new Buffer(geometry.toWkb().join(''));
you can either reuse the buffer directly
var wkbBuffer = geometry.toWkb();
or create a copy - but without using join
var wkbBuffer = new Buffer(geometry.toWkb());
Works, thanks :)
Hi, I'm trying to convert geoJson to wkb. It doesn't really work (or I don't know what to do with it...). I do the following: 1) Get GeoJson. 2) Parse it into
geometry
. 3) DowkbBuffer = geometry.toWkb();
4) try to parse thebuffer
-wkx.Geometry.parse(wkbBuffer);
It gives me an error:Here's the plnkr: https://plnkr.co/edit/4EyqlbUPDyS81sTHMWWt?p=preview