JSTS ES6: BufferOp throwing errors when used with extend

83 views
Skip to first unread message

Eduardo G.R.

unread,
May 23, 2018, 12:18:13 PM5/23/18
to JSTS devs
Dear all, I decided to post on the list as I really could not find much information on the web regarding the problem I'm experiencing (and I already spent two days on this).

I installed JSTS from NPM (npm install --save jsts) to use it on my react.js application. I have followed this ES6 example to create buffers. This code uses JSTS/extend to add the BufferOp functionality into Geometry objects, but this doesn't seem to work as I'm always getting the following error:

RuntimeException: inconsistency in rightmost processing

There area two things I noticed:

1. I can create a buffer just using BufferOp and passing a Geometry and a length/size. The returned object will effectively be a Geometry of the expected attributes.
2. If I log the arguments received by the buffer method inside the extend, everything seems to be ok: a Geometry and buffer arguments are received.

I can't dig further on this and at this point I don't know if the example is wrong or if there is any other kind of problem with the npm version of the JSTS library.

Thanks in advance!

Björn

unread,
May 23, 2018, 12:28:37 PM5/23/18
to JSTS devs
Hi,

Avoid using extend/hacks as in the third party example, I cannot recommend or endorse that.

Using BufferOp directly should work. Investigate this example:
http://bjornharrtell.github.io/jsts/index_modules.html

Unfortunately I have not had time to document the use of the NPM package and ES modules properly, which is also somewhat a moving target in the JavaScript world although it is starting to come together now.

Let me know how it goes and please attempt to provide reproduction of any further issues.

/Björn

Eduardo G.R.

unread,
May 23, 2018, 4:20:48 PM5/23/18
to jsts...@googlegroups.com
Hi Björn, thanks for your reply! 

Using BufferOp directly works perfectly. Thanks a bunch!

Eduardo


--
You received this message because you are subscribed to the Google Groups "JSTS devs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jsts-devs+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages