spatial4j icon indicating copy to clipboard operation
spatial4j copied to clipboard

ShapeReader.read(String)

Open dsmiley opened this issue 10 years ago • 2 comments

I think ShapeReader.read(String) should exist, and furthermore should not throw IOException. Contrast this to the existing read(Object) defined now which does throw IOException and every implementation converts it to a String. I propose both read(Object) and readIfSupported(Object) be changed to be String based and to not throw IOException. read(Reader) is debatable... I wonder if it's worthwhile to bother.

@jdeolive @ryantxu what do you think?

dsmiley avatar Jan 06 '16 19:01 dsmiley

Those changes make sense to me, agree not much sense in making users handle the IOException when no implementations actually do any real IO. +1

jdeolive avatar Jan 06 '16 20:01 jdeolive

+1 to change read(Object ) to read(String ) and drop the IOException

I'm not sure about the read(Reader) option -- i like it, but i can see why it may be more complex than typically needed

ryan

On Wed, Jan 6, 2016 at 12:10 PM, Justin Deoliveira <[email protected]

wrote:

Those changes make sense to me, agree not much sense in making users handle the IOException when no implementations actually do any real IO. +1

— Reply to this email directly or view it on GitHub https://github.com/locationtech/spatial4j/issues/129#issuecomment-169444440 .

ryantxu avatar Jan 07 '16 18:01 ryantxu